diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2021-12-20 23:05:05 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2021-12-20 23:05:05 +0100 |
commit | 660f0ccb6b7e6fff8a6d870b720b5bd0dd6898a4 (patch) | |
tree | bb30787470a97a55a6bc3a36fee9930e5dd75442 /module | |
parent | Merge Javascript rewrite. (diff) | |
download | calp-660f0ccb6b7e6fff8a6d870b720b5bd0dd6898a4.tar.gz calp-660f0ccb6b7e6fff8a6d870b720b5bd0dd6898a4.tar.xz |
find-extreme on empty list now an error.
Diffstat (limited to '')
-rw-r--r-- | module/calp/util.scm | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/module/calp/util.scm b/module/calp/util.scm index 96ca2f01..6cee1b0f 100644 --- a/module/calp/util.scm +++ b/module/calp/util.scm @@ -252,8 +252,7 @@ ;; Ord b => (list a) [, (b, b -> bool), (a -> b)] -> a, (list a) (define*-public (find-extreme items optional: (< <) (access identity)) (if (null? items) - ;; Vad fan retunerar man här? - (values #f '()) + (error "Can't find extreme in an empty list") (fold-values (lambda (c min other) (if (< (access c) (access min)) |