microsoft/BosqueLanguage

How do I create a recursive function?

Closed this issue · 6 comments

Please describe what you want to do
I want to create a resursive fibonacci function

What I try to do in Bosque
image

What I see in console
image

When I have removed rec from all the place (and fixed fibonacci code lol) then it gives me correct result:

image

Are the docs outdated?

I think it's not implemented yet. See #27

The result is wrong. 832040 is not fibonacci series.

Let me sum this up:

  1. rec is not implemented
  2. you can do a recursive function without rec
  3. docs are misleading, because they show you not implemented features

@khoshroomahdi, I checked the result for x = 30 on three different online tools and it gave me the same result.

I make mistake.

But, why i would use rec if that not need to work? That is to explicit the recursive function?