Scheme – using cdr

Contributor Icon Contributed by William_Wilson  
Tag Icon Tagged: Computer programming  

In Scheme, cdr simply displays all but the first element of a list, no matter what it is, be it a character, symbol, int, or even several lists or any combination. This is also useful for streams later on. This Tech-Recipe shows a simple demostration of the cdr feature in scheme.



(define a (list 1 2 3))
(write (cdr a));writes (2 3)

Questions/Comments: william_a_wilson@hotmail.com
-William. ยง (marvin_gohan)

 

1 Comment -


  1. WebMax said on June 1, 2009

    Thanks for that.

 

RSS feed for comments on this post. TrackBack URL

Leave a comment -