Welcome, I'm happy to see you here! Feel free to pick a function and add a happy example, the more the merrier!
(map cfunction? [ even? (fn []) |($ ) file/read -> ])
# => @[ false false false true false ]
math/int32-max # => 2147483647
(string/find-all "duck" "duck duck duck goose!" ) # => @[0 5 10] (os/time ) # => 1593837535 (cmp 0.0 0 )
# => 0
# Note: the numbers may appear the same, but this is only due to printing truncation.
1 # => 1
(math/next 1 math/inf ) # => 1
(< 1 1 ) # => false
(< 1 (math/next 1 math/inf )) # => true
(assert :dude :what? ) # => :dude
(assert :dude :dude ) # => :dude
(assert (= :dude :what? ) "Where's my car?" )
# => error: Where's my car?
# => in _thunk [repl] (tailcall) on line 84, column 1
(assert (= :dude :dude ) "Where's my car?" ) # => true
(string/bytes "hello" ) # => (104 101 108 108 111) (defn to-double-digit-string [digit ]
(string/slice (string "0" digit ) -3 ))
(defn get-date-time-string [time ]
(let [date (os/date time )
year (get date :year )
month (to-double-digit-string (get date :month ))
day (to-double-digit-string (get date :month-day ))
hours (to-double-digit-string (get date :hours ))
minutes (to-double-digit-string (get date :minutes ))
seconds (to-double-digit-string (get date :seconds ))]
(string year "-" month "-" day "__" hours ":" minutes ":" seconds )))
(defn get-current-date-time-string []
(get-date-time-string (os/time )))
### USAGE
(get-current-date-time-string )
# => "2020-09-23__17:20:00" (string/reverse "hello" ) # => "olleh" (update-in @{:a @{:b 1 }} [:a :b ] (fn [x ] (+ 1 x )))
# @{:a @{:b 2}}
(invert "yo" )
# => @{111 1 121 0} (print :hi ` ` "there" @`` `` @"mate" )
# => nil (freeze @"Ho" ) #=> "Ho"
(freeze ["Ho" ]) #=> ("Ho")
(freeze @["Ho" ]) #=> ("Ho")
(freeze @{"Ho" "Ho" }) #=> {"Ho" "Ho"}
(array/pop @[]) # => nil