Scala unit type, Fibonacci recusive depth function

前端 未结 0 704
心在旅途
心在旅途 2021-01-24 00:33

So I want to write a Fibonacci function in scala that outputs a tree like so:

fib(3)
| fib(2)
| | fib(1)
| | = 1
| | fib(0)
| | = 0
| = 1
| fib(1)
| = 1
= 2


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题