]> gitweb.factorcode.org Git - factor.git/commitdiff
math.statistics: empty-sequence is silly.
authorJohn Benediktsson <mrjbq7@gmail.com>
Thu, 27 Sep 2012 00:09:23 +0000 (17:09 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Thu, 27 Sep 2012 00:09:23 +0000 (17:09 -0700)
basis/math/statistics/statistics.factor

index c610e2a64514ac54d7279477c27c81633946e961..96868680ea07944bcf20d80ba7710d9869060ac9 100644 (file)
@@ -240,14 +240,8 @@ PRIVATE>
     histogram >alist
     [ ] [ [ [ second ] bi@ > ] most ] map-reduce first ;
 
-ERROR: empty-sequence ;
-
 : minmax ( seq -- min max )
-    [
-        empty-sequence
-    ] [
-        [ first dup ] keep [ [ min ] [ max ] bi-curry bi* ] each
-    ] if-empty ;
+    [ first dup ] keep [ [ min ] [ max ] bi-curry bi* ] each ;
 
 : range ( seq -- x )
     minmax swap - ;