Skip to main content

Selection functions

previousEvent

Commentary

added in 0.0.5

stateful function

Obtains the last event generated. Can optionally drill into a subvalue using path.


Examples

Getting the last event

{
"_gen": "oneOf",
"choices": [
{
"_gen": "previousEvent",
"path": [
"value"
]
},
{
"_gen": "uniformDistribution",
"bounds": [
1,
4
]
}
]
}
[
3.3878907061993635,
1.0037051059469677,
3.234966990454061,
3.234966990454061,
1.305674765640567
]

Specification

JSON schema

{
"type": "object",
"properties": {
"path": {
"type": "array",
"items": {
"oneOf": [
{
"type": "integer",
"minimum": 0
},
{
"type": "string"
}
]
}
}
}
}