Re: Two to Three Ways to write an unsafe type cast without importing Unsafe

From: Wolfgang Lux <wlux_at_uni-muenster.de>
Date: Fri, 16 May 2008 19:34:06 +0200

Michael Hanus wrote:
> If you use function patterns, it is not a problem,
> since the function pattern
>
> last (_ ++ [x]) = x
>
> is considered as an abbreviation for the infinite set of rules
>
> last [x] = x
> last [_,x] = x
> last [_,_,x] = x
> ...
>
> i.e., variables in a function pattern are considered as pattern
> variables which can be bound to partial functions.

I know. However, the FlatCurry translation of last is effectively
   last a1 = let x,xs free in cond (xs ++ x:[] =:<= a1) x
so I expect the problem to show up for that definition, too.

Regards
Wolfgang


_______________________________________________
curry mailing list
curry_at_lists.RWTH-Aachen.DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/curry
Received on Sa Mai 17 2008 - 17:03:38 CEST

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