simple question

Discussion of Scheme and Racket
Post Reply
dsjoka
Posts: 14
Joined: Thu Feb 10, 2011 1:30 pm

simple question

Post by dsjoka » Thu Feb 10, 2011 1:38 pm

Hi,

I have maybe 1 day of scheme/lisp experience, and glad I found this forum.

I have a simple question.

Ok I know theres a null for detecting an empty list. However I have no idea how to find how many elements in a list. ie: (a) would return 1. Is there like a count function?

Thanks.

nuntius
Posts: 538
Joined: Sat Aug 09, 2008 10:44 am
Location: Newton, MA

Re: simple question

Post by nuntius » Thu Feb 10, 2011 2:18 pm

This function is called "length" in both Common Lisp and Scheme.

Post Reply