std.string-list-to-utf8-stream
- description
- Convert a list of string chunks into a multi-chunk UTF-8 pull-based byte stream
- type
Fn(chunks: List<String>) -> Record{
initialState: Number,
next: Fn(state: Number) -> Union{#yield(Record{chunk: List<Number>, nextState: Number}), #done}
}- expression
fn(chunks$1) =>
{
initialState: 0,
next: fn(state$2) =>
match @core.list-get(list: $1, index: $2) {
#none(_) =>
#done,
#some(item$1003) =>
#yield({chunk: @core.string-to-bytes(value: $1003), nextState: @core.plus(left: $2, right: 1)})
}
}- visibility
- public
std.string-list-to-utf8-stream (project definy, branch http-cbor, snapshot 2jdLzxAm7E__OLNmiW8b5Qn5SeDXn9HnpZiFUpkZj2I)
id: pxWKNyFLi6S9Qa9C0C4wOYIdcDpo6gRK7KyUUxtk4RI
content hash: Bl0JptYV_v5o3qKfroFDH9qKOmBglBcHLnczfkLBscQ