On Wed, Jan 28, 2009 at 6:17 PM, Peter Wolf wrote:
>
> How about this? Needlessly wordy to make it more search-able...
>
> clojure.core/count
> ([coll])
> Returns the length of a list or vector, the number of keys in a map,
> the size of a string, or the number of items in a sequence or
> colle
How about this? Needlessly wordy to make it more search-able...
clojure.core/count
([coll])
Returns the length of a list or vector, the number of keys in a map,
the size of a string, or the number of items in a sequence or
collection. (count nil) returns 0. Also works on Java Collections a
On Jan 28, 2:19 pm, Chouser wrote:
> On Wed, Jan 28, 2009 at 2:15 PM, Peter Wolf wrote:
>
> > How do I get the length of a sequence? Is there some generic way to
> > find the number of elements in something that might be list, map, vector
> > or lazy?
>
> user=> (doc count)
>
Thanks guys! I knew I could 'count' on you ;-)
Chouser wrote:
> On Wed, Jan 28, 2009 at 2:15 PM, Peter Wolf wrote:
>
>> How do I get the length of a sequence? Is there some generic way to
>> find the number of elements in something that might be list, map, vector
>> or lazy?
>>
>
> use
(doc count)
-
clojure.core/count
([coll])
Returns the number of items in the collection. (count nil) returns
0. Also works on strings, arrays, and Java Collections and Maps
nil
On Wed, Jan 28, 2009 at 11:15 AM, Peter Wolf wrote:
>
> Here's a dumb question, but I can
On Wed, Jan 28, 2009 at 2:15 PM, Peter Wolf wrote:
>
> How do I get the length of a sequence? Is there some generic way to
> find the number of elements in something that might be list, map, vector
> or lazy?
user=> (doc count)
-
clojure.core/count
([coll])
Returns the
Here's a dumb question, but I can't find it in the docs:
How do I get the length of a sequence? Is there some generic way to
find the number of elements in something that might be list, map, vector
or lazy?
There must be some sort of built in function, or an idiom
Thanks
P
--~--~-~-