Earlier quoted context omitted.
using recursion involves functions as basic block of logic, that represent sub-parts of a domain That's what functions do. often creates finite set of self dependent functions This doesn't have anything to do with recursion. all you do is call and pass other functions, that will call each others You this doesn't have anything to do with recursion. If you consider `map` or `fold` these create opaque functional process…
> This doesn't have anything to do with recursion. recursion is compressing the domain so small it eats itself, crafting a small set of function is mirroring this, kinda like grammars > You this doesn't have anything to do with recursion. > I think you mean, they iterate for you. They don't use recursion. afaik map and fold were defined recursively ... foldl f z (x:xs) = foldl f (f z x) xs albeit accumulative recursi…
I don't think this means anything. At best it's a completely abstract claim with nothing backing it up. It isn't "compressing a domain" to do iteration differently.
afaik map and fold were defined recursively
Fundamentally they are useful because the do the iteration for you. Internally it doesn't matter if the iteration is done in a roundabout way with recursion, they aren't about recursion and don't really have anything to do with them, just because some language decides to do iteration with recursion.
that was what i was pointing at, iterators are not encapsulated enough
You keep saying iterators, I keep saying iteration, but the only difference here is that the recursive version hides the accumulation in the arguments on the function. There isn't any more encapsulation, just a variable moved into the function argument. The brevity is from haskell's type deduction, not recursion.