std.bytes-to-stream
- description
- Wrap a byte list into a pull-based byte stream ({ initialState, next })
- type
Fn(bytes: List<Number>) -> Record{ initialState: Number, next: Fn(state: Number) -> Union{#yield(Record{chunk: List<Number>, nextState: Number}), #done} }- expression
fn(bytes$1) => { initialState: 0, next: fn(state$2) => match @core.and( left: @core.equal(left: $2, right: 0), right: @core.greater-than(left: @core.list-length(value: $1), right: 0) ) { true => #yield({chunk: $1, nextState: 1}), false => #done } }- visibility
- public
std.bytes-to-stream (project definy, branch compiled-tests, snapshot i6TqClmqVS9FK8rKOvJ43l6Tevx8pvYJ5-zaQqNwemc) id: qNclGmQncJlu4yhTTRJM2mLNGlZLwUmoZXzil4NSWSk content hash: SmsEHXkIa-JZnJscCF_nVQ4P3ZQqHSMKup62BmeYdFU