Hacker News new | past | comments | ask | show | jobs | submit login

Branches too. The only conditionals I've seen in functional programming are equivalent to the ternary operator.

Unless I'm absurdly wrong, which can happen.




The program still branches (decides which code path to follow) - it just does it with a different mechanism, for instance pattern matching.


Yes, pattern matching fits the bill, thanks.


I think codesearch can answer you: http://www.google.com/codesearch?q=if+lang%3Ahaskell


"if"s in Haskell work exactly like the ternary operators, just as I said. I was using the article's differentiation of "branching" and "microbranching" and stating that I haven't seen the former in functional languages.

The link provided doesn't contradict any of this, actually it does quite the opposite.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: