sharp-quote

Why sharp quote lambda expressions?

巧了我就是萌 提交于 2021-02-06 09:58:55
问题 It is a technique used frequently in On Lisp , which is on Common Lisp: > (mapcar #'(lambda (x) (+ x 10)) '(1 2 3)) (11 12 13) Why is sharp-quote needed or even possible? lambda expressions return function objects, and sharp quoting returns function objects from names. I also have heard contradictory information on whether lambda expressions are names - in particular On Lisp contradicts the standard, but his code seems to work which also contradicts the standard. In elisp it seems it's not

Why sharp quote lambda expressions?

不打扰是莪最后的温柔 提交于 2021-02-06 09:58:25
问题 It is a technique used frequently in On Lisp , which is on Common Lisp: > (mapcar #'(lambda (x) (+ x 10)) '(1 2 3)) (11 12 13) Why is sharp-quote needed or even possible? lambda expressions return function objects, and sharp quoting returns function objects from names. I also have heard contradictory information on whether lambda expressions are names - in particular On Lisp contradicts the standard, but his code seems to work which also contradicts the standard. In elisp it seems it's not

How is sharp quote (#') different from symbol-function?

↘锁芯ラ 提交于 2019-12-11 10:59:25
问题 To me these operators seem to do the same thing. Both take a symbol and return the function associated with it. Is there any difference? elisp evaluation returns the following: (defun foo (x) (+ 1 x)) foo (foo 3) 4 #'foo Which I don't understand either. Furthermore is there a difference between common lisp and elisp? I'm learning from resources on either. 回答1: Common Lisp : SYMBOL-FUNCTION can't retrieve functions from lexically bound functions. FUNCTION references the lexically bound