API for monadic-io-streams - clojure-contrib v1.2 (stable)

by Konrad Hinsen

clojure-contrib is now deprecated

clojure-contrib is no longer being developed or maintained.

Rather than a single, monolithic, contributions library, Clojure now has a set of separate libraries for each unit of functionality. The libraries are in the Clojure GitHub organization at https://github.com/clojure. API documentation of the libraries can be found at https://clojure.github.io.

If you're looking for a specific function or namespace from the old clojure-contrib, see "Where Did Clojure.Contrib Go".


Full namespace name: clojure.contrib.monadic-io-streams

Overview

Monadic I/O with Java input/output streams
Defines monadic I/O statements to be used in a state monad
with an input or output stream as the state. The macro
monadic-io creates a stream, runs a monadic I/O statement
on it, and closes the stream. This structure permits the
definition of purely functional compound I/O statements
which are applied to streams that can never escape from the
monadic statement sequence.

Public Variables and Functions



flush

function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (flush)
Flush
Source


print

function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (print obj)
Print obj
Source


println

function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (println)
       (println obj)
Print obj followed by a newline
Source


read-char

function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (read-char)
Read a single character
Source


read-line

function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (read-line)
Read a single line
Source


read-lines

function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (read-lines)
Read all lines and return them in a vector
Source


skip-chars

function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (skip-chars n)
Skip n characters
Source


with-io-streams

function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (with-io-streams io-specs statement)
Open one or more streams as specified by io-spec, run a monadic
I/O statement on them, and close the streams. io-spec is
a binding-like vector in which each stream is specified by
three element: a keyword by which the stream can be referred to,
the stream mode (:read or :write), and a stream specification as
accepted by clojure.contrib.io/reader (mode :read) or
clojure.contrib.io/writer (mode :write). The statement
is run on a state which is a map from keywords to corresponding
streams. Single-stream monadic I/O statements must be wrapped
with clojure.contrib.monads/with-state-field.
Source


with-reader

function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (with-reader reader-spec statement)
Create a reader from reader-spec, run the monadic I/O statement
on it, and close the reader. reader-spec can be any object accepted
by clojure.contrib.io/reader.
Source


with-writer

function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (with-writer writer-spec statement)
Create a writer from writer-spec, run the monadic I/O statement
on it, and close the writer. writer-spec can be any object accepted
by clojure.contrib.io/writer.
Source


write

function
This library, clojure-contrib, is deprecated. See here for more information.
Usage: (write text)
Write text (a string)
Source
Logo & site design by Tom Hickey.
Clojure auto-documentation system by Tom Faulhaber.