math.statistics: empty-sequence is silly.

db4
John Benediktsson 2012-09-26 17:09:23 -07:00
parent c5c74aa59c
commit 13f101bd2b
1 changed files with 1 additions and 7 deletions

View 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 - ;