templates nthFibonacci @: {n0: 0"1", n1: 1"1"}; def sign: $ -> \(<0..> 1! <> -1!\); 1..$*$sign -> $sign -> # $@.n0! <=1> @: {n0: $@.n1, n1: $@.n0 + $@.n1}; <=-1> @: {n0: $@.n1 - $@.n0, n1: $@.n0}; end nthFibonacci