Cipherd@lemmy.ml to Programmer Humor@programming.dev · 22 天前functionslemmy.mlimagemessage-square116fedilinkarrow-up1653arrow-down19file-textcross-posted to: programmerhumor@lemmy.ml
arrow-up1644arrow-down1imagefunctionslemmy.mlCipherd@lemmy.ml to Programmer Humor@programming.dev · 22 天前message-square116fedilinkfile-textcross-posted to: programmerhumor@lemmy.ml
minus-square[object Object]@lemmy.worldlinkfedilinkarrow-up17·21 天前Remarkable how if the parenthesis is shifted from lambda() to (lambda), people lose the ability to comprehend things.
minus-squareJankatarch@lemmy.worldlinkfedilinkarrow-up2·edit-221 天前Isn’t it more like foo(){…} -> (define foo (lambda ())) tbf?
minus-square[object Object]@lemmy.worldlinkfedilinkarrow-up2·edit-221 天前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.
minus-squarestammi@feddit.orglinkfedilinkarrow-up2·21 天前In 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