Scheme - use car to display the first element of list
This is a simple demonstration of the car feature in scheme. The car command simply displays the first element of a list, no matter what it is, be it a character, symbol, int, or even another list. This is useful for streams later on.
(define a (list 1 2 3))
(write car a);prints 1
Questions/Comments: william_a_wilson@hotmail.com
-William. § (marvin_gohan)






Add New Comment
Viewing 2 Comments
Thanks. Your comment is awaiting approval by a moderator.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Add New Comment