def to_list(collection):
    """:yaql:toList

    Returns collection converted to list.

    :signature: collection.toList()
    :receiverArg collection: collection to be converted
    :argType collection: iterable
    :returnType: list

    .. code::

        yaql> range(0, 3).toList()
        [0, 1, 2]
    """
    return list(collection)