User:Iamn00b/Sandbox

From Esolang
Jump to navigation Jump to search

WIP stack esolang no. 1

Fibonacci sequence

Infinite

0 1 [.d@ + .x(-1) .o]

nth number

var 1 (prints only the nth number)
0 1 .iv| (@(-1)>1)[.d(1,2) + .x(-2) 1v| -(-1,-2)v|] .o
var 2 (prints the entire sequence up to the nth number)
0 1 .iv| (@(-1)>1)[.d(1,2) + .x(-2) 1v| -(-1,-2)v| .o]