open:closure

closure

생성된 위치의 컨텍스트에서 로컬에 접근할 수 있는 함수

(def times-two
  (let [x 2]
    (fn [y] (* y x))))

(times-two 5)
;=> 10


  • open/closure.txt
  • 마지막으로 수정됨: 2021/10/29 13:22
  • 저자 127.0.0.1