Re: Curry Crash Course

From: Sebastian Fischer <sebf_at_informatik.uni-kiel.de>
Date: Mon, 21 Jan 2013 19:37:40 +0100

> 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
Received on Di Jan 22 2013 - 10:06:17 CET

This archive was generated by hypermail 2.3.0 : Do Jun 20 2024 - 07:15:12 CEST