(html (head (title "sph-lib (sph stream)") (link (@ (rel "stylesheet") (type "text/css") (href "/css/sph.css"))) (meta (@ (name "viewport") (content "width=device-width,initial-scale=1"))) #f) (body () (div (@ (class top)) (nav (a (@ (href "/")) "start") ", " (a (@ (href "/feed.xml")) "feed")) "") (div (@ (class "middle")) (div (@ (class mtime) (title "last modification time of the current page")) "2023-04-05") (section (h1 "(sph stream)") (div (p "srfi-41 stream helpers") (p "part of " (a (@ (href "../../sph-lib.html")) "sph-lib")) (#f (section (@ (class "library-name")) (h1 "module name") (p "(sph stream)")) (section (@ (class "library-exports")) (h1 "exported bindings") (div (div (@ (class "doc-bindings")) (div (@ (id "doc-b-" "file->stream") (class "doc-b")) (div (span (@ (class "type")) "procedure") ": " (span (@ (class "name")) "file->stream") " " (span (@ (class "first-sig")) "path read [close] ->")) "" "") (div (@ (id "doc-b-" "port->buffered-octet-stream") (class "doc-b")) (div (span (@ (class "type")) "procedure") ": " (span (@ (class "name")) "port->buffered-octet-stream") " " (span (@ (class "first-sig")) "port buffer-size ->")) (div (@ (class "rest-sig")) (div "port integer -> stream")) (div (@ (class "description")) (("creates stream that produces bytevectors of length buffer-size filled with data/octets read from port")))) (div (@ (id "doc-b-" "port->delimited-stream") (class "doc-b")) (div (span (@ (class "type")) "procedure") ": " (span (@ (class "name")) "port->delimited-stream") " " (span (@ (class "first-sig")) "delimiters-string port [handle-delim] ->")) (div (@ (class "rest-sig")) (div "string port [symbol:read-delimited-handle-delim] -> stream")) "") (div (@ (id "doc-b-" "port->line-stream") (class "doc-b")) (div (span (@ (class "type")) "procedure") ": " (span (@ (class "name")) "port->line-stream") " " (span (@ (class "first-sig")) "port ->")) (div (@ (class "rest-sig")) (div "port -> stream -> string ...")) (div (@ (class "description")) (("create a stream that reads lines from port")))) (div (@ (id "doc-b-" "port->stream") (class "doc-b")) (div (span (@ (class "type")) "procedure") ": " (span (@ (class "name")) "port->stream") " " (span (@ (class "first-sig")) "port read [close] ->")) (div (@ (class "rest-sig")) (div "any procedure:{any -> any/eof-object} [procedure] -> stream")) (div (@ (class "description")) (("create a stream that calls (read port) until the result is the end-of-file object and then close port." (br) "works with any type for port as long as read eventually returns an eof-object." (br) "port->stream from srfi-41 does not support a custom reader")))) (div (@ (id "doc-b-" "sph-stream-description") (class "doc-b")) (div (span (@ (class "type")) "variable") ": " (span (@ (class "name")) "sph-stream-description")) "" "") (div (@ (id "doc-b-" "stream-any") (class "doc-b")) (div (span (@ (class "type")) "procedure") ": " (span (@ (class "name")) "stream-any") " " (span (@ (class "first-sig")) "proc stream ->")) (div (@ (class "rest-sig")) (div "procedure stream -> boolean/any")) "") (div (@ (id "doc-b-" "stream-deduplicate") (class "doc-b")) (div (span (@ (class "type")) "procedure") ": " (span (@ (class "name")) "stream-deduplicate") " " (span (@ (class "first-sig")) "a [set-create] ->")) (div (@ (class "rest-sig")) (div "stream [procedure] ->")) (div (@ (class "description")) (("returns each distinct value only once." (br) "set-create is a set-creation procedure from (sph set)")))) (div (@ (id "doc-b-" "stream-each") (class "doc-b")) (div (span (@ (class "type")) "procedure") ": " (span (@ (class "name")) "stream-each") " " (span (@ (class "first-sig")) "proc strm ->")) "" "") (div (@ (id "doc-b-" "stream-first") (class "doc-b")) (div (span (@ (class "type")) "procedure") ": " (span (@ (class "name")) "stream-first") " " (span (@ (class "first-sig")) "strm ->")) "" "") (div (@ (id "doc-b-" "stream-first-or-null") (class "doc-b")) (div (span (@ (class "type")) "procedure") ": " (span (@ (class "name")) "stream-first-or-null") " " (span (@ (class "first-sig")) "a ->")) (div (@ (class "rest-sig")) (div "stream -> any/list")) "") (div (@ (id "doc-b-" "stream-fold-right-multiple") (class "doc-b")) (div (span (@ (class "type")) "procedure") ": " (span (@ (class "name")) "stream-fold-right-multiple") " " (span (@ (class "first-sig")) "proc a r ... ->")) "" (div (@ (class "description")) (("procedure stream any:state ...")))) (div (@ (id "doc-b-" "stream-page") (class "doc-b")) (div (span (@ (class "type")) "procedure") ": " (span (@ (class "name")) "stream-page") " " (span (@ (class "first-sig")) "a entry-count number lookahead c ->")) "" "") (div (@ (id "doc-b-" "stream-tail") (class "doc-b")) (div (span (@ (class "type")) "procedure") ": " (span (@ (class "name")) "stream-tail") " " (span (@ (class "first-sig")) "strm ->")) "" "")))))))) ()))