
26 Jan
2006
26 Jan
'06
4:08 a.m.
On 1/23/06, Sebastian Sylvan
wrote: Are there any subtle reasons for why something like the following couldn't be allowed?
foo x y z w = ... bar x w = foo x _ _ w
I.e. a more flexible version of partial application. This would be translated too
bar x w = \y z -> foo x y z w
I.e a function which takes the "_" parameters in the same order they were encountered in the function application.
I'd be against this--its semantics isn't clear enough to me. For example, I usually assume id e = e, for any e, but
id (f _ x) y = id (\y->f y x) y = f y x /= f _ x y = \z -> f z x y Or would (f _ x) y and f _ x y maybe be different? That would fix the problem above, while introducing another. Please, no! John