by davidstump · 11y ago · 0 comments
The post still seems to be more about pattern matching than recursion, but at least recursion is in there somewhere!
Let's pretend we can alias these functions using AS
def map_single({:ok, res}) AS fun1
def map_single({:cols_and_first, cols, first_row}) AS fun2
def map_single({:zipped, list}) AS fun3
def map_single({:error, err}) AS fun4
Notice how it's called.fun1 calls fun2
fun2 calls fun3
fun4
to be recursive, a function must call itself or another function that calls it. neither of this is true. What the article is talking about is pattern matching.