Fuzion Logo
fuzion-lang.dev — The Fuzion Language Portal
»

scan

list.scan

(m Monoid list.A)
 => 
list list.A
[Redefinition of  Sequence.scan]
[Contains abstract features]
map this Sequence to a list that contains the result of folding
all prefixes using the given monoid.

e.g., for a Sequence of i32 s, s.scan i32.sum creates a list of
partial sums (0..).map x->(s.take x).fold i32.sum

redefines:

0.094dev (2025-06-18 15:08:51 GIT hash 89cffc23ae669b0898a5564fefbf793fcb8e5ca7 built by fridi@fzen)