Welcome, I'm happy to see you here! Feel free to pick a function and add a happy example, the more the merrier!
(def person-ids {"Alice" 42 "Bob" 23 })
(keep person-ids ["Carl" "Bob" "Alice" ]) # -> @[23 42]
(filter person-ids ["Carl" "Bob" "Alice" ]) # -> @["Bob" "Alice"]
(map person-ids ["Carl" "Bob" "Alice" ]) # -> @[nil 23 42] (chr "a" ) # => 97 (string "hello " "world" ) # => "hello world"
(fiber/root ) # => <fiber 0x562FF22F10A0> your hex number will differ (keyword? :a ) # => true
(keyword? "a" ) # => false (def f (file/temp ))
(file/write f "ok stuff" )
(file/seek f :set 0 )
(file/read f :all )
# N.b. file/temp's file is not accessible outside of the process (find-index |(= $ "b" ) ["a" "b" "c" "d" ]) #=> 1 (loop [i :range [0 12 ]]
(print i ))
# => 0
# => 1
# => 2
# => 3
# => 4
# => 5
# => 6
# => 7
# => 8
# => 9
# => 10
# => 11
# => nil
(= math/-inf (- math/-inf 1 ))
# =>
true
(keyword : )
# => : (eachk k {:a "a val" :b "b val" :c "c val" } (print k ))
# prints c
# prints a
# prints b (inc 42 ) # => 43
(map inc [1 2 3 ]) # => @[2 3 4]
(slice [:a :b :c :d ]) # => (:a :b :c :d)
(slice [:a :b :c :d ] 0 ) # => (:a :b :c :d)
(slice [:a :b :c :d ] 1 ) # => (:b :c :d)
(slice [:a :b :c :d ] 3 ) # => (:d)
(slice [:a :b :c :d ] 4 ) # => ()
(slice [:a :b :c :d ] 5 ) # error: index out of range
(slice [:a :b :c :d ] -1 ) # => ()
(slice [:a :b :c :d ] -2 ) # => (:d)
(slice [:a :b :c :d ] -4 ) # => (:b :c :d)
(slice [:a :b :c :d ] -5 ) # => (:a :b :c :d)
(slice [:a :b :c :d ] -6 ) # error: index out of range
(slice [:a :b :c :d ] 0 0 ) # => ()
(slice [:a :b :c :d ] 0 1 ) # => (:a)
(slice [:a :b :c :d ] 0 4 ) # => (:a :b :c :d)
(slice [:a :b :c :d ] -1 -1 ) # => ()
(slice [:a :b :c :d ] -2 -1 ) # => (:d)
(slice [:a :b :c :d ] -5 -1 ) # => (:a :b :c :d)
(slice [:a :b :c :d ] 1 0 ) # => ()
(slice [:a :b :c :d ] 4 0 ) # => ()
(slice [:a :b :c :d ] -1 -2 ) # => ()
(slice [:a :b :c :d ] -1 -5 ) # => ()
(zipcoll [:a :b :c ] [1 2 3 ]) #=> @{:c 3 :a 1 :b 2} (var a nil )
(var b nil )
(varfn a
[x ]
(if (zero? x )
0
(b x )))
(varfn b
[y ]
(if (pos? y )
1
(a y )))
(a 1 )
# =>
1
(b 0 )
# =>
0