Re: call-time choice vs partial application?

From: <kahl_at_cas.mcmaster.ca>
Date: Fri, 04 May 2007 22:57:04 +0000

> contrary to what the name and the informal definition suggest, in a
> call like 'const 1 (0?2)', no choice is made for the second parameter
> of function 'const' at call time, or ever.

> choices only propagate outwards out of strict contexts

That last sentence is not strctly true... ;-)

two x = [x,x]

The contexts the ``x'' inhabits in the right-hand side of ``two''
are non-strict:


With

bot = bot

the expression ``length (two bot)'' happily evaluates to ``2''.

Make the usual choice:

coin = 0
coin = 1

and you get:

-- two coin
-- Result: [0,0] ? ;
-- Result: [1,1] ? ;

``as if the choice had been made at call-time''



Wolfram

_______________________________________________
curry mailing list
curry_at_lists.RWTH-Aachen.DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/curry
Received on So Mai 06 2007 - 17:56:00 CEST

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