Re: Curry Crash Course

From: Michael Hanus <mh_at_informatik.uni-kiel.de>
Date: Mon, 21 Jan 2013 14:59:53 +0100

On 01/20/2013 08:54 PM, Sebastian Fischer wrote:
> last week, I have introduced Curry to students of the University of
> Bonn, Germany. I think we have discussed some interesting Curry programs
> that you can download here, if you are interested:
>
> http://sebfisch.github.com/research/#talks
>
> The programs should work in all Curry systems, although a few examples
> using findall do not work in KiCS2 (which does not support findall). I
> have used MCC because all other systems were too slow for at least one
> example.

Nice examples which might be of use elsewhere. Thanks for your pointer.

> P.S. findall can be defined in KiCS2 as follows:
>
> findall p = unsafePerformIO $ values2list $ set1 unpack p
>
> I think this would be a useful replacement for the current (undefined)
> definition of findall in KiCS2.

Yes, but I would put this definition in a separate library rather
than the prelude. On the other hand, I don't like to encourage
people to use findall. This operation was proposed when Curry
was more oriented on constraints. 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.

Best regards,

Michael
_______________________________________________
curry mailing list
curry_at_lists.RWTH-Aachen.DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/curry
Received on Mo Jan 21 2013 - 15:02:01 CET

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