diff --git a/extra/bank/bank.factor b/extra/bank/bank.factor index ec39554504..c01b4d4297 100644 --- a/extra/bank/bank.factor +++ b/extra/bank/bank.factor @@ -15,7 +15,7 @@ C: transaction over transactions>> push ; : total ( transactions -- balance ) - 0 [ amount>> + ] reduce ; + [ amount>> ] map-sum ; : balance>> ( account -- balance ) transactions>> total ; diff --git a/extra/benchmark/chameneos-redux/chameneos-redux.factor b/extra/benchmark/chameneos-redux/chameneos-redux.factor index a1f9856e64..bcc0e85620 100644 --- a/extra/benchmark/chameneos-redux/chameneos-redux.factor +++ b/extra/benchmark/chameneos-redux/chameneos-redux.factor @@ -90,7 +90,7 @@ TUPLE: meeting-place count mailbox ; [ drop run-meeting-place ] [ nip [ [ count>> number>string write bl ] [ self-count>> number>text write nl ] bi ] each ] - [ nip 0 [ count>> + ] reduce bl number>chameneos-string print ] + [ nip [ count>> ] map-sum bl number>chameneos-string print ] } 2cleave ; ! 6000000 for shootout, too slow right now diff --git a/extra/benchmark/msgpack/msgpack.factor b/extra/benchmark/msgpack/msgpack.factor index b0b82c9d6d..010839b4f1 100644 --- a/extra/benchmark/msgpack/msgpack.factor +++ b/extra/benchmark/msgpack/msgpack.factor @@ -2,10 +2,10 @@ USING: kernel math math.constants msgpack sequences ; IN: benchmark.msgpack : pack-sum ( seq -- n ) - 0 [ >msgpack msgpack> + ] reduce ; + [ >msgpack msgpack> ] map-sum ; : pack-sum-lengths ( seq -- n ) - 0 [ >msgpack msgpack> length + ] reduce ; + [ >msgpack msgpack> length ] map-sum ; : msgpack-benchmark ( -- ) 500,000 iota pack-sum 124,999,750,000 assert=