Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • 4
    I would guess they explicitly wanted the if/then/else syntax which they can't get without mixfix functions like they have in agda. The function you refer to is structured as a ternary, which you could implement yourself though I presume they gave us if/then/else sugar (it's likely just sugar over a case) just because they could and it's harmless.. But I have nothing to back me up here, which is why I'm writing this in a comment. Commented Apr 22, 2013 at 14:12
  • 10
    This might be obvious to most of the readers, but I would like to point out that having îf/then/else as a function would not be a good solution in an eager language (e.g. scheme or sml) while it is reasonable in a lazy language like Haskell. Commented Apr 24, 2013 at 17:00