Re: Curry syntax

From: Michael Hanus <mh_at_informatik.uni-kiel.de>
Date: Thu, 9 Mar 2017 11:28:43 +0100

On 03/09/2017 09:25 AM, Wolfgang Lux wrote:
>
>> Am 08.03.2017 um 19:46 schrieb Andy Jost <Andrew.Jost_at_synopsys.com>:
>>
>> I wonder if anyone has ever thought about allowing a “where” clause with conditions in a Curry expression. For instance, I wish this were a valid expression:
>>
>> (x where length x == 3)
>>
>> (I also like to assume unbound variables are free, but that’s a different topic.)
>>
>> Any thoughts?
>
> Isn't this already possible with (length x == 3 &> x) in Curry now?
> Or am I missing something?

I also thought of the same construction.

There is still one issue to discuss: the scope of x.
If x should be visible like any other object introduced
in a where clause, one can write it as

  where x = let x free in length x == 3 &> x

Best regards,

Michael

_______________________________________________
curry mailing list
curry_at_lists.rwth-aachen.de
https://mailman.rwth-aachen.de/mailman/listinfo/curry

Received on Do Mär 09 2017 - 11:32:07 CET

This archive was generated by hypermail 2.3.0 : Do Feb 01 2024 - 07:15:12 CET