iota function

IList<int> iota(
  1. int n
)

Implementation

IList<int> iota(int n) {
  Trampoline<IList<int>> go(int i, IList<int> result) => i > 0 ? tcall(() => go(i-1, new Cons(i-1, result))) : treturn(result);
  return go(n, nil()).run();
}