This is ONE nested function, not F1 >>? F2:
Kim, This is a very useful insight
(This is, in fact, how partial function application
works.) a is still in scope when b is defined, a and b are still in
scope when c is defined.
Brandon, I need to study this again, still dont understood how its related to partial function application.
Also consider this: in Haskell, a function is a
binding like any other. If you couldn't refer to bindings from outer
scopes, you couldn't define new functions! Well, aside from anonymous
ones/lambdas, which are useful but somewhat limiting if you can't name
and reuse them.
Brandon, This is quite strange thing, the functions can access the globally defined variables and therefore there output is dependent not just on inputs but on those variables too. This goes against the understanding of pure functions.
Also there may be another way to look at this - all the global variables are inputs to all the functions. I think this is how the haskell looks at this scenario.