JanetDocsPlaygroundI'm feeling luckyGitHub sign in

tuple/type



    cfunction
    src/core/tuple.c on line 86, column 1

    (tuple/type tup)

    Checks how the tuple was constructed. Will return the keyword 
    :brackets if the tuple was parsed with brackets, and :parens 
    otherwise. The two types of tuples will behave the same most of the 
    time, but will print differently and be treated differently by the 
    compiler.


1 exampleSign in to add an example
Loading...
[1 2 3]               # => (1 2 3)
(tuple/type [1 2 3])  # => :parens

(tuple/brackets 1 2 3)               # => [1 2 3]
(tuple/type (tuple/brackets 1 2 3))  # => :brackets
cellularmitosisPlayground