Unofficial Hacker News companion — get notified on comment replies, and more.

Roc version 0.1.0, eight years in the making (opens external site)

485 points by DrDeadCrash 3 days ago | rtfeldman.com | 134 comments on HN | Vote on HN (opens Hacker News) |

View full thread · View on Hacker News

Comment thread (2)

  1. I think you can do this in Clojure:

      (defn greet
        ([] "Hello!")
        ([name] (str "Hello, " name "!"))
        ([name title] (str "Hello, " title " " name "!")))
    
    Which one could argue is cleaner for multiple arguments, but you can't pattern match on arguments themselves this way (but you can using multimethod)
    Replies (1)
    1. That’s just function arity, not actual pattern matching. Multimethods also aren’t pattern matching.