What is the difference between . (dot) and $ (dollar sign)?

后端 未结 13 1735
庸人自扰
庸人自扰 2020-11-22 04:57

What is the difference between the dot (.) and the dollar sign ($)?

As I understand it, they are both syntactic sugar for not needing to us

13条回答
  •  广开言路
    2020-11-22 05:06

    The short and sweet version:

    • ($) calls the function which is its left-hand argument on the value which is its right-hand argument.
    • (.) composes the function which is its left-hand argument on the function which is its right-hand argument.

提交回复
热议问题