logoalt Hacker News

sphyesterday at 9:42 AM2 repliesview on HN

Yeah, that's pretty unclean on two aspects: breaks pairs, and breaks the orthogonality of s-expressions

A simple macro would've sufficed, say:

  (compose
    sum
    (numbers 1 2 3))

Replies

shiandowyesterday at 11:08 AM

I don't think it's too bad orthogonality wise, though it is a bit weird to introduce infix notation. It would almost make more sense to write

((. sum numbers) (1 2 3))

show 2 replies
jnpnjyesterday at 11:56 AM

and beside multiple-args, there's the usual threading macros

    (-> [1 2 3] f g)