SketchyLISP Reference |
Copyright (C) 2007 Nils M Holm |
<<[list] | [Index] | [list-tail]>> |
Conformance: R5RS Scheme
Purpose: Extract a member at a given offset from 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]>> |