More actions
imported>linflus No edit summary |
(Repair MoniWiki formatting after migration) |
||
| (3 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
Implementing Infinite Data Structure in JavaScript. | Implementing Infinite Data Structure in [[JavaScript]]. | ||
== 11/26 == | == 11/26 == | ||
* naturalSequence().filter(limit(n)).reduce(sum) | * | ||
** sum(a, b) := a + b | naturalSequence().filter(limit(n)).reduce(sum) | ||
** limit(n)(a) := (n | ** | ||
** .reduce(f(a, b)) := f(seq | sum(a, b) := a + b | ||
** filter(f(a)) := for each a in seq, sequence of a which f(a) is true. | ** | ||
limit(n)(a) := (n >= a) | |||
** | |||
.reduce(f(a, b)) := f(seq[:last-1].reduce(f), seq[last]) | |||
** | |||
filter(f(a)) := for each a in seq, sequence of a which f(a) is true. | |||
Latest revision as of 00:34, 29 March 2026
Implementing Infinite Data Structure in JavaScript.
11/26
naturalSequence().filter(limit(n)).reduce(sum)
sum(a, b) := a + b
limit(n)(a) := (n >= a)
.reduce(f(a, b)) := f(seq[:last-1].reduce(f), seq[last])
filter(f(a)) := for each a in seq, sequence of a which f(a) is true.