
25 Aug
2011
25 Aug
'11
1:13 p.m.
Could you explain what you mean by asymmetry here? That my currying code prefers one function over another based on the available arguments?
I mean this, for a ternary function f:
f(x) => doesn't call f f(x)(y) => doesn't call f f(x)(y)(z) => calls f
That last step looks asymmetric to me.
In a lazy language, f(x)(y)(z) *doesn't* call f... until you actually use the result for something... which is more consistent-looking.
I suppose the symmetrical non-lazy version looks like:
f(x) => doesn't call f f(x)(y) => doesn't call f f(x)(y)(z) => doesn't call f f(x)(y)(z)() => calls f
... which makes it lazy again :-P Regards Hartmut --------------- http://boost-spirit.com