Re: Confused Students

From: Sergio Antoy <antoy_at_redstar.cs.pdx.edu>
Date: Tue, 19 Jun 2007 13:56:10 -0700 (PDT)

Hi Sebastian,

Interesting example... thanks for posting it. I have a small
comment that might help your students on the following:

> My reason to post this example is: I consider it a nice
> little program that shows that Curry programmers need to be aware of
> the rule Bernd once called the essential property of call-time choice:
>
> f (x?y) = f x ? f y
>
> With this in mind, you soon recognize that
> ...

This "distributive property" (of any operation f w.r.t ?) should
be qualified. It holds for term rewriting. For Curry programs it
should be qualified somehow. This is similar and related to the
following: u = x?y implies f u = f (x?y) holds for term rewriting,
but not for Curry programs. Here is an example:

    test = (not u, not u)
         where u = x?y
               x = True
               y = False

Cheers,
Sergio
_______________________________________________
curry mailing list
curry_at_lists.RWTH-Aachen.DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/curry
Received on Wed Jun 20 2007 - 08:56:30 CEST

This archive was generated by hypermail 2.3.0 : Mon Nov 11 2019 - 07:15:07 CET