SketchyLISP Reference |
Copyright (C) 2006 Nils M Holm |
<<[list] | [Index] | [list-tail]>> |
Conformance: R5RS
Purpose: Extract the n'th member of a list. The first element is at position 0.
Arguments:
X - list
N - position of member to extract
Implementation:
(define (list-ref x n) (car (list-tail x n)))
Example:
(list-ref '(a b c d e f) 2) => c
See also:
caar,
append,
list-tail.
<<[list] | [Index] | [list-tail]>> |