1
让说我有以下列表:获得两个列表出来一个清单
(list '("a" 2) '("b" 1) '("c" 'end))
我想两个列表出来的第一个列表,输出:
(list "a" "b" "c") and (list 2 1 'end)
我如何在Racket中做到这一点?
我想出了这样的事情:
(define first (mlist))
(define second (mlist))
(define (get-two-lists l)
(for ([i t])
(mappend! first (list-ref i 0))
(mappend! second (list-ref i 1))))
输出给我空单..
这很好!谢谢 – Bun