开发者

Scheme Pair's help

How can you go from (5 . 2开发者_高级运维) to (5 2) ??


Is this what you're looking for?

(define (pair-to-list pp)
    (list (car pp) (cdr pp)))

(pair-to-list '(5 . 2))
(pair-to-list (cons 5 2))
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜