Welcome, I'm happy to see you here! Feel free to pick a function and add a happy example, the more the merrier!
(merge {:a 1 :b 2 }
{:c 3 :a 4 })
# -> @{:c 3 :a 4 :b 2} (def a @[1 2 ])
(def b @[1 2 ])
(= a b ) # => false
(def a @[1 2 ])
(def b (array/concat a 3 ))
a # => @[1 2 3]
b # => @[1 2 3]
(= a b ) # => true
(reduce string "ha" ["ha" "ha" "ha" "ha" ]) # => "hahahahaha"
(accumulate string "ha" ["ha" "ha" "ha" "ha" ]) # => @["haha" "hahaha" "hahahaha" "hahahahaha"] (dyn 'defn )
# => @{:source-map ("boot.janet" 12 1) :value <function defn> :doc "(defn name & more)\n\nDefine a function. Equivalent to (def name (fn name [args] ...))." :macro true}
(def kvpairs [[:x 1 ] [:y 2 ]])
(table ;(flatten kvpairs )) # => @{:x 1 :y 2} (empty? : )
# => true (repeat 3 (print "HO" ))
# => prints
# HO
# HO
# HO
# sh/$'s contents are quasiquoted, allowing direct or string arguments
# so you need to unquote , variables:
(def out (file/open "trust-db.txt" :w ))
(sh/$ "gpg" "--export-ownertrust" > ,out ) # > requires an opened file object
(file/close out )
# note how > requires an opened file object
(with [out (file/open "trust-db.txt" :w )]
(sh/$ gpg --export-ownertrust > ,out ))(string/trimr " foo " ) # => " foo"
(string/trimr "_!_foo_!_" "_!" ) # => "_!_foo" (def a @[23 42 ])
(array/clear a )
(pp a )
# => prints @[] (eachk k {:a "a val" :b "b val" :c "c val" } (print k ))
# prints c
# prints a
# prints b (get (os/environ ) "HOME" ) # => "/Users/cell"
(os/getenv "HOME" ) # => "/Users/cell"
(peg/find-all ~(capture (range "09" ))
"hi 0 bye 1" )
# => @[3 9] (string/join @["alice" "bob" "eve" ] "\t" )
# => "alice\tbob\teve" (unmarshal @"hello world!" ) # => 104