5 ms·
The optional parentheses makes the syntax quite ambiguous. fibonacci it - 1 + fibonacci it - 2 I'm only hoping to understand what we have here because I a
by p4bl0 5y ago
The optional parentheses makes the syntax quite ambiguous.
fibonacci it - 1 + fibonacci it - 2
I'm only hoping to understand what we have here because I already know what Fibonacci is.
- TheMatten 5y agoThis really just seems to be ML-style syntax - which is not ambiguous at all, it's just different from C-like languages (functions applied one argument at a time, with function application (empty space) having the biggest precendece)
- heinrich5991 5y agoIn this case (and if it were interpreted as Haskell syntax), the above term would be wrong.
- postalrat 5y agoIs it one of these? fibonacci (it) - 1 + fibonacci (it) - 2 fibonacci (it - 1) + fibonacci (it - 2) fibonacci (it - 1 + fibonacci (it - 2))
- marcosdumay 5y agoOn any sane ML-style language, it would be this: (fibonacci it) - 1 + (fibonacci it) - 2 But I guess it isn't the case here, because that code doesn't make sense.
- tantalor 5y agoThe actual example in the readme is unambiguous: fibonacci(number - 1) + fibonacci it - 2