n
リストの最初の要素を返す方法は? ここに私が持っているものがあります:
(define returns(lambda (list n)
(cond ((null? list) '())
(((!= (0) n) (- n 1)) (car list) (cons (car list) (returns (cdr list) n)))
(else '()))))
例:
(returns '(5 4 5 2 1) 2)
(5 4)
(returns '(5 4 5 2 1) 3)
(5 4 5)