Esempio n. 1
0
 private static TailCall<Tuple<List<Double>, RNG>> doublesHelper(
     int count, RNG rng, List<Double> xs) {
   Tuple<Double, RNG> t1 = doubleRnd(rng);
   return TailCall.sus(() -> doubles(count - 1, t1._2, xs.cons(t1._1)));
 }
Esempio n. 2
0
 private static TailCall<Tuple<List<Integer>, RNG>> ints2Helper(
     int count, RNG rng, List<Integer> xs) {
   Tuple<Integer, RNG> t1 = rng.nextInt();
   return TailCall.sus(() -> ints2(count - 1, t1._2, xs.cons(t1._1)));
 }