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
]
}
]
}
[
null,
null,
3.8363004542355403,
3.8363004542355403,
3.8363004542355403
]
Specification
JSON schema
{
"type": "object",
"properties": {
"path": {
"type": "array",
"items": {
"oneOf": [
{
"type": "integer",
"minimum": 0
},
{
"type": "string"
}
]
}
}
}
}