list-ref
-- r7rs
Definition accessor
;
list-ref-car
(from vonuvoli
);Procedure variants:
((list-not-null range-offset) -> (any))
list-not-null
;range-offset
;any
;scheme:base
-- (scheme base)
;scheme
-- (scheme)
;(list-ref list k)
Domain: The
list
argument can be circular, but it is an error iflist
has fewer thank
elements.Returns the
k
th element oflist
. (This is the same as the car of(list-tail list k)
.)(list-ref '(a b c d) 2) ===> c (list-ref '(a b c d) (exact (round 1.8))) ===> c
The text herein was sourced and adapted as described in the "R7RS attribution of various text snippets" appendix.