JanetDocsSourcePlaygroundTutorialsI'm Feeling luckyCommunityGitHub sign in

length

core-api


    function

    (length x)

    Returns the length or count of `x` as an integer. Returns are 
    guaranteed to be in constant time except for abstract types. For 
    dictionaries, returns the number of key-value pairs.

    `x` can be a bytes, indexed, dictionary, or abstract type with a 
    suitable `length` method.


1 exampleSign in to add an example
Loading...
(map length  [  'a  :a  "a"  [97]  @[97]  {0 97}  @{0 97}  ])
# =>        @[  1   1   1    1     1      1       1        ]
cellularmitosisPlayground