From 3901c32a7b8931013f916964330c942fdb6f02a1 Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Fri, 17 Apr 2015 22:05:30 -0400 Subject: [PATCH] Cleanup --- TODO | 2 -- icyc.scm | 16 +++++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/TODO b/TODO index 0f8d85d7..fc78d185 100644 --- a/TODO +++ b/TODO @@ -1,7 +1,5 @@ Working TODO list: - - need to cleanup ex handler output in icyc.scm - - Fixup Cyc_sum to use varargs and call (error) if anything bad happens. then generalize to - * / - need an error() function that will call (error) from the C runtime useful for, EG, type checking diff --git a/icyc.scm b/icyc.scm index 26525a05..69df03a9 100644 --- a/icyc.scm +++ b/icyc.scm @@ -15,13 +15,15 @@ (with-exception-handler (lambda (obj) (display "Error: ") - (display obj) - ; TODO: if list, do this instead: - ;(for-each - ; (lambda (o) - ; (display o) - ; (display " ")) - ; obj) + (cond + ((pair? obj) + (for-each + (lambda (o) + (display o) + (display " ")) + obj)) + (else + (display obj))) (display "\n") (k #t)) (lambda ()