Length of an SLIst ?
Justin Whear
justin at economicmodeling.com
Mon Apr 2 13:46:43 PDT 2012
On Mon, 02 Apr 2012 22:42:23 +0200, Chris Pons wrote:
> I'm trying to find the length of a Slist. I've tried using the built in
> .length function but it generates this error: "Error: no property
> 'length' for type 'SList!(Node)'". Are there any other built in ways to
> find the length?
Classic singly-linked lists must be iterated to determine length, so use
std.range.walkLength on it.
More information about the Digitalmars-d-learn
mailing list