Welcome, I'm happy to see you here! Feel free to pick a function and add a happy example, the more the merrier!
$ # trivial server which echo's to the console.
$ cat > srv.janet << EOF
#!/usr/bin/env janet
(defn handle-conn [conn ]
(print "new connection" )
(while true
(def data (net/read conn 4096 ))
(if (not data ) (break ))
(prin data ))
(net/close conn )
(print "connection closed" ))
(print "starting server on 0.0.0.0:1234" )
(net/server "0.0.0.0" 1234 handle-conn )
EOF
$ chmod +x srv.janet
$ ./srv.janet
----
$ # in another terminal:
$ echo hello | nc 0.0.0.0 1234
(math/exp2 8 ) # => 256
(apply * [1 2 3 ]) # -> 6
(* (splice [1 2 3 ])) # -> 6
(* ;[1 2 3 ]) # -> 6
(* 1 2 3 ) # -> 6 (forv i 0 10
(print "hello" ))
# => hello
# => hello
# => hello
# => hello
# => hello
# => hello
# => hello
# => hello
# => hello
# => hello
# => nil
(def f (ev/spawn 4 ))
(ev/sleep 0.0001 ) # give ev a chance in the REPL, remove in file
(fiber/last-value f ) # => 4
(def ds @[@{:a 1 :b 2 }
@{:a 8 :b 9 }])
(defn thrice [x ] (* x 3 ))
(update-in ds [0 :b ] thrice )
# `ds` is now
@[@{:a 1 :b 6 }
@{:a 8 :b 9 }](var enabled false )
(toggle enabled )
(print enabled )
# => true (as?-> [1 2 3 ] _
(sum _ )
(when (> 6 _ ) _ ))
# => nil
(as?-> [1 2 3 ] _
(sum _ )
(when (>= 6 _ ) _ ))
# => 6
(unmarshal @"hello world!" ) # => 104
(map true? [ true nil false 0 1 42 'a :a "a" [97 ] {:a 42 } (fn []) ])
# => @[ true false false false false false false false false false false false ]
# Map over multiple structures -- Stops after the shortest is exhausted.
(map (fn [& args ] ;args ) [1 ] [1 2 ] [1 2 3 ])
# => @[(1 1 1)] (< ) # -> true
(< 1 ) # -> true
(< 1 2 ) # -> true
(< 2 1 ) # -> false
(< 1 2 3 ) # -> true
(< 1 3 2 ) # -> false
(defn capitalize [str ]
(string (string/ascii-upper (string/slice str 0 1 )) (string/slice str 1 )))(buffer/bit @"1" 0 )
# => true
(map type [nil true 42 [] @[] {} @{} "a" @"b" 'c :d identity (fn [])])
# => @[:nil :boolean :number :tuple :array :struct :table :string :buffer :symbol :keyword :function :function]