Welcome, I'm happy to see you here! Feel free to pick a function and add a happy example, the more the merrier!
(filter (fn [x ] (> x 2 )) [1 2 3 4 5 ]) # @[3 4 5] math/int32-max # => 2147483647
(nan? 1 ) # => false
(nan? (/ 0 0 )) # => true
(nan? (sqrt -1 )) # => true (os/time ) # => 1593837535 (def a @[1 6 ]) # => @[1 6]
(array/insert a 1 (splice [2 3 ])) # => @[1 2 3 6]
(array/insert a 3 ;[4 5 ]) # => @[1 2 3 4 5 6]
(merge {:a 1 :b 2 }
{:c 3 :a 4 })
# -> @{:c 3 :a 4 :b 2} # build own map-indexed with map
(defn map-indexed [f ds ]
(map f (range 0 (length ds )) ds ))
(map-indexed (fn [i v ] [i v ] ) ["a" "b" "c" "d" ])
# => @[(0 "a") (1 "b") (2 "c") (3 "d")] # removes a file in the current directory
(os/rm "hello.txt" )(string/replace-all "e" "o" "feed" )
# =>
"food" (map bytes? [ 'ab :ab "ab" @"ab" [97 98 ] @[97 98 ] {0 97 1 98 } @{0 97 1 98 } ])
# => @[ true true true true false false false false ]
(map symbol? [ 'ab :ab "ab" @"ab" [97 98 ] @[97 98 ] {0 97 1 98 } @{0 97 1 98 } ])
# => @[ true false false false false false false false ]
(map keyword? [ 'ab :ab "ab" @"ab" [97 98 ] @[97 98 ] {0 97 1 98 } @{0 97 1 98 } ])
# => @[ false true false false false false false false ]
(map string? [ 'ab :ab "ab" @"ab" [97 98 ] @[97 98 ] {0 97 1 98 } @{0 97 1 98 } ])
# => @[ false false true false false false false false ]
(map buffer? [ 'ab :ab "ab" @"ab" [97 98 ] @[97 98 ] {0 97 1 98 } @{0 97 1 98 } ])
# => @[ false false false true false false false false ] (type (fiber/new (fn [])))
# =>
:fiber (let [seed 0 ]
(= (math/rng-uniform (math/rng seed ))
(math/rng-uniform (math/rng seed ))))
# => true
# :as sets a /
(import /deeper/inside :prefix "" :export true )
# @{_ @{:value <cycle 0>} cat @{:private false}}
(import /deeper/inside :as "" :export true )
# @{/cat @{:private false} _ @{:value <cycle 0>} cat @{:private false}}
(mapcat
|[$0 $1 (* $0 $1 )]
[1 2 3 ]
[100 200 300 ])
# => @[1 100 100 2 200 400 3 300 900] (when-let [root (math/sqrt 64 )
unused (even? root )]
(printf "%d is even" root ))
# -> "8 is even"