アットウィキロゴ

count

count

function

Usage: (count coll)

原文http://clojure.github.com/clojure/clojure.core-api.html#clojure.core/count

Returns the number of items in the collection. (count nil) returns

0. Also works on strings, arrays, and Java Collections and Maps

Added in Clojure version 1.0

コレクションの要素数を返す。

nil に対しては、0を返す。

(count nil)

> 0

文字列(strings)、配列(arrays)およびJavaのコレクションやMapに対しても同様に動作する。

最終更新:2012年04月19日 23:46