|
|
|
|
|
by psykotic
5207 days ago
|
|
That's a matter of perspective. Folds and scans exist for all regular data types, not only arrays, so I consider this a part of functional programming and type theory. Here he is computing the history of states of a random walk as scan (*) initial updates. If you wanted to simulate branching random walks, you'd work over the data type of multiway trees instead of arrays, but the algorithm to compute the history of intermediate states would otherwise be identical, using the scan function for multiway trees. |
|