Resolving “Variable used within its own initial value” Error in Swift

1 · Andrew Bancroft · Oct. 20, 2014, 1:50 p.m.
While experimenting with a few things today, I experienced this compiler error: Variable used within its own initial value Let me describe the situation I was in… I was playing (in a playground, no less) with closures, trying to mimic some behavior that I’ve recently learned about in Scala. Essentially, I was trying to implement a factorial function as a closure, and I was trying to do it recursively (that is, without using a for/while loop)....