Skip to content

Instantly share code, notes, and snippets.

@codephilosopher
Created November 20, 2022 07:17
Show Gist options
  • Save codephilosopher/a8bb83220dfec3bdd74dba9aa57485d3 to your computer and use it in GitHub Desktop.
Save codephilosopher/a8bb83220dfec3bdd74dba9aa57485d3 to your computer and use it in GitHub Desktop.
simple recursion
import "fmt"
func main() {
SimpleRecursion(3)
}
func SimpleRecursion(n int) {
if n > 0 {
fmt.Println(n)
SimpleRecursion(n - 1)
}
return
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment