Created
January 25, 2016 07:40
-
-
Save siburu/abc3d4f4ea281a5e53ab to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
type recFunc func(int, recFunc) | |
func call(n int, f recFunc) { | |
defer println("r", n) | |
println(n) | |
if n > 0 { | |
f(n-1, f) | |
} | |
} | |
func main() { | |
call(10, call) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment