8 lines
135 B
Chapel
8 lines
135 B
Chapel
iter fib() {
|
|
var a = 0, b = 1;
|
|
|
|
while true {
|
|
yield a;
|
|
(a, b) = (b, b + a);
|
|
}
|
|
}
|