Hacker News .hnnew | past | comments | ask | show | jobs | submitlogin

This is how it's commonly done in Clojure, and not a problem in my experience. You can define the keys that are relevant:

    (defn foo [{:keys [bar baz]}]
      ;; do something...
      )

    (foo {:bar 1 :baz 2})
This isn't as good as a type signature, but makes it easy to know what the dependencies to a function are.


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

Search: