News for hackers. Stuff that matters.
Re:What are potential disadvantages of functional programming? by fbonetti on Friday July 28, 2017 @09:46AM (#14874214)
That's just a combination of pattern matching and tail call optimization. That code would look exactly this same in Haskell:

    countToTen n = countToTen (n + 1)
    countToTen 10 = done
Re:What are potential disadvantages of functional programming? by dllthomas on Saturday July 29, 2017 @11:27AM (#14881652)
The 10 case would have to be first, or that's an infinite loop. Cases are checked in order. That said, the compiler will give you a warning about it.