Partial application and lazy evalutaion

15 Aug
2015
15 Aug
'15
8:24 a.m.
Hi, Is partial application feature of functions in haskell a direct outcome of lazy evaluation ? i.e Since functions are not evaluated until at the point where results are required this allows haskell functions to be partially applied because they're not evaluated and hence exist as thunk. Thanks, Shishir

15 Aug
15 Aug
11:16 a.m.
Shishir Srivastava wrote:
Is partial application feature of functions in haskell a direct outcome of lazy evaluation ?
I wouldn't say so. If f is a function of two variables, then you can think of (f x) as being just an easier way to write \y -> f x y. And surely, you can do that in any language with lambdas, whether lazy or not. You can even do it in javascript: function (y) { return f(x,y) }. – Harald
3566
Age (days ago)
3566
Last active (days ago)
1 comments
2 participants
participants (2)
-
Harald Hanche-Olsen
-
Shishir Srivastava