When should I use $ (and can it always be replaced with parentheses)?

前端 未结 5 914
伪装坚强ぢ
伪装坚强ぢ 2021-01-04 21:31

From what I\'m reading, $ is described as \"applies a function to its arguments.\" However, it doesn\'t seem to work quite like (apply ...) in Lisp

5条回答
  •  悲&欢浪女
    2021-01-04 22:18

    If I look at your question and the answers here, Apocalisp and you are both right:

    • $ is preferred to parentheses under certain circumstances (see his answer)
    • foo (bar quux) is certainly not bad style!

    Also, please check out difference between . (dot) and $ (dollar sign), another SO question very much related to yours.

提交回复
热议问题