JanetDocsPlaygroundI'm feeling luckyGitHub sign in

truthy?



    function
    boot.janet on line 111, column 1

    (truthy? x)

    Check if x is truthy.


See also:true?1 exampleSign in to add an example
Loading...
(map truthy? [ nil   false true  0     1     'a    :a    "a"   []    {}    (fn []) ])
# =>        @[ false false true  true  true  true  true  true  true  true  true    ]

# note that 'not' works as an implementation of 'falsey?'
(map not     [ nil   false true  0     1     'a    :a    "a"   []    {}    (fn []) ])
# =>        @[ true  true  false false false false false false false false false   ]
cellularmitosisPlayground