User Tools

Site Tools


lecture:4clojure:level-elementary-easy

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
lecture:4clojure:level-elementary-easy [2015/12/03 07:11]
psk810 [keep]
lecture:4clojure:level-elementary-easy [2019/02/04 14:26] (current)
Line 406: Line 406:
 </​code>​ </​code>​
  
-(drop n coll) \\+**(drop n coll)** \\
 coll의 처음 n개의 요소를 제외한 나머지로 된 lazy-seq를 리턴한다. coll의 처음 n개의 요소를 제외한 나머지로 된 lazy-seq를 리턴한다.
  
Line 586: Line 586:
   (merge-with + {:a 1  :b 2} {:a 10  :b 20 :c 30}) ;=> {:a 11 :b 22 :c 30}   (merge-with + {:a 1  :b 2} {:a 10  :b 20 :c 30}) ;=> {:a 11 :b 22 :c 30}
 ==== let 문구 ==== ==== let 문구 ====
 +
 +로컬 바인딩
 +
 +  (let [x 1] 
 +    x)
 +  ;=> 1
 +
 +
 +  (let [a 1 b 2] 
 +    (+ a b))
 +  ;=> 3
 +
 +  (let [x 10
 +        y (range 10)] 
 +    (apply + y))
 +  ;=> 45
  
 ==== loop recur ==== ==== loop recur ====
lecture/4clojure/level-elementary-easy.1449126705.txt.gz · Last modified: 2019/02/04 14:26 (external edit)