Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
weavie
on May 7, 2015
|
parent
|
context
|
favorite
| on:
Why Lisp?
Clojure has a threading macro built in (
http://clojuredocs.org/clojure.core/-%3E
) which lets you write code like :
user=> (-> "a b c d" .toUpperCase (.replace "A" "X") (.split " ") first)
It is trivial to write the macro in other Lisps.
sgrove
on May 7, 2015
[–]
This is one of the nicest macros - chaining with sane return semantics and no overhead/boxing required. Breaks my heart trying to replicate it.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: