JanetDocsSign in with Github

table



    cfunction

    (table & kvs)
    
    Creates a new table from a variadic number of keys and values. kvs is
    a sequence k1, v1, k2, v2, k3, v3, ... If kvs has an odd number of
    elements, an error will be thrown. Returns the new table.


2 examplesSign in to add an example
Loading...
(table ;(kvs (struct :a 1 :b 2))) # => @{:a 1 :b 2}
sogaiu
(table ;[:a 1 :b 2 :c 3]) # => @{:a 1 :b 2 :c 3}
sogaiu