inter -package:base
Some general transformation where the arguments that are not present
are calculated from the one data argument a being just
present. Can be used to contstruct function a -> d from
some additional ideas.
inter c0 c1 is a list of all possible points of
intersection between curves
c0 and
c1 : if
(u,v,w,x) is returned by
inter, then curve
c0
may intersect with
c1 between parameter values
u and
v, which corresponds to parameter values between
w
and
x for
c1. The implementation guarantees that all
actual solutions are found, but possibly false solutions may also be
returned.
Intersection of regular expressions
The interact function takes a function of type ByteString ->
ByteString 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.
O(n) The
intercalate function takes a
ByteString
and a list of
ByteStrings and concatenates the list after
interspersing the first argument between each element of the list.
O(n) The
intersperse function takes a
Word8 and a
ByteString and `intersperses' that byte between the elements of
the
ByteString. It is analogous to the intersperse function on
Lists.
O(n) The
intersperse function takes a Char and a
ByteString and `intersperses' that Char between the elements of
the
ByteString. It is analogous to the intersperse function on
Lists.
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.
The (left-biased) intersection of two maps (based on
keys).
intersection (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) == singleton 5 "a"
The intersection with a combining function.
intersectionWith (++) (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) == singleton 5 "aA"
The intersection with a combining function.
let f k al ar = (show k) ++ ":" ++ al ++ "|" ++ ar
intersectionWithKey f (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) == singleton 5 "5:a|A"
The intersection of two sets.
The intersection of a series of sets. Intersections are performed
left-to-right.
Intersection of two maps. Return data in the first map
for the keys existing in both maps. (
intersection m1 m2 ==
intersectionWith const m1 m2).
intersection (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) == singleton 5 "a"
Intersection with a combining function.
intersectionWith (++) (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) == singleton 5 "aA"
Intersection with a combining function.
let f k al ar = (show k) ++ ":" ++ al ++ "|" ++ ar
intersectionWithKey f (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) == singleton 5 "5:a|A"