[ANN] Specter: a library for deep introspection and transformation of nested data

150 views
Skip to first unread message

Nathan Marz

unread,
Feb 26, 2015, 9:57:57 PM2/26/15
to clo...@googlegroups.com
It's been far too long since I've open sourced anything, so today I'm happy to open source a small library that I use extremely heavily: https://github.com/nathanmarz/specter

Specter lets you write code like this:

user> (select [ALL :a even?]
              [{:a 1} {:a 2} {:a 4} {:a 3}])
[2 4]

user> (update [(filterer odd?) LAST]
              inc
              [2 1 3 6 9 4 8])
[2 1 3 6 10 4 8]

user> (select [:a ALL :b ALL odd?]
              {:c [1 2 3] :a [{:b [3 4 5]} {:c 1 :b [1 2]}]})
[3 5 1]   

More information can be found on the README.
Reply all
Reply to author
Forward
0 new messages