Jonathan S. Shapiro wrote:
> On Sat, Mar 7, 2009 at 5:16 PM, Gelf Mrogen <[email protected]> wrote:
>> It seems that if you're going to curry effectful functions,
>> the equivalence would be:
>>
>> (impure fn 'a 'b -> 'c)) == (pure fn 'a -> (impure fn 'b -> 'c))
> 
> Basically, if the application is permitted to be impure, then any step
> is permitted to be impure.

Why? I would also expect the equivalence suggested by Gelf: if an
application of an impure function is known to be a partial application,
then it does not itself have any effects. For example,

  ((lambda (a b) (f a b)) x) == (lambda (b) (f x b))

so the partial application is pure, even if its result isn't.

-- 
David-Sarah Hopwood ⚥


_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to