Total Functional Programming

9 thoughts
last posted July 21, 2014, 7:01 a.m.

5 earlier thoughts

0

Charity's solution to recursion

The Charity programming language restricts recursion by strictly separating infinite and finite data structures, and only providing a "fold" over finite data structures, and not allowing the user to write recursive functions themselves. To recurse you must either "fold" or "map" over a data structure.

Thus in Charity the only partial function issues to deal with are division by zero, out of memory, stuff like that.

One open question I have about Charity is whether you can pass a function to itself. My guess is NO but I haven't confirmed that.

3 later thoughts