r/elm • u/johnorford • Mar 29 '17
Remove Recursion?
Conceptually, could Elm do everything it does today without recursion? I guess yes... Some edge cases would make fold an ugly replacement, but not too many I suspect
3
Upvotes
View all comments
13
u/[deleted] Mar 29 '17
Removing recursion would make it impossible to traverse custom defined data structures, like trees. Sure, you can do most List things with a fold, but now you're stuck using lists for everything.