[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: let and for vs. lambda variations
Harald> Again, I have been careless. But this has got to be right:
Harald> let (x=a b; y=c d) cmd -->
Harald> @ curried-body x y {<={$curried-body <=$y} <=$x} \
Harald> @ x {$&result @ y {cmd}} <={wrap x} <={wrap y}
Modulo a misprint, that is -- interchange <=$y and <=$x. I got it
right in the example. Sorry about the confusion.
Also, for the benefit of new readers who don't know the wrap function:
; fn wrap * {$&result {$&result $*}}
It wraps up its arguments into a single code fragment (thunk), which
when executed returns the original argument list.
- Harald