inter package:text
O(n) The
intercalate function takes a
Text and a
list of
Texts and concatenates the list after interspersing the
first argument between each element of the list.
Example:
>>> T.intercalate "NI!" ["We", "seek", "the", "Holy", "Grail"]
"WeNI!seekNI!theNI!HolyNI!Grail"
O(n) The
intersperse function takes a character and
places it between the characters of a
Text.
Example:
>>> T.intersperse '.' "SHIELD"
"S.H.I.E.L.D"
Performs replacement on invalid scalar values.
The
interact function takes a function of type
Text ->
Text as its argument. The entire input from the standard input
device is passed to this function as its argument, and the resulting
string is output on the standard output device.
intercalate str strs inserts the stream str in between the streams
strs and concatenates the result.
Properties
intercalate s = concat . intersperse s
O(n) The
intercalate function takes a
Text and a
list of
Texts and concatenates the list after interspersing the
first argument between each element of the list.
O(n) The
intersperse function takes a character and
places it between the characters of a
Text. Performs
replacement on invalid scalar values.
The
interact function takes a function of type
Text ->
Text as its argument. The entire input from the standard input
device is passed (lazily) to this function as its argument, and the
resulting string is output on the standard output device.
A module containing private
Text internals. This exposes the
Text representation and low level construction functions.
Modules which extend the
Text system may need to use this
module.
You should not use this module unless you are determined to monkey
with the internals, as the functions here do just about nothing to
preserve data invariants. You have been warned!
Deprecated: Use Data.Text.Internal.Lazy instead
Allow an
ST computation to be deferred lazily. When passed an
action of type
ST s a, the action will only
be performed when the value of
a is demanded.
This function is identical to the normal unsafeInterleaveST, but is
inlined and hence faster.
Note: This operation is highly unsafe, as it can introduce
externally visible non-determinism into an
ST action.