package main import ( "fmt" ) func nestedCount(level int) int { if level <= 0 { return 0 } return level + nestedCount(level-1) } func main() { fmt.Println(nestedCount(4)) }