Cipherd@lemmy.ml to Programmer Humor@programming.dev · 2 days agofunctionslemmy.mlimagemessage-square118linkfedilinkarrow-up1603arrow-down19file-textcross-posted to: programmerhumor@lemmy.ml
arrow-up1594arrow-down1imagefunctionslemmy.mlCipherd@lemmy.ml to Programmer Humor@programming.dev · 2 days agomessage-square118linkfedilinkfile-textcross-posted to: programmerhumor@lemmy.ml
minus-squareSlurpingPus@lemmy.worldlinkfedilinkarrow-up18·2 days agoRemarkable how if the parenthesis is shifted from lambda() to (lambda), people lose the ability to comprehend things.
minus-squareJankatarch@lemmy.worldlinkfedilinkarrow-up2·edit-22 days agoIsn’t it more like foo(){…} -> (define foo (lambda ())) tbf?
minus-squareSlurpingPus@lemmy.worldlinkfedilinkarrow-up2·edit-22 days agoIn Emacs Lisp, you use one of these two: (defun funcname (arg1 arg2) (+ arg1 arg2)) (lambda (arg1 arg2) (+ arg1 arg2)) — with the latter typically being an argument to another function or macro.
minus-squarestammi@feddit.orglinkfedilinkarrow-up1·2 days agoIn clojure it’s (def (fn [])) or short (defn []).
Remarkable how if the parenthesis is shifted from
lambda()to(lambda), people lose the ability to comprehend things.Isn’t it more like
foo(){…}->(define foo (lambda ()))tbf?
In Emacs Lisp, you use one of these two:
(defun funcname (arg1 arg2) (+ arg1 arg2))(lambda (arg1 arg2) (+ arg1 arg2))— with the latter typically being an argument to another function or macro.
In clojure it’s (def (fn [])) or short (defn []).
deleted by creator