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

scan

list.scan

(T 
type
, a T, f Binary T T list.A)
 => 
Sequence T
[Redefinition of  Sequence.scan]
[Contains abstract features]
map this list to a list that contains the result of folding
all prefixes using the given function and initial value.

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

redefines:

Type Parameters

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