Open brackendawson opened 3 years ago
https://github.com/l3x/learn-fp-go/blob/7639825d0b71633420ba17a10abb5c69491ba517/1-functional-fundamentals/ch01-pure-fp/06_curry/main.go#L5
This assignment of n to ret by the return statement is ineffective and confusing, the assignment in the deferred function will overwrite it. This line should simply be return with no arguments.
n
ret
return
https://github.com/l3x/learn-fp-go/blob/7639825d0b71633420ba17a10abb5c69491ba517/1-functional-fundamentals/ch01-pure-fp/06_curry/main.go#L5
This assignment of
n
toret
by the return statement is ineffective and confusing, the assignment in the deferred function will overwrite it. This line should simply bereturn
with no arguments.