contains <ul><li>(def m {:first &quot; Andre &quot; :second &quot; Shooter &quot;}) </li></ul><ul><li>(println &quot;Map c...
empty <ul><li>(def m '()) </li></ul><ul><li>(println &quot;def m '() empty?&quot;( empty ? m)) </li></ul><ul><li>Output: <...
for <ul><li>( for  [v [1 2 3 4 5]] (println (str &quot;Hello World &quot; v) )) </li></ul><ul><li>Hello World 1 </li></ul>...
Upcoming SlideShare
Loading in …5
×

Clojure language

546 views

Published on

programming in Clojure in ilegra's LDC

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

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

No notes for slide

Clojure language

  1. 2. contains <ul><li>(def m {:first &quot; Andre &quot; :second &quot; Shooter &quot;}) </li></ul><ul><li>(println &quot;Map contem KEY: 'first'? &quot;( contains ? m :first) &quot; Valor:&quot;(m :first)) </li></ul><ul><li>(println &quot;Map contem KEY: 'second'? &quot;( contains ? m :second) &quot; Valor:&quot;(m :second)) </li></ul><ul><li>(println &quot;Map contem KEY: 'blastoise'? &quot;( contains ? m :blastoise)) </li></ul><ul><li>Output: </li></ul><ul><li>Map contem KEY: 'first'? true Valor: Andre </li></ul><ul><li>Map contem KEY: 'second'? true Valor: Shooter </li></ul><ul><li>Map contem KEY: 'blastoise'? false </li></ul>
  2. 3. empty <ul><li>(def m '()) </li></ul><ul><li>(println &quot;def m '() empty?&quot;( empty ? m)) </li></ul><ul><li>Output: </li></ul><ul><li>def m '() empty? true </li></ul><ul><li>(def n '(&quot; Andre &quot; &quot; Shooter &quot;)) </li></ul><ul><li>(println &quot;def n '(&quot; Andre &quot; &quot; Shooter &quot;) empty?&quot;(empty? n)) </li></ul><ul><li>Output: </li></ul><ul><li>def n '(&quot; Andre &quot; &quot; Shooter &quot;) empty? false </li></ul>
  3. 4. for <ul><li>( for [v [1 2 3 4 5]] (println (str &quot;Hello World &quot; v) )) </li></ul><ul><li>Hello World 1 </li></ul><ul><li>Hello World 2 </li></ul><ul><li>Hello World 3 </li></ul><ul><li>Hello World 4 </li></ul><ul><li>Hello World 5 </li></ul>

×