Cipherd@lemmy.ml to Programmer Humor@programming.dev · 4 个月前functionslemmy.mlimagemessage-square119linkfedilinkarrow-up1664arrow-down19file-textcross-posted to: programmerhumor@lemmy.ml
arrow-up1655arrow-down1imagefunctionslemmy.mlCipherd@lemmy.ml to Programmer Humor@programming.dev · 4 个月前message-square119linkfedilinkfile-textcross-posted to: programmerhumor@lemmy.ml
minus-squarepet the cat, walk the dog@lemmy.worldlinkfedilinkarrow-up18·4 个月前Remarkable how if the parenthesis is shifted from lambda() to (lambda), people lose the ability to comprehend things.
minus-squareJankatarch@lemmy.worldlinkfedilinkarrow-up2·4 个月前Isn’t it more like foo(){…} -> (define foo (lambda ())) tbf?
minus-squarestammi@feddit.orglinkfedilinkarrow-up2·4 个月前In clojure it’s (def (fn [])) or short (defn []).
minus-squarepet the cat, walk the dog@lemmy.worldlinkfedilinkarrow-up2·4 个月前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.
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 clojure it’s (def (fn [])) or short (defn []).
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.
deleted by creator