aboutsummaryrefslogtreecommitdiff
path: root/module
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2021-12-20 23:05:05 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2021-12-20 23:05:05 +0100
commit660f0ccb6b7e6fff8a6d870b720b5bd0dd6898a4 (patch)
treebb30787470a97a55a6bc3a36fee9930e5dd75442 /module
parentMerge Javascript rewrite. (diff)
downloadcalp-660f0ccb6b7e6fff8a6d870b720b5bd0dd6898a4.tar.gz
calp-660f0ccb6b7e6fff8a6d870b720b5bd0dd6898a4.tar.xz
find-extreme on empty list now an error.
Diffstat (limited to 'module')
-rw-r--r--module/calp/util.scm3
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))