[ X Y -> Y X | -> 0 ] 1 2 ==> (2 1)
But
let F = [ X Y -> Y X | -> 0 ] in F 1 2 ==> (0 1 2)
The discrepancy is unfortunate but completely correct according to the operational semantics. In the first case, a lambda expression is applied to its arguments, then reduced; in the second case, the lambda expression is reduced, then applied.
It's unfortunate but I think I'll keep it.
No comments:
Post a Comment