Groups lines into blocks separated by empty lines.
| Type | Value |
| Input | Arr<Str...> | an array of consecutive lines |
| Output | Arr<Arr<Str...>...> | an array of arrays of lines, each representing a block |
Each empty line in the input marks the end of a block. Blocks can be empty. The empty lines themselves are not included.
| Program | Type | Value | Error |
["a", "b", "", "c", "d", "e", "f", ""] blocks | Arr<Arr<Str...>...> | [["a", "b"], ["c", "d", "e", "f"]] | |
["a", ""] blocks | Arr<Arr<Str...>...> | [["a"]] | |
["a"] blocks | Arr<Arr<Str...>...> | [["a"]] | |
["", "a"] blocks | Arr<Arr<Str...>...> | [[], ["a"]] | |
["a", "", "", "", "b"] blocks | Arr<Arr<Str...>...> | [["a"], [], [], ["b"]] | |
Writes to STDERR.
| Type | Value |
| Input | <A Any> | any value |
| Output | <A Any> | the same value |
Identity function with the side effect of writing a string representation of the value to STDERR, followed by a line break.
Writes to STDERR with a custom line end.
| Type | Value |
| Input | <A Any> | any value |
| end (param #1) | Str | the line end to use |
| Output | <A Any> | the same value |
Identity function with the side effect of writing a string representation of the value to STDERR, followed by a the specified line end.
Reads from STDIN.
| Type | Value |
| Input | Any | any value (is ignored) |
| Output | Reader | a Reader representing STDIN |
Reads JSON values from a stream
| Type | Value |
| Input | Reader | a Reader |
| Output | Arr<Any...> | array of data structures as they appear in the stream |
Reads a stream line-by-line
| Type | Value |
| Input | Reader | a Reader |
| Output | Arr<Str...> | an array of lines, without the line-break character |
| Program | Type | Value | Error |
"abc\nde\n\nf" reader lines | Arr<Str...> | ["abc", "de", "", "f"] | |
Writes to STDOUT.
| Type | Value |
| Input | <A Any> | any value |
| Output | <A Any> | the same value |
Identity function with the side effect of writing a string representation of the value to STDERR, followed by a line break.
Writes to STDOUT with a custom line end.
| Type | Value |
| Input | <A Any> | any value |
| end (param #1) | Str | |
| Output | <A Any> | the same value |
Identity function with the side effect of writing a string representation of the value to STDOUT, followed by a line break.
Creates a Reader from a Str.
| Type | Value |
| Input | Str | a string |
| Output | Reader | a Reader from which the input can be read |