LDC
5 clojures funcions     Set - Rearrangedorundoallswap!
user=> (doc dorun)1. lazy sequences produced via functions thathave side effects2. dorun can be used to force any other si...
doallfunctionUsage: (doall coll)       (doall n coll)1. lazy sequences are produced via functions thathave side effects2. ...
swap!functionUsage: (swap! atom f)   (swap! atom f x)   (swap! atom f x y)   (swap! atom f x y & args)* Atomically swaps t...
Java calling Clojure
Clojure lightning talk
Clojure lightning talk
Clojure lightning talk
Clojure lightning talk
Clojure lightning talk
Clojure lightning talk
Clojure lightning talk
Clojure lightning talk
Clojure lightning talk
Upcoming SlideShare
Loading in …5
×

Clojure lightning talk

539 views
502 views

Published on

Quick talk about some core clojure functions and some 4clojure solutions

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

  • Be the first to like this

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

No notes for slide

Clojure lightning talk

  1. 1. LDC
  2. 2. 5 clojures funcions Set - Rearrangedorundoallswap!
  3. 3. user=> (doc dorun)1. lazy sequences produced via functions thathave side effects2. dorun can be used to force any other sideeffects. Walks through the successive nexts ofthe seq, does not retain the head and returnsnil.
  4. 4. doallfunctionUsage: (doall coll) (doall n coll)1. lazy sequences are produced via functions thathave side effects2. doall can be used to force any effects. Walksthrough the successive nexts of the seq, retains thehead and returns it, thus causing the entire seq toreside in memory at one time.
  5. 5. swap!functionUsage: (swap! atom f) (swap! atom f x) (swap! atom f x y) (swap! atom f x y & args)* Atomically swaps the value of atom to be:(apply f current-value-of-atom args).* f should be free of side effects.* Returns the value that was swapped in.
  6. 6. Java calling Clojure

×