Make DMdA's fold more robust.

This commit is contained in:
Mike Sperber 2011-01-15 13:07:33 +01:00
parent 4ffb16905e
commit 894c531f6c

View File

@ -429,7 +429,15 @@
((empty? lis) unit)
((pair? lis)
(combine (first lis)
(fold unit combine (rest lis)))))))
(fold unit combine (rest lis))))
(else
(raise
(make-exn:fail:contract
(string->immutable-string
(format "Argument zu fold keine Liste, sondern ~e; andere Argumente: ~e ~e"
lis
unit combine))
(current-continuation-marks)))))))
;; This is copied from collects/lang/private/beginner-funs.ss
;; Test-suite support (require is really an effect