(-> "a b c d" upcase [replace _ "A" "X"] [split _ " "] first)
What's more, you could mix first and last because all the arguments are actual values rather than hacky s-exprs. I already used that in the second example above, if you look closely.
The one missing use case is this:
(-> animals 'dog 'thaddeus 'age)
Arc just has a different, retro-email solution for that:
Though it all unravels if one of the keys is a string. Ok, we could use some help here. But it feels like a separate mechanism; I would avoid mixing `(,form ,x) and `(,x ,form) in different paths of a single macro.
Hmm, even this isn't too bad:
(-> animals [_ 'dog] [_ 'thaddeus] [_ 'age])
You don't save typing compared to:
(((animals 'dog) 'thaddeus) 'age)
But the matching parens are closer together and so easier to read.
I agree, mixing `(,form ,x) and `(,x ,form) is really ugly and I do like
much better - I forgot arc could do that lol.
Also, if anyone were really caught up on the strings as keys hiccup, the idiomatic approach for arc would likely be this: http://arclanguage.org/item?id=13006. If one could only find a pleasant & available symbol.