灯下 登录
计算机科学 / SICP / 2.2.1 Representing Sequences

Exercise 2.17 · 习题

Exercise 2.17: Define a procedure
last-pair that returns the list that contains only the last element of a
given (nonempty) list:

(last-pair (list 23 72 149 34))

(34)

练习 2.17:定义过程 last-pair,它返回只包含给定(非空)表中最后一个元素的表:

(last-pair (list 23 72 149 34))
(34)

Racket #lang sicp
(last-pair (list 23 72 149 34))
(34)