diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-05-11 17:43:02 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-05-11 17:43:02 +0200 |
commit | 9af6df0d38be878b04b44ca42fe9aa5a1c55231d (patch) | |
tree | 50f9fd8faeef7eb9348e00f50b0121c3c0200364 /module/util | |
parent | Add ~3 to datetime->string. (diff) | |
download | calp-9af6df0d38be878b04b44ca42fe9aa5a1c55231d.tar.gz calp-9af6df0d38be878b04b44ca42fe9aa5a1c55231d.tar.xz |
Simplify prettify-tree of util/exceptions.
Diffstat (limited to '')
-rw-r--r-- | module/util/exceptions.scm | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/module/util/exceptions.scm b/module/util/exceptions.scm index 4673b182..d45fb641 100644 --- a/module/util/exceptions.scm +++ b/module/util/exceptions.scm @@ -55,12 +55,9 @@ (define (prettify-tree tree) - (cond [(null? tree) '()] - [(pair? tree) (cons (prettify-tree (car tree)) + (cond [(pair? tree) (cons (prettify-tree (car tree)) (prettify-tree (cdr tree)))] - [(list? tree) (map prettify-tree tree)] - [(and (procedure? tree) - (procedure-name tree)) + [(and (procedure? tree) (procedure-name tree)) => identity] [else tree])) |