How many arguments does an anonymous function expect in clojure?

前端 未结 3 888
北荒
北荒 2020-12-03 13:48

How does Clojure determine how many arguments an anonymous function (created with the #... notation) expect?

user=> (#(identity [2]) 14)
java         


        
3条回答
  •  忘掉有多难
    2020-12-03 14:14

    You need to refer to the arguments with %1, %2 etc. to cause the function to require that many arguments.

提交回复
热议问题