Welcome, I'm happy to see you here! Feel free to pick a function and add a happy example, the more the merrier!
(peg/match ~{:main (capture (some :S ))}
"hello world" )
# => @["hello"] (tuple 1 2.3 :a "foo" true nil [] {} (fn []))
# => (1 2.3 :a "foo" true nil () {} <function 0x7FB2A3D030B0>)
(var buf @"" )
(buffer/push-word buf 2147483647 )
(+
(get buf 0 ) # byte 1
(blshift (get buf 1 ) 8 ) # byte 2
(blshift (get buf 2 ) 16 ) # byte 3
(blshift (get buf 3 ) 24 )) # byte 4
# => 2147483647
(let [len 8
rand-string (string/join (map |(string/format "%02x" $ )
(os/cryptorand len )))]
(= (length rand-string ) (* 2 len )))
# => true
(seq [i :range [0 10 ] :when (odd? i )] (math/pow 2 i ))
# => @[2 8 32 128 512]
# array with 2 to the power of all odd numbers smaller than 10
(if-let [x true
y (not x )]
:a
:b )
# => :b
(as?-> [1 2 3 ] _
(sum _ )
(when (> 6 _ ) _ ))
# => nil
(as?-> [1 2 3 ] _
(sum _ )
(when (>= 6 _ ) _ ))
# => 6
(seq [i :range [0 3 ]
j :range [0 3 ]
:let [c (string/format "%c" (+ 97 i ))]
:when (and (even? i ) (even? j ))]
[(keyword c ) j ])
# => '@[(:a 0) (:a 2) (:c 0) (:c 2)] (mean [1 10 100 ]) # => 37
(mean []) # => nan (reduce + 1 [2 3 4 ]) # -> 10
(accumulate + 1 [2 3 4 ]) # -> @[3 6 10] (math/random ) # 0.487181 (os/mkdir "templates" )
# => creates ./templates directory (buffer/format @"0 - 1 = " "%d" -1 )
# =>
@"0 - 1 = -1" (os/time ) # => 1593838384
(os/date ) # => {:month 6 :dst false :year-day 185 :seconds 8 :minutes 53 :week-day 6 :year 2020 :hours 4 :month-day 3}
(os/mktime (os/date )) # => 1593838390
(map string/from-bytes "Hello, world!" ) # => @["H" "e" "l" "l" "o" "," " " "w" "o" "r" "l" "d" "!"]