Welcome, I'm happy to see you here! Feel free to pick a function and add a happy example, the more the merrier!
(apply * [1 2 3 ]) # -> 6
(* (splice [1 2 3 ])) # -> 6
(* ;[1 2 3 ]) # -> 6
(* 1 2 3 ) # -> 6 (os/realpath "." ) # => "/home/jgarte"
(os/realpath "Downloads" ) # => "/home/jgarte/Downloads" (describe @[:a :b ]) # => "<array 0x55EC375CF440>" $ janet -e '(os/exit 42 )' ; echo $?
42
(pp (all-bindings ))
# => prints @[% %= * ... yield zero? zipcoll]
(def a "A" )
(pp (all-bindings (curenv ) true ))
# => prints @[_ a] - only local bindings are listed (drop 1 "smile" )
# => "mile"
(as?-> [1 2 3 ] _
(sum _ )
(when (> 6 _ ) _ ))
# => nil
(as?-> [1 2 3 ] _
(sum _ )
(when (>= 6 _ ) _ ))
# => 6
(range 12 ) # => @[0 1 2 3 4 5 6 7 8 9 10 11]
(range 0 12 ) # => @[0 1 2 3 4 5 6 7 8 9 10 11]
(range 0 12 1 ) # => @[0 1 2 3 4 5 6 7 8 9 10 11]
(range 0 12 2 ) # => @[0 2 4 6 8 10]
(range 0 12 3 ) # => @[0 3 6 9]
(range 0 12 4 ) # => @[0 4 8]
(range 0 12 6 ) # => @[0 6]
(map math/abs [-2.9 -2.1 2.1 2.9 ]) # => @[ 2.9 2.1 2.1 2.9 ]
(map math/floor [-2.9 -2.1 2.1 2.9 ]) # => @[ -3 -3 2 2 ]
(map math/ceil [-2.9 -2.1 2.1 2.9 ]) # => @[ -2 -2 3 3 ]
(map math/round [-2.9 -2.1 2.1 2.9 ]) # => @[ -3 -2 2 3 ]
(map math/trunc [-2.9 -2.1 2.1 2.9 ]) # => @[ -2 -2 2 2 ]
(def f (generate [i :range [0 5 ]] (+ i i )))
(print (fiber/status f ))
(print (resume f ))
(print (resume f ))
(print (resume f ))
(print (resume f ))
(print (resume f ))
(print (fiber/status f )) # -> :pending
(print (resume f ))
(print (fiber/status f )) # -> :dead
# :new
# 0
# 2
# 4
# 6
# 8
# :pending
#
# :dead (take-while number?
(fiber/new
|(each x [1 2 3 :hi ]
(yield x ))))
# => @[1 2 3] (buffer/bit (buffer/new-filled 1 48 ) 4 )
# => true
(def a @[1 2 ])
(array/pop a ) # => 2
a # => @[1]
(array/pop a ) # => 1
a # => @[]
(array/pop a ) # => nil
a # => @[]
(map |($ {:a 7 :b 8 } ) [ keys values kvs pairs ])
# => @[ @[:a :b] @[7 8] @[:a 7 :b 8] @[(:a 7) (:b 8)] ]
(map |($ [4 5 6 ] ) [ keys values kvs pairs ])
# => @[ @[0 1 2] @[4 5 6] @[0 4 1 5 2 6] @[(0 4) (1 5) (2 6)] ]
(map |($ 'ab ) [ keys values kvs pairs ])
# => @[ @[0 1] @[97 98] @[0 97 1 98] @[(0 97) (1 98)] ]
(map |($ :ab ) [ keys values kvs pairs ])
# => @[ @[0 1] @[97 98] @[0 97 1 98] @[(0 97) (1 98)] ]
(map |($ "ab" ) [ keys values kvs pairs ])
# => @[ @[0 1] @[97 98] @[0 97 1 98] @[(0 97) (1 98)] ]
(one? 1 ) # => true
(map one? [0 1 2 ]) # => @[false true false]
(one? (math/next 1 math/inf )) # => false