Sequence
This example demonstrates that a Generator produces a deterministic sequence of values. Each call to NextInt() returns the next value in the sequence.
Expected Output
<value_1><value_2><value_3>Outputs three consecutive values from the deterministic sequence. The same seed always produces the same three values in the same order.
Source Codes
package main
import "github.com/pseudata/pseudata"
func main() { gen := pseudata.NewGenerator(42, 0)
println(gen.NextInt()) println(gen.NextInt()) println(gen.NextInt())}import dev.pseudata.Generator;
public class Main { public static void main(String[] args) { Generator gen = new Generator(42, 0);
System.out.println(gen.nextInt()); System.out.println(gen.nextInt()); System.out.println(gen.nextInt()); }}from pseudata import Generator
gen = Generator(42, 0)
print(gen.next_int())print(gen.next_int())print(gen.next_int())import { Generator } from "@pseudata/core";
const gen = new Generator(42, 0);
console.log(gen.nextInt());console.log(gen.nextInt());console.log(gen.nextInt());© 2025 Pseudata Project. Open Source under Apache License 2.0. · RSS Feed