cm0002@lemmy.world to Programmer Humor@programming.dev · 13 days agoWhen people encounter Lisp syntax for the first timelemmy.mlimagemessage-square22linkfedilinkarrow-up1261arrow-down13cross-posted to: programmerhumor@lemmy.ml
arrow-up1258arrow-down1imageWhen people encounter Lisp syntax for the first timelemmy.mlcm0002@lemmy.world to Programmer Humor@programming.dev · 13 days agomessage-square22linkfedilinkcross-posted to: programmerhumor@lemmy.ml
minus-squareRecallMadness@lemmy.nzlinkfedilinkarrow-up10·13 days agoThreading is a great case for a macro. (-> x (* 2) (/ 3) (- 1)) Is the same as (- (/ (* x 2) 3) 1)
minus-squareMika@piefed.calinkfedilinkEnglisharrow-up3arrow-down1·13 days agoSure it’s not like it has no uses, but it’s something languages have built-in as syntax sugar or operators, and you rarely need to built your own macro for anything.
minus-squareJerkface (any/all)@lemmy.calinkfedilinkEnglisharrow-up3arrow-down1·13 days agodeleted by creator
minus-squareJerkface (any/all)@lemmy.calinkfedilinkEnglisharrow-up1·edit-213 days agodeleted by creator
Threading is a great case for a macro.
(-> x (* 2) (/ 3) (- 1))
Is the same as
(- (/ (* x 2) 3) 1)
Sure it’s not like it has no uses, but it’s something languages have built-in as syntax sugar or operators, and you rarely need to built your own macro for anything.
deleted by creator
What does it have to do with lisp?
deleted by creator