Created
April 17, 2013 09:37
-
-
Save mulbc/5403043 to your computer and use it in GitHub Desktop.
Sqwiggle
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 | |
import "fmt" | |
func fact(n int) int { | |
if n == 0 { | |
return 1 | |
} | |
return n * fact(n-1) | |
} | |
func main() { | |
fmt.Println(fact(7)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment