Re: Curry Crash Course

From: Sergio Antoy <antoy_at_cs.pdx.edu>
Date: Mon, 21 Jan 2013 15:40:23 -0800

Hi Sebastian,

Nice work on the code samples.

What is the most serious drawback (and maybe also all the others,
since we are this)?

Thanks,
Sergio

On Mon, 21 Jan 2013, at 19:37, Sebastian Fischer <sebf_at_informatik.uni-kiel.de> wrote:

> > Nowadays, non-deterministic
> > operations are much more elegant so that the typical use of
> > findall is in the form
> >
> > findall (\y -> exp =:= y)
> >
> > which looks awkward. I'd prefer "allValues exp", although
>
> we know that it also has its drawbacks.
>
>
> Yes, I would prefer "allValues (\_ -> exp)" which looks a little more
> awkward but avoids the most serious drawback, in my opinion. Providing
> findall or allValues is just a matter of convenience, because
>
> allValues f = findall (\x -> f () =:= x)
> findall p = allValues (\_ -> let x free in p x &> x)
>
> These definitions would work in all Curry systems while "allValues exp"
> would not work in MCC. Not sure about KiCS2.
>
> Best regards,
> Sebastian

> _______________________________________________
> curry mailing list
> curry_at_lists.RWTH-Aachen.DE
> http://MailMan.RWTH-Aachen.DE/mailman/listinfo/curry

_______________________________________________
curry mailing list
curry_at_lists.RWTH-Aachen.DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/curry
Received on Di Jan 22 2013 - 10:06:23 CET

This archive was generated by hypermail 2.3.0 : Di Apr 16 2024 - 07:15:12 CEST