# Generators
<span class="source-link">[[Source]](src/pony_check/gen_obj.md#L-0-100)</span>

Convenience combinators and factories for common types of Generators.


```pony
primitive val Generators
```

## Constructors

### create
<span class="source-link">[[Source]](src/pony_check/gen_obj.md#L-0-100)</span>


```pony
new val create()
: Generators val^
```

#### Returns

* [Generators](pony_check-Generators.md) val^

---

## Public Functions

### unit\[T: T\]
<span class="source-link">[[Source]](src/pony_check/gen_obj.md#L-0-105)</span>


Generate a reference to the same value over and over again.


```pony
fun box unit[T: T](
  t: T)
: Generator[box->T] box
```
#### Parameters

*   t: T

#### Returns

* [Generator](pony_check-Generator.md)\[box->T\] box

---

### none\[T: [None](builtin-None.md) val\]
<span class="source-link">[[Source]](src/pony_check/gen_obj.md#L-0-115)</span>


Always generate `None`.


```pony
fun box none[T: None val]()
: Generator[(T | None val)] box
```

#### Returns

* [Generator](pony_check-Generator.md)\[(T | [None](builtin-None.md) val)\] box

---

### repeatedly\[T: T\]
<span class="source-link">[[Source]](src/pony_check/gen_obj.md#L-0-121)</span>


Generate values by calling the lambda `f` repeatedly.

Values generated this way produce zero recorded choices and cannot
be shrunk. Use a generator that draws from `Randomness` when shrinking
matters.


```pony
fun box repeatedly[T: T](
  f: {(): T^ ?}[T] box)
: Generator[T] box
```
#### Parameters

*   f: {(): T^ ?}[T] box

#### Returns

* [Generator](pony_check-Generator.md)\[T\] box

---

### array_of\[T: T\]
<span class="source-link">[[Source]](src/pony_check/gen_obj.md#L-0-134)</span>


Generate an `Array[T]` with size in the range `from` to `to`.
Uses boolean-per-element encoding for shrinking: each element is preceded
by a boolean deciding whether to include it. Shrinking deletes elements
while preserving all others exactly.


```pony
fun box array_of[T: T](
  gen: Generator[T] box,
  from: USize val = 0,
  to: USize val = 100)
: Generator[Array[T] ref] box
```
#### Parameters

*   gen: [Generator](pony_check-Generator.md)\[T\] box
*   from: [USize](builtin-USize.md) val = 0
*   to: [USize](builtin-USize.md) val = 100

#### Returns

* [Generator](pony_check-Generator.md)\[[Array](builtin-Array.md)\[T\] ref\] box

---

### iso_seq_of\[T: [Any](builtin-Any.md) #send, S: [Seq](builtin-Seq.md)\[T\] iso\]
<span class="source-link">[[Source]](src/pony_check/gen_obj.md#L-0-176)</span>


Generate a `Seq[T]` where `T` must be sendable.
Uses boolean-per-element encoding.


```pony
fun box iso_seq_of[T: Any #send, S: Seq[T] iso](
  gen: Generator[T] box,
  from: USize val = 0,
  to: USize val = 100)
: Generator[S] box
```
#### Parameters

*   gen: [Generator](pony_check-Generator.md)\[T\] box
*   from: [USize](builtin-USize.md) val = 0
*   to: [USize](builtin-USize.md) val = 100

#### Returns

* [Generator](pony_check-Generator.md)\[S\] box

---

### seq_of\[T: T, S: [Seq](builtin-Seq.md)\[T\] ref\]
<span class="source-link">[[Source]](src/pony_check/gen_obj.md#L-0-216)</span>


Create a `Seq` from generated values with size in `from` to `to`.
Uses boolean-per-element encoding.


```pony
fun box seq_of[T: T, S: Seq[T] ref](
  gen: Generator[T] box,
  from: USize val = 0,
  to: USize val = 100)
: Generator[S] box
```
#### Parameters

*   gen: [Generator](pony_check-Generator.md)\[T\] box
*   from: [USize](builtin-USize.md) val = 0
*   to: [USize](builtin-USize.md) val = 100

#### Returns

* [Generator](pony_check-Generator.md)\[S\] box

---

### shuffled_array_gen\[T: T\]
<span class="source-link">[[Source]](src/pony_check/gen_obj.md#L-0-256)</span>


Generate an array and shuffle it.


```pony
fun box shuffled_array_gen[T: T](
  gen: Generator[Array[T] ref] box)
: Generator[Array[T] ref] box
```
#### Parameters

*   gen: [Generator](pony_check-Generator.md)\[[Array](builtin-Array.md)\[T\] ref\] box

#### Returns

* [Generator](pony_check-Generator.md)\[[Array](builtin-Array.md)\[T\] ref\] box

---

### shuffled_iter\[T: T\]
<span class="source-link">[[Source]](src/pony_check/gen_obj.md#L-0-272)</span>


Shuffle the elements of the array and return an iterator.


```pony
fun box shuffled_iter[T: T](
  array: Array[T] ref)
: Generator[Iterator[this->T!] ref] box
```
#### Parameters

*   array: [Array](builtin-Array.md)\[T\] ref

#### Returns

* [Generator](pony_check-Generator.md)\[[Iterator](builtin-Iterator.md)\[this->T!\] ref\] box

---

### list_of\[T: T\]
<span class="source-link">[[Source]](src/pony_check/gen_obj.md#L-0-284)</span>


Generate a `List[T]` with size in `from` to `to`.


```pony
fun box list_of[T: T](
  gen: Generator[T] box,
  from: USize val = 0,
  to: USize val = 100)
: Generator[List[T] ref] box
```
#### Parameters

*   gen: [Generator](pony_check-Generator.md)\[T\] box
*   from: [USize](builtin-USize.md) val = 0
*   to: [USize](builtin-USize.md) val = 100

#### Returns

* [Generator](pony_check-Generator.md)\[[List](collections-List.md)\[T\] ref\] box

---

### set_of\[T: ([Hashable](collections-Hashable.md) #read & [Equatable](builtin-Equatable.md)\[T\] #read)\]
<span class="source-link">[[Source]](src/pony_check/gen_obj.md#L-0-295)</span>


Generate a `Set[T]` with elements in `from` to `to`.
Uses boolean-per-element encoding with a stall guard for duplicate
rejection.


```pony
fun box set_of[T: (Hashable #read & Equatable[T] #read)](
  gen: Generator[T] box,
  from: USize val = 0,
  to: USize val = 100)
: Generator[Set[T]] box
```
#### Parameters

*   gen: [Generator](pony_check-Generator.md)\[T\] box
*   from: [USize](builtin-USize.md) val = 0
*   to: [USize](builtin-USize.md) val = 100

#### Returns

* [Generator](pony_check-Generator.md)\[[Set](collections-Set.md)\[T\]\] box

---

### set_is_of\[T: T\]
<span class="source-link">[[Source]](src/pony_check/gen_obj.md#L-0-340)</span>


Generate a `SetIs[T]` with elements in `from` to `to`.


```pony
fun box set_is_of[T: T](
  gen: Generator[T] box,
  from: USize val = 0,
  to: USize val = 100)
: Generator[SetIs[T]] box
```
#### Parameters

*   gen: [Generator](pony_check-Generator.md)\[T\] box
*   from: [USize](builtin-USize.md) val = 0
*   to: [USize](builtin-USize.md) val = 100

#### Returns

* [Generator](pony_check-Generator.md)\[[SetIs](collections-SetIs.md)\[T\]\] box

---

### map_of\[K: ([Hashable](collections-Hashable.md) #read & [Equatable](builtin-Equatable.md)\[K\] #read), V: V\]
<span class="source-link">[[Source]](src/pony_check/gen_obj.md#L-0-382)</span>


Generate a `Map[K, V]` with entries in `from` to `to`.


```pony
fun box map_of[K: (Hashable #read & Equatable[K] #read), V: V](
  gen: Generator[(K , V)] box,
  from: USize val = 0,
  to: USize val = 100)
: Generator[Map[K, V]] box
```
#### Parameters

*   gen: [Generator](pony_check-Generator.md)\[(K , V)\] box
*   from: [USize](builtin-USize.md) val = 0
*   to: [USize](builtin-USize.md) val = 100

#### Returns

* [Generator](pony_check-Generator.md)\[[Map](collections-Map.md)\[K, V\]\] box

---

### map_is_of\[K: K, V: V\]
<span class="source-link">[[Source]](src/pony_check/gen_obj.md#L-0-425)</span>


Generate a `MapIs[K, V]` with entries in `from` to `to`.


```pony
fun box map_is_of[K: K, V: V](
  gen: Generator[(K , V)] box,
  from: USize val = 0,
  to: USize val = 100)
: Generator[MapIs[K, V]] box
```
#### Parameters

*   gen: [Generator](pony_check-Generator.md)\[(K , V)\] box
*   from: [USize](builtin-USize.md) val = 0
*   to: [USize](builtin-USize.md) val = 100

#### Returns

* [Generator](pony_check-Generator.md)\[[MapIs](collections-MapIs.md)\[K, V\]\] box

---

### vec_of\[T: [Any](builtin-Any.md) #share\]
<span class="source-link">[[Source]](src/pony_check/gen_obj.md#L-0-468)</span>


Generate a persistent `Vec[T]` with size in `from` to `to`.


```pony
fun box vec_of[T: Any #share](
  gen: Generator[T] box,
  from: USize val = 0,
  to: USize val = 100)
: Generator[Vec[T] val] box
```
#### Parameters

*   gen: [Generator](pony_check-Generator.md)\[T\] box
*   from: [USize](builtin-USize.md) val = 0
*   to: [USize](builtin-USize.md) val = 100

#### Returns

* [Generator](pony_check-Generator.md)\[[Vec](collections-persistent-Vec.md)\[T\] val\] box

---

### persistent_list_of\[T: [Any](builtin-Any.md) #share\]
<span class="source-link">[[Source]](src/pony_check/gen_obj.md#L-0-506)</span>


Generate a persistent `List[T]` with size in `from` to `to`.


```pony
fun box persistent_list_of[T: Any #share](
  gen: Generator[T] box,
  from: USize val = 0,
  to: USize val = 100)
: Generator[List[T]] box
```
#### Parameters

*   gen: [Generator](pony_check-Generator.md)\[T\] box
*   from: [USize](builtin-USize.md) val = 0
*   to: [USize](builtin-USize.md) val = 100

#### Returns

* [Generator](pony_check-Generator.md)\[[List](collections-persistent-List.md)\[T\]\] box

---

### persistent_set_of\[T: ([Hashable](collections-Hashable.md) val & [Equatable](builtin-Equatable.md)\[T\] val)\]
<span class="source-link">[[Source]](src/pony_check/gen_obj.md#L-0-544)</span>


Generate a persistent `Set[T]` with elements in `from` to `to`.


```pony
fun box persistent_set_of[T: (Hashable val & Equatable[T] val)](
  gen: Generator[T] box,
  from: USize val = 0,
  to: USize val = 100)
: Generator[Set[T]] box
```
#### Parameters

*   gen: [Generator](pony_check-Generator.md)\[T\] box
*   from: [USize](builtin-USize.md) val = 0
*   to: [USize](builtin-USize.md) val = 100

#### Returns

* [Generator](pony_check-Generator.md)\[[Set](collections-persistent-Set.md)\[T\]\] box

---

### persistent_set_is_of\[T: [Any](builtin-Any.md) #share\]
<span class="source-link">[[Source]](src/pony_check/gen_obj.md#L-0-587)</span>


Generate a persistent `SetIs[T]` with elements in `from` to `to`.


```pony
fun box persistent_set_is_of[T: Any #share](
  gen: Generator[T] box,
  from: USize val = 0,
  to: USize val = 100)
: Generator[SetIs[T]] box
```
#### Parameters

*   gen: [Generator](pony_check-Generator.md)\[T\] box
*   from: [USize](builtin-USize.md) val = 0
*   to: [USize](builtin-USize.md) val = 100

#### Returns

* [Generator](pony_check-Generator.md)\[[SetIs](collections-persistent-SetIs.md)\[T\]\] box

---

### persistent_map_of\[K: ([Hashable](collections-Hashable.md) val & [Equatable](builtin-Equatable.md)\[K\] val), V: [Any](builtin-Any.md) #share\]
<span class="source-link">[[Source]](src/pony_check/gen_obj.md#L-0-630)</span>


Generate a persistent `Map[K, V]` with entries in `from` to `to`.


```pony
fun box persistent_map_of[K: (Hashable val & Equatable[K] val), V: Any #share](
  gen: Generator[(K , V)] box,
  from: USize val = 0,
  to: USize val = 100)
: Generator[Map[K, V]] box
```
#### Parameters

*   gen: [Generator](pony_check-Generator.md)\[(K , V)\] box
*   from: [USize](builtin-USize.md) val = 0
*   to: [USize](builtin-USize.md) val = 100

#### Returns

* [Generator](pony_check-Generator.md)\[[Map](collections-persistent-Map.md)\[K, V\]\] box

---

### persistent_map_is_of\[K: [Any](builtin-Any.md) #share, V: [Any](builtin-Any.md) #share\]
<span class="source-link">[[Source]](src/pony_check/gen_obj.md#L-0-675)</span>


Generate a persistent `MapIs[K, V]` with entries in `from` to `to`.


```pony
fun box persistent_map_is_of[K: Any #share, V: Any #share](
  gen: Generator[(K , V)] box,
  from: USize val = 0,
  to: USize val = 100)
: Generator[MapIs[K, V]] box
```
#### Parameters

*   gen: [Generator](pony_check-Generator.md)\[(K , V)\] box
*   from: [USize](builtin-USize.md) val = 0
*   to: [USize](builtin-USize.md) val = 100

#### Returns

* [Generator](pony_check-Generator.md)\[[MapIs](collections-persistent-MapIs.md)\[K, V\]\] box

---

### one_of\[T: T\]
<span class="source-link">[[Source]](src/pony_check/gen_obj.md#L-0-718)</span>


Generate a random value from the given ReadSeq.
Errors if `xs` is empty.


```pony
fun box one_of[T: T](
  xs: ReadSeq[T] box)
: Generator[box->T] box
```
#### Parameters

*   xs: [ReadSeq](builtin-ReadSeq.md)\[T\] box

#### Returns

* [Generator](pony_check-Generator.md)\[box->T\] box

---

### one_of_safe\[T: T\]
<span class="source-link">[[Source]](src/pony_check/gen_obj.md#L-0-729)</span>


Version of `one_of` that errors at construction time if `xs` is empty.


```pony
fun box one_of_safe[T: T](
  xs: ReadSeq[T] box)
: Generator[box->T] box ?
```
#### Parameters

*   xs: [ReadSeq](builtin-ReadSeq.md)\[T\] box

#### Returns

* [Generator](pony_check-Generator.md)\[box->T\] box ?

---

### frequency\[T: T\]
<span class="source-link">[[Source]](src/pony_check/gen_obj.md#L-0-736)</span>


Choose a value from one of the given Generators, weighted by associated
weights.


```pony
fun box frequency[T: T](
  weighted_generators: ReadSeq[WeightedGenerator[T]] box)
: Generator[T] box
```
#### Parameters

*   weighted_generators: [ReadSeq](builtin-ReadSeq.md)\[[WeightedGenerator](pony_check-WeightedGenerator.md)\[T\]\] box

#### Returns

* [Generator](pony_check-Generator.md)\[T\] box

---

### frequency_safe\[T: T\]
<span class="source-link">[[Source]](src/pony_check/gen_obj.md#L-0-771)</span>


Version of `frequency` that errors if the given `weighted_generators` is
empty.


```pony
fun box frequency_safe[T: T](
  weighted_generators: ReadSeq[WeightedGenerator[T]] box)
: Generator[T] box ?
```
#### Parameters

*   weighted_generators: [ReadSeq](builtin-ReadSeq.md)\[[WeightedGenerator](pony_check-WeightedGenerator.md)\[T\]\] box

#### Returns

* [Generator](pony_check-Generator.md)\[T\] box ?

---

### zip2\[T1: T1, T2: T2\]
<span class="source-link">[[Source]](src/pony_check/gen_obj.md#L-0-782)</span>


Zip two generators into a generator of a 2-tuple.


```pony
fun box zip2[T1: T1, T2: T2](
  gen1: Generator[T1] box,
  gen2: Generator[T2] box)
: Generator[(T1 , T2)] box
```
#### Parameters

*   gen1: [Generator](pony_check-Generator.md)\[T1\] box
*   gen2: [Generator](pony_check-Generator.md)\[T2\] box

#### Returns

* [Generator](pony_check-Generator.md)\[(T1 , T2)\] box

---

### zip3\[T1: T1, T2: T2, T3: T3\]
<span class="source-link">[[Source]](src/pony_check/gen_obj.md#L-0-796)</span>


Zip three generators into a generator of a 3-tuple.


```pony
fun box zip3[T1: T1, T2: T2, T3: T3](
  gen1: Generator[T1] box,
  gen2: Generator[T2] box,
  gen3: Generator[T3] box)
: Generator[(T1 , T2 , T3)] box
```
#### Parameters

*   gen1: [Generator](pony_check-Generator.md)\[T1\] box
*   gen2: [Generator](pony_check-Generator.md)\[T2\] box
*   gen3: [Generator](pony_check-Generator.md)\[T3\] box

#### Returns

* [Generator](pony_check-Generator.md)\[(T1 , T2 , T3)\] box

---

### zip4\[T1: T1, T2: T2, T3: T3, T4: T4\]
<span class="source-link">[[Source]](src/pony_check/gen_obj.md#L-0-811)</span>


Zip four generators into a generator of a 4-tuple.


```pony
fun box zip4[T1: T1, T2: T2, T3: T3, T4: T4](
  gen1: Generator[T1] box,
  gen2: Generator[T2] box,
  gen3: Generator[T3] box,
  gen4: Generator[T4] box)
: Generator[(T1 , T2 , T3 , T4)] box
```
#### Parameters

*   gen1: [Generator](pony_check-Generator.md)\[T1\] box
*   gen2: [Generator](pony_check-Generator.md)\[T2\] box
*   gen3: [Generator](pony_check-Generator.md)\[T3\] box
*   gen4: [Generator](pony_check-Generator.md)\[T4\] box

#### Returns

* [Generator](pony_check-Generator.md)\[(T1 , T2 , T3 , T4)\] box

---

### map2\[T1: T1, T2: T2, T3: T3\]
<span class="source-link">[[Source]](src/pony_check/gen_obj.md#L-0-828)</span>


Convenience combinator for mapping 2 generators into 1.


```pony
fun box map2[T1: T1, T2: T2, T3: T3](
  gen1: Generator[T1] box,
  gen2: Generator[T2] box,
  fn: {(T1, T2): T3^}[T1, T2, T3] ref)
: Generator[T3] box
```
#### Parameters

*   gen1: [Generator](pony_check-Generator.md)\[T1\] box
*   gen2: [Generator](pony_check-Generator.md)\[T2\] box
*   fn: {(T1, T2): T3^}[T1, T2, T3] ref

#### Returns

* [Generator](pony_check-Generator.md)\[T3\] box

---

### map3\[T1: T1, T2: T2, T3: T3, T4: T4\]
<span class="source-link">[[Source]](src/pony_check/gen_obj.md#L-0-843)</span>


Convenience combinator for mapping 3 generators into 1.


```pony
fun box map3[T1: T1, T2: T2, T3: T3, T4: T4](
  gen1: Generator[T1] box,
  gen2: Generator[T2] box,
  gen3: Generator[T3] box,
  fn: {(T1, T2, T3): T4^}[T1, T2, T3, T4] ref)
: Generator[T4] box
```
#### Parameters

*   gen1: [Generator](pony_check-Generator.md)\[T1\] box
*   gen2: [Generator](pony_check-Generator.md)\[T2\] box
*   gen3: [Generator](pony_check-Generator.md)\[T3\] box
*   fn: {(T1, T2, T3): T4^}[T1, T2, T3, T4] ref

#### Returns

* [Generator](pony_check-Generator.md)\[T4\] box

---

### map4\[T1: T1, T2: T2, T3: T3, T4: T4, T5: T5\]
<span class="source-link">[[Source]](src/pony_check/gen_obj.md#L-0-859)</span>


Convenience combinator for mapping 4 generators into 1.


```pony
fun box map4[T1: T1, T2: T2, T3: T3, T4: T4, T5: T5](
  gen1: Generator[T1] box,
  gen2: Generator[T2] box,
  gen3: Generator[T3] box,
  gen4: Generator[T4] box,
  fn: {(T1, T2, T3, T4): T5^}[T1, T2, T3, T4, T5] ref)
: Generator[T5] box
```
#### Parameters

*   gen1: [Generator](pony_check-Generator.md)\[T1\] box
*   gen2: [Generator](pony_check-Generator.md)\[T2\] box
*   gen3: [Generator](pony_check-Generator.md)\[T3\] box
*   gen4: [Generator](pony_check-Generator.md)\[T4\] box
*   fn: {(T1, T2, T3, T4): T5^}[T1, T2, T3, T4, T5] ref

#### Returns

* [Generator](pony_check-Generator.md)\[T5\] box

---

### bool
<span class="source-link">[[Source]](src/pony_check/gen_obj.md#L-0-876)</span>


Generate random Bool values.


```pony
fun box bool()
: Generator[Bool val] box
```

#### Returns

* [Generator](pony_check-Generator.md)\[[Bool](builtin-Bool.md) val\] box

---

### u8
<span class="source-link">[[Source]](src/pony_check/gen_obj.md#L-0-885)</span>


Generate U8 values in `[from, to]`. Order does not matter.


```pony
fun box u8(
  from: U8 val = U8.min_value(),
  to: U8 val = U8.max_value())
: Generator[U8 val] box
```
#### Parameters

*   from: [U8](builtin-U8.md) val = U8.min_value()
*   to: [U8](builtin-U8.md) val = U8.max_value()

#### Returns

* [Generator](pony_check-Generator.md)\[[U8](builtin-U8.md) val\] box

---

### u16
<span class="source-link">[[Source]](src/pony_check/gen_obj.md#L-0-900)</span>


Generate U16 values in `[from, to]`. Order does not matter.


```pony
fun box u16(
  from: U16 val = U16.min_value(),
  to: U16 val = U16.max_value())
: Generator[U16 val] box
```
#### Parameters

*   from: [U16](builtin-U16.md) val = U16.min_value()
*   to: [U16](builtin-U16.md) val = U16.max_value()

#### Returns

* [Generator](pony_check-Generator.md)\[[U16](builtin-U16.md) val\] box

---

### u32
<span class="source-link">[[Source]](src/pony_check/gen_obj.md#L-0-915)</span>


Generate U32 values in `[from, to]`. Order does not matter.


```pony
fun box u32(
  from: U32 val = U32.min_value(),
  to: U32 val = U32.max_value())
: Generator[U32 val] box
```
#### Parameters

*   from: [U32](builtin-U32.md) val = U32.min_value()
*   to: [U32](builtin-U32.md) val = U32.max_value()

#### Returns

* [Generator](pony_check-Generator.md)\[[U32](builtin-U32.md) val\] box

---

### u64
<span class="source-link">[[Source]](src/pony_check/gen_obj.md#L-0-930)</span>


Generate U64 values in `[from, to]`. Order does not matter.


```pony
fun box u64(
  from: U64 val = U64.min_value(),
  to: U64 val = U64.max_value())
: Generator[U64 val] box
```
#### Parameters

*   from: [U64](builtin-U64.md) val = U64.min_value()
*   to: [U64](builtin-U64.md) val = U64.max_value()

#### Returns

* [Generator](pony_check-Generator.md)\[[U64](builtin-U64.md) val\] box

---

### u128
<span class="source-link">[[Source]](src/pony_check/gen_obj.md#L-0-945)</span>


Generate U128 values in `[from, to]`. Order does not matter.


```pony
fun box u128(
  from: U128 val = U128.min_value(),
  to: U128 val = U128.max_value())
: Generator[U128 val] box
```
#### Parameters

*   from: [U128](builtin-U128.md) val = U128.min_value()
*   to: [U128](builtin-U128.md) val = U128.max_value()

#### Returns

* [Generator](pony_check-Generator.md)\[[U128](builtin-U128.md) val\] box

---

### usize
<span class="source-link">[[Source]](src/pony_check/gen_obj.md#L-0-960)</span>


Generate USize values in `[from, to]`. Order does not matter.


```pony
fun box usize(
  from: USize val = USize.min_value(),
  to: USize val = USize.max_value())
: Generator[USize val] box
```
#### Parameters

*   from: [USize](builtin-USize.md) val = USize.min_value()
*   to: [USize](builtin-USize.md) val = USize.max_value()

#### Returns

* [Generator](pony_check-Generator.md)\[[USize](builtin-USize.md) val\] box

---

### ulong
<span class="source-link">[[Source]](src/pony_check/gen_obj.md#L-0-975)</span>


Generate ULong values in `[from, to]`. Order does not matter.


```pony
fun box ulong(
  from: ULong val = ULong.min_value(),
  to: ULong val = ULong.max_value())
: Generator[ULong val] box
```
#### Parameters

*   from: [ULong](builtin-ULong.md) val = ULong.min_value()
*   to: [ULong](builtin-ULong.md) val = ULong.max_value()

#### Returns

* [Generator](pony_check-Generator.md)\[[ULong](builtin-ULong.md) val\] box

---

### i8
<span class="source-link">[[Source]](src/pony_check/gen_obj.md#L-0-990)</span>


Generate I8 values in `[from, to]`. Order does not matter.


```pony
fun box i8(
  from: I8 val = I8.min_value(),
  to: I8 val = I8.max_value())
: Generator[I8 val] box
```
#### Parameters

*   from: [I8](builtin-I8.md) val = I8.min_value()
*   to: [I8](builtin-I8.md) val = I8.max_value()

#### Returns

* [Generator](pony_check-Generator.md)\[[I8](builtin-I8.md) val\] box

---

### i16
<span class="source-link">[[Source]](src/pony_check/gen_obj.md#L-0-1005)</span>


Generate I16 values in `[from, to]`. Order does not matter.


```pony
fun box i16(
  from: I16 val = I16.min_value(),
  to: I16 val = I16.max_value())
: Generator[I16 val] box
```
#### Parameters

*   from: [I16](builtin-I16.md) val = I16.min_value()
*   to: [I16](builtin-I16.md) val = I16.max_value()

#### Returns

* [Generator](pony_check-Generator.md)\[[I16](builtin-I16.md) val\] box

---

### i32
<span class="source-link">[[Source]](src/pony_check/gen_obj.md#L-0-1020)</span>


Generate I32 values in `[from, to]`. Order does not matter.


```pony
fun box i32(
  from: I32 val = I32.min_value(),
  to: I32 val = I32.max_value())
: Generator[I32 val] box
```
#### Parameters

*   from: [I32](builtin-I32.md) val = I32.min_value()
*   to: [I32](builtin-I32.md) val = I32.max_value()

#### Returns

* [Generator](pony_check-Generator.md)\[[I32](builtin-I32.md) val\] box

---

### i64
<span class="source-link">[[Source]](src/pony_check/gen_obj.md#L-0-1035)</span>


Generate I64 values in `[from, to]`. Order does not matter.


```pony
fun box i64(
  from: I64 val = I64.min_value(),
  to: I64 val = I64.max_value())
: Generator[I64 val] box
```
#### Parameters

*   from: [I64](builtin-I64.md) val = I64.min_value()
*   to: [I64](builtin-I64.md) val = I64.max_value()

#### Returns

* [Generator](pony_check-Generator.md)\[[I64](builtin-I64.md) val\] box

---

### i128
<span class="source-link">[[Source]](src/pony_check/gen_obj.md#L-0-1050)</span>


Generate I128 values in `[from, to]`. Order does not matter.


```pony
fun box i128(
  from: I128 val = I128.min_value(),
  to: I128 val = I128.max_value())
: Generator[I128 val] box
```
#### Parameters

*   from: [I128](builtin-I128.md) val = I128.min_value()
*   to: [I128](builtin-I128.md) val = I128.max_value()

#### Returns

* [Generator](pony_check-Generator.md)\[[I128](builtin-I128.md) val\] box

---

### ilong
<span class="source-link">[[Source]](src/pony_check/gen_obj.md#L-0-1065)</span>


Generate ILong values in `[from, to]`. Order does not matter.


```pony
fun box ilong(
  from: ILong val = ILong.min_value(),
  to: ILong val = ILong.max_value())
: Generator[ILong val] box
```
#### Parameters

*   from: [ILong](builtin-ILong.md) val = ILong.min_value()
*   to: [ILong](builtin-ILong.md) val = ILong.max_value()

#### Returns

* [Generator](pony_check-Generator.md)\[[ILong](builtin-ILong.md) val\] box

---

### isize
<span class="source-link">[[Source]](src/pony_check/gen_obj.md#L-0-1080)</span>


Generate ISize values in `[from, to]`. Order does not matter.


```pony
fun box isize(
  from: ISize val = ISize.min_value(),
  to: ISize val = ISize.max_value())
: Generator[ISize val] box
```
#### Parameters

*   from: [ISize](builtin-ISize.md) val = ISize.min_value()
*   to: [ISize](builtin-ISize.md) val = ISize.max_value()

#### Returns

* [Generator](pony_check-Generator.md)\[[ISize](builtin-ISize.md) val\] box

---

### byte_string
<span class="source-link">[[Source]](src/pony_check/gen_obj.md#L-0-1095)</span>


Generate a string from bytes with length in `from` to `to`.
Uses boolean-per-element encoding.


```pony
fun box byte_string(
  gen: Generator[U8 val] box,
  from: USize val = 0,
  to: USize val = 100)
: Generator[String val] box
```
#### Parameters

*   gen: [Generator](pony_check-Generator.md)\[[U8](builtin-U8.md) val\] box
*   from: [USize](builtin-USize.md) val = 0
*   to: [USize](builtin-USize.md) val = 100

#### Returns

* [Generator](pony_check-Generator.md)\[[String](builtin-String.md) val\] box

---

### ascii
<span class="source-link">[[Source]](src/pony_check/gen_obj.md#L-0-1133)</span>


Generate a string within the given `range` with length in `from` to `to`.


```pony
fun box ascii(
  from: USize val = 0,
  to: USize val = 100,
  range: ASCIIRange = ASCIIAll)
: Generator[String val] box
```
#### Parameters

*   from: [USize](builtin-USize.md) val = 0
*   to: [USize](builtin-USize.md) val = 100
*   range: [ASCIIRange](pony_check-ASCIIRange.md) = ASCIIAll

#### Returns

* [Generator](pony_check-Generator.md)\[[String](builtin-String.md) val\] box

---

### ascii_printable
<span class="source-link">[[Source]](src/pony_check/gen_obj.md#L-0-1154)</span>


Generate strings of printable ASCII characters.


```pony
fun box ascii_printable(
  from: USize val = 0,
  to: USize val = 100)
: Generator[String val] box
```
#### Parameters

*   from: [USize](builtin-USize.md) val = 0
*   to: [USize](builtin-USize.md) val = 100

#### Returns

* [Generator](pony_check-Generator.md)\[[String](builtin-String.md) val\] box

---

### ascii_numeric
<span class="source-link">[[Source]](src/pony_check/gen_obj.md#L-0-1164)</span>


Generate strings of numeric ASCII characters.


```pony
fun box ascii_numeric(
  from: USize val = 0,
  to: USize val = 100)
: Generator[String val] box
```
#### Parameters

*   from: [USize](builtin-USize.md) val = 0
*   to: [USize](builtin-USize.md) val = 100

#### Returns

* [Generator](pony_check-Generator.md)\[[String](builtin-String.md) val\] box

---

### ascii_letters
<span class="source-link">[[Source]](src/pony_check/gen_obj.md#L-0-1174)</span>


Generate strings of ASCII letter characters.


```pony
fun box ascii_letters(
  from: USize val = 0,
  to: USize val = 100)
: Generator[String val] box
```
#### Parameters

*   from: [USize](builtin-USize.md) val = 0
*   to: [USize](builtin-USize.md) val = 100

#### Returns

* [Generator](pony_check-Generator.md)\[[String](builtin-String.md) val\] box

---

### utf32_codepoint_string
<span class="source-link">[[Source]](src/pony_check/gen_obj.md#L-0-1184)</span>


Generate a string from unicode codepoints with length in `from` to `to`
codepoints.


```pony
fun box utf32_codepoint_string(
  gen: Generator[U32 val] box,
  from: USize val = 0,
  to: USize val = 100)
: Generator[String val] box
```
#### Parameters

*   gen: [Generator](pony_check-Generator.md)\[[U32](builtin-U32.md) val\] box
*   from: [USize](builtin-USize.md) val = 0
*   to: [USize](builtin-USize.md) val = 100

#### Returns

* [Generator](pony_check-Generator.md)\[[String](builtin-String.md) val\] box

---

### unicode
<span class="source-link">[[Source]](src/pony_check/gen_obj.md#L-0-1226)</span>


Generate a random String of Unicode code points.


```pony
fun box unicode(
  from: USize val = 0,
  to: USize val = 100)
: Generator[String val] box
```
#### Parameters

*   from: [USize](builtin-USize.md) val = 0
*   to: [USize](builtin-USize.md) val = 100

#### Returns

* [Generator](pony_check-Generator.md)\[[String](builtin-String.md) val\] box

---

### unicode_bmp
<span class="source-link">[[Source]](src/pony_check/gen_obj.md#L-0-1246)</span>


Generate a random String of Unicode BMP code points.


```pony
fun box unicode_bmp(
  from: USize val = 0,
  to: USize val = 100)
: Generator[String val] box
```
#### Parameters

*   from: [USize](builtin-USize.md) val = 0
*   to: [USize](builtin-USize.md) val = 100

#### Returns

* [Generator](pony_check-Generator.md)\[[String](builtin-String.md) val\] box

---

### eq
<span class="source-link">[[Source]](src/pony_check/gen_obj.md#L-0-105)</span>


```pony
fun box eq(
  that: Generators val)
: Bool val
```
#### Parameters

*   that: [Generators](pony_check-Generators.md) val

#### Returns

* [Bool](builtin-Bool.md) val

---

### ne
<span class="source-link">[[Source]](src/pony_check/gen_obj.md#L-0-105)</span>


```pony
fun box ne(
  that: Generators val)
: Bool val
```
#### Parameters

*   that: [Generators](pony_check-Generators.md) val

#### Returns

* [Bool](builtin-Bool.md) val

---

