Skip to content

Commit

Permalink
Add Fuzzer & PRNG to the prelude.
Browse files Browse the repository at this point in the history
  • Loading branch information
KtorZ committed Mar 1, 2024
1 parent 721053a commit 5b94e7c
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions lib/aiken.ak
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,23 @@ pub type Option<a> {
None
}

/// <small>Minimum Plutus Version</small> | <small>1</small>
/// --- | ---
///
/// A type that represent Pseudo-random generated values.
pub type PRNG {
Seeded { seed: Int, choices: List<Int> }
Replayed { choices: List<Int> }
}

/// <small>Minimum Plutus Version</small> | <small>1</small>
/// --- | ---
///
/// A type to capture random computation that may depend on one another. Useful
/// for constructing (pseudo-)random values for property-based test.
pub type Fuzzer<a> =
fn(PRNG) -> Option<(PRNG, a)>

/// <small>Minimum Plutus Version</small> | <small>1</small>
/// --- | ---
///
Expand Down

0 comments on commit 5b94e7c

Please sign in to comment.