math.statistics: just use accumulate for now.

db4
John Benediktsson 2012-12-04 08:56:21 -08:00
parent 61ae9cab75
commit 82dc0bf045
2 changed files with 1 additions and 5 deletions

View File

@ -255,7 +255,6 @@ ARTICLE: "cumulative" "Computing cumulative sequences"
"Cumulative mapping combinators:" "Cumulative mapping combinators:"
{ $subsections { $subsections
cum-map cum-map
cum-map0
} }
"Cumulative math:" "Cumulative math:"
{ $subsections { $subsections

View File

@ -336,14 +336,11 @@ ALIAS: std sample-std
: cum-map ( seq identity quot -- seq' ) : cum-map ( seq identity quot -- seq' )
swapd [ dup ] compose map nip ; inline swapd [ dup ] compose map nip ; inline
: cum-map0 ( seq identity quot -- seq' )
accumulate nip ; inline
: cum-sum ( seq -- seq' ) : cum-sum ( seq -- seq' )
0 [ + ] cum-map ; 0 [ + ] cum-map ;
: cum-sum0 ( seq -- seq' ) : cum-sum0 ( seq -- seq' )
0 [ + ] cum-map0 ; 0 [ + ] accumulate nip ;
: cum-product ( seq -- seq' ) : cum-product ( seq -- seq' )
1 [ * ] cum-map ; 1 [ * ] cum-map ;