Experiences teaching or learning map/reduce/etc before recursion?

Posted by Jay on Stack Overflow See other posts from Stack Overflow or by Jay
Published on 2010-06-03T11:50:18Z Indexed on 2010/06/03 11:54 UTC
Read the original article Hit count: 185

As far as I can see, the usual (and best in my opinion) order for teaching iterting constructs in functional programming with Scheme is to first teach recursion and maybe later get into things like map, reduce and all SRFI-1 procedures. This is probably, I guess, because with recursion the student has everything that's necessary for iterating (and even re-write all of SRFI-1 if he/she wants to do so).

Now I was wondering if the opposite approach has ever been tried: use several procedures from SRFI-1 and only when they are not enough (for example, to approximate a function) use recursion. My guess is that the result would not be good, but I'd like to know about any past experiences with this approach.

© Stack Overflow or respective owner

Related posts about functional-programming

Related posts about Scheme