.
original commit: e0e63aacee7cb842635077a88d4f87aef0c54ed2
This commit is contained in:
parent
53e9c04130
commit
da9689d146
|
@ -318,9 +318,10 @@
|
|||
(polymorphic
|
||||
(lambda (l)
|
||||
(if (pair? l)
|
||||
(if (pair? (cdr l))
|
||||
(last-pair (cdr l))
|
||||
l)
|
||||
(let loop ((l l) (x (cdr l)))
|
||||
(if (pair? x)
|
||||
(loop x (cdr x))
|
||||
l))
|
||||
(raise-type-error 'last-pair "pair" l)))))
|
||||
|
||||
(define cons? (lambda (x) (pair? x)))
|
||||
|
|
Loading…
Reference in New Issue
Block a user