What's the convention for using an asterisk at the end of a function name in Clojure and other Lisp dialects?

后端 未结 4 700
轻奢々
轻奢々 2021-02-01 02:03

Note that I\'m not talking about ear muffs in symbol names, an issue that is discussed at Conventions, Style, and Usage for Clojure Constants? and How is the `*var-name*` naming

4条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-01 02:45

    a normal let binding (let ((...))) create separate variables in parallel

    a let star binding (let* ((...))) creates variables sequentially so that can be computed from eachother like so

    (let* ((x 10) (y (+ x 5)))
    

    I could be slightly off base but see LET versus LET* in Common Lisp for more detail

    EDIT: I'm not sure about how this reflects in Clojure, I've only started reading Programming Clojure so I don't know yet

提交回复
热议问题