Method that returns List of size n in Shapeless

Viewed 556

Is it possible to make the following code work?

def zeroTo[N <: Nat]:Sized[List[Int], N] = {
  new Sized[List[Int], N](List.iterate(0, toInt[N])(1+)) {
    type A = Int
  }
}

I get a compile error saying "could not find implicit value for parameter toIntN: shapeless.ToInt[N]".

1 Answers
Related