length

Name

length -- Return the length of a list.

Type: function

Synopsis

length( l, n);

Arguments

l

An instance of <list>

Return Values

n

An instance of <fixnum>

Description

Computes the length of a well-structured list. Signals an error if l is an acyclic improper list. Never returns if l is cyclic.[1]

Notes

[1]

For overall consistency, it would probably be better if length simply returned the amount of the proper part of an acyclic list. That way, the Dylan definition for map would be known to iterate (min (length l) ...) times.