Cipherd@lemmy.ml to Programmer Humor@programming.dev · 8 days agofunctionsimagemessage-square119linkfedilinkarrow-up1653arrow-down19file-text
arrow-up1644arrow-down1imagefunctionsCipherd@lemmy.ml to Programmer Humor@programming.dev · 8 days agomessage-square119linkfedilinkfile-text
minus-square[object Object]@lemmy.worldlinkfedilinkarrow-up18·8 days agoRemarkable how if the parenthesis is shifted from lambda() to (lambda), people lose the ability to comprehend things.
minus-squareJankatarch@lemmy.worldlinkfedilinkarrow-up2·8 days agoIsn’t it more like foo(){…} -> (define foo (lambda ())) tbf?
minus-square[object Object]@lemmy.worldlinkfedilinkarrow-up2·8 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-up2·7 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