Clojure functions 3

378 views
332 views

Published on

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
378
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Clojure functions 3

  1. 1. Clojure Example Functions ilegra - LDCBy Jackson dos Santos
  2. 2. Select-keysuser => (prn (select-keys {:a 1 :b 2 :c 3} [:a :b])){:b 2, :a 1}nil
  3. 3. shuffleuser => (shuffle (1 2 3 4 5 6))[1 6 4 5 3 2]
  4. 4. Set-error-handler - set-error-mode (def bond (agent 1)) (defn handle-log-error [the-agent the-err] (println (str "the Agent " the-agent " threw the exception " the-err)) ) (set-error-handler! bond handle-log-error) (set-error-mode! bond :fail) (send bond / 0)
  5. 5. some-fnuser => ((some-fn odd?) 2 4 6)=> falseIt works just for clojure 1.3....
  6. 6. 4Clojure Problems Solved
  7. 7. 4Clojure Problems Solved
  8. 8. 4Clojure Problems Solved

×