Wednesday, November 6, 2024
HomeComputer programmingScheme: Using cdr

Scheme: Using cdr

In Scheme, cdr simply displays everything 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: [email protected]
-William. § (marvin_gohan)

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

LATEST REVIEWS

Recent Comments

error: Content is protected !!