Hacker News new | ask | show | jobs
by vats 1386 days ago
> I am and forever will be a fan of the scheme (and now clojure) convention of saying foo->bar to say foo to bar. I just think that's swell.

In his book—Lisp in Small Pieces—Christian Quienec suggests using a reversed arrow (ie. bar<-foo) so the direction of the arrow agrees with the evaluation order in a function composition. eg. (foo<-bar (bar<-foo ...)), which would have otherwise been (bar->foo (foo->bar ...)).

3 comments

In Clojure you're likely to use an arrow to do multiple compositions, eg. (-> foo foo->bar bar->baz)
> bar<-foo

Or bar_from_foo , when identifier charsets prohibit <- .

That's quite nice.