Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Clojure's missing piece (nathanmarz.com)
10 points by greenonion on March 1, 2017 | hide | past | favorite | 1 comment


This was the transformation that hooked me:

  (transform (subselect ALL :a even?)
    reverse
    [{:a 1} {:a 2 :b 1} {:a 4} {:a 5} {:a 6} {:a 8}])
  ;; => [{:a 1} {:a 8 :b 1} {:a 6} {:a 5} {:a 4} {:a 2}]]
I'm solid with Clojure, and I am not even sure how to begin expressing this transformation without Specter.

Granted, it's not clear why you would want to do this in a real program. But I'm convinced about the generic power of such transformations and have little doubt I'd find use cases (albeit probably not this use case) in real code bases.




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

Search: