diff options
Diffstat (limited to 'base_workspace/examples/go/lib1/lib1.go')
-rw-r--r-- | base_workspace/examples/go/lib1/lib1.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/base_workspace/examples/go/lib1/lib1.go b/base_workspace/examples/go/lib1/lib1.go new file mode 100644 index 0000000000..f42494770d --- /dev/null +++ b/base_workspace/examples/go/lib1/lib1.go @@ -0,0 +1,9 @@ +package lib1 + +func Fib(n int) int { + if n < 2 { + return 1 + } + + return Fib(n-1) + Fib(n-2) +} |