Data update

This commit is contained in:
Ingy döt Net 2026-02-01 16:33:20 -08:00
parent 5150844a7d
commit 4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions

View file

@ -1,15 +0,0 @@
static function fib(steps:Int, handler:Int->Void)
{
var current = 0;
var next = 1;
for (i in 1...steps)
{
handler(current);
var temp = current + next;
current = next;
next = temp;
}
handler(current);
}

View file

@ -1,19 +0,0 @@
class FibIter
{
private var current = 0;
private var nextItem = 1;
private var limit:Int;
public function new(limit) this.limit = limit;
public function hasNext() return limit > 0;
public function next() {
limit--;
var ret = current;
var temp = current + nextItem;
current = nextItem;
nextItem = temp;
return ret;
}
}

View file

@ -1,2 +0,0 @@
for (i in new FibIter(10))
Sys.println(i);