public static Trampoline<Integer> loop(int times, int prod) {
    if (times == 0) {
      return Trampoline.done(prod);
    } else {
      return Trampoline.more(() -> loop(times - 1, prod * times));
    }
  }
@Test
  void testTrampolineWithFactorialFunction() {
    long result = TrampolineApp.loop(10, 1).result();
    assertEquals(3_628_800, result);
  }