Returns the number of elements in the collection. Default method iterates over
the collection to calculate the size, which is not very efficient
and may diverge if the collection is infinite.
Some collection classes overload the method for faster calculation.
Returns either the size of the collection, or a promise to
calculate it. The intent of this method is to avoid
size calculation if it is expensive. In some cases, the caller
wants to have size just for optimization, and it is not desirable
to spend time to calculate the size. Such caller uses this method
and just discards the information if it is a promise.
Generic function:coerce-toclass coll
Convert a collection coll to another collection
which is an instance of class.
If coll is a sequence and class is a sequence class,
the order is preserved.