开发者

Scheme Pair's help

开发者 https://www.devze.com 2023-01-21 08:34 出处:网络
How can you go from (5 . 2开发者_高级运维) to (5 2) ??Is this what you\'re looking for? (define (pair-to-list pp)

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

精彩评论

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