Welcome, I'm happy to see you here! Feel free to pick a function and add a happy example, the more the merrier!
(interpose 0 [1 ])
# -> @[1] (partition 2 [:a 1 :b 2 :c 3 ])
# => @[(:a 1) (:b 2) (:c 3)]
(defn walker
`Simple walker function, that prints non-sequential
members of the form or prints "Sequence" and walks
recursively sequential members of the tree.`
[form ]
(if (or (indexed? form ) (dictionary? form ))
(do (print "Sequence" )
(walk walker form ))
(print form )))
(walk walker [[[[0 1 3 ]] 16 7 [3 [3 5 ]] 3 4 ] 1 [3 4 ]])
# Prints
# Sequence
# Sequence
# Sequence
# 0
# 1
# 3
# 16
# 7
# Sequence
# 3
# Sequence
# 3
# 5
# 3
# 4
# 1
# Sequence
# 3
# 4
(var x 12 ) # => 12
(/= x 2 ) # => 6 (parse "(+ 4 5)" ) # => (+ 4 5)
(type (parse "(+ 4 5)" )) # => :tuple (< ) # -> true
(< 1 ) # -> true
(< 1 2 ) # -> true
(< 2 1 ) # -> false
(< 1 2 3 ) # -> true
(< 1 3 2 ) # -> false
(math/atan2 0 0 )
# => 0
(math/pow 2 8 ) # => 256 (var a false )
(defer (set a 42 )
(set a true )
(error "Oh no!" ))
# error: Oh no!
(pp a ) # => prints 42 (array/pop (range 12 )) # => 11 (filter even? [1 2 3 4 5 ]) # => @[2 4]
(filter odd? [1 2 3 4 5 ]) # => @[1 3 5]
(filter (fn [x ] (not (even? x ))) [1 2 3 4 5 ]) # => @[1 3 5]
(filter (complement even? ) [1 2 3 4 5 ]) # => @[1 3 5]
(def fns [even? odd? ])
(map (fn [f ] (filter f [-2 -1 0 1 2 ])) fns ) # => @[ @[-2 0 2] @[-1 1] ]
(def fns (map complement fns ))
(map (fn [f ] (filter f [-2 -1 0 1 2 ])) fns ) # => @[ @[-1 1] @[-2 0 2] ]
(filter (partial string/has-prefix? "z" ) (all-bindings )) # => @[zero? zipcoll] (seq [i :range [0 3 ]
j :range [0 3 ]
:let [c (string/format "%c" (+ 97 i ))]]
[(keyword c ) j ])
# => '@[(:a 0) (:a 1) (:a 2) (:b 0) (:b 1) (:b 2) (:c 0) (:c 1) (:c 2)] (pairs {:a 1 :b 2 :c 3 })
# =>
@[(:c 3 ) (:a 1 ) (:b 2 )](struct :a 1 :b 2 ) # => {:a 1 :b 2}