Re: Confused Students

From: Sergio Antoy <>
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

curry mailing list
Received on Mi Jun 20 2007 - 08:56:30 CEST

This archive was generated by hypermail 2.3.0 : Mo Okt 26 2020 - 07:15:04 CET