Append a segment to this segment
Append a segment to this segment
Complexity is O(lmin) effective, where lmin is the length of the smallest segment.
the segment
Prepend an message to this segment
Prepend an message to this segment
the message
Append an message to this segment
Append an message to this segment
the message
Builds a new collection by applying a partial function to all messages of this segment on which the function is defined.
Builds a new collection by applying a partial function to all messages of this segment on which the function is defined.
the message type of the returned collection.
the partial function which filters and maps the segment.
a message typeclass used to poison messages not collected.
a new segment resulting from applying the partial function
pf
to each message on which it is defined and collecting the results.
The order of the messages is preserved.
Return a segments that concatenates all the segments it contains.
Return a segments that concatenates all the segments it contains.
the type of the messages of each traversable collection.
an implicit conversion which asserts that the message
type of this segment is a Seg
.
a new segment resulting from concatenating all segments.
Drops n
elements from the head of this segment.
Drops n
elements from the head of this segment.
The number of elements to drop.
A message typeclass used to poison messages dropped.
a segment whose n
first elements have been dropped.
Drops longest suffix of messages that satisfy a predicate.
Drops longest suffix of messages that satisfy a predicate.
The predicate used to test messages.
A message typeclass used to poison messages dropped.
the longest prefix of this segment whose first message
does not satisfy the predicate p
.
Drops longest prefix of messages that satisfy a predicate.
Drops longest prefix of messages that satisfy a predicate.
The predicate used to test messages.
A message typeclass used to poison messages dropped.
the longest suffix of this segment whose first message
does not satisfy the predicate p
.
Tests whether a predicate holds for some of the messages of this segment.
Tests whether a predicate holds for some of the messages of this segment.
the predicate used to test messages.
true
if the given predicate p
holds for some of the
messages of this segment, otherwise false
.
Selects all messages of this segment which satisfy a predicate.
Selects all messages of this segment which satisfy a predicate.
the predicate used to test messages.
a message typeclass used to poison messages filtered out (i.e. messages that do not satisfy p
).
a new segment consisting of all messages of this segment that satisfy the given
predicate p
. Their order may not be preserved.
Builds a new collection by applying a function to all messages of this segment and concatenating the results.
Builds a new collection by applying a function to all messages of this segment and concatenating the results.
the message type of the returned collection.
the function to apply to each message.
a new segment resulting from applying the given collection-valued function
f
to each message of this segment and concatenating the results.
Builds a new collection by applying a function to all messages of this segment and concatenating the results.
Builds a new collection by applying a function to all messages of this segment and concatenating the results.
the message type of the returned collection.
the function to apply to each message.
a new segment resulting from applying the given collection-valued function
f
to each message of this segment and concatenating the results.
Converts this segment of traversable collections into a segment in which all message collections are concatenated.
Converts this segment of traversable collections into a segment in which all message collections are concatenated.
the type of the messages of each traversable collection.
an implicit conversion which asserts that the message
type of this segment is a Traversable
.
a new segment resulting from concatenating all message.
Applies a binary operator to a start value and all messages of this segment, going left to right.
Applies a binary operator to a start value and all messages of this segment, going left to right.
the result type of the binary operator.
the start value.
the result of inserting op
between consecutive messages of this segment,
going left to right with the start value z
on the left:
op(...op(z, x,,1,,), x,,2,,, ..., x,,n,,)
where x1, ..., xn
are the messages of this segment.
Applies a function f
to all messages of this segments.
Applies a function f
to all messages of this segments.
the type parameter describing the result of function f
.
This result will always be ignored. Typically U
is Unit
,
but this is not necessary.
the function that is applied for its side-effect to every message.
The result of function f
is discarded.
Selects the first message of this segment.
Selects the first message of this segment.
the first message of this segment.
if the segment is empty.
Selects all messages except the last.
Selects all messages except the last.
a segment consisting of all messages of this segment except the last one.
if the segment is empty.
Tests whether this segment is empty.
Tests whether this segment is empty.
true
if the segment contain no messages, false
otherwise.
Selects all messages except the first.
Selects all messages except the first.
a segment consisting of all messages of this segment except the first one.
if the segment is empty.
The length of the segment.
The length of the segment.
Note: xs.length
and xs.size
yield the same result.
the number of messages in this segment.
Builds a new collection by applying a function to all messages of this segment.
Builds a new collection by applying a function to all messages of this segment.
the message type of the returned collection.
the function to apply to each message.
a new segment resulting from applying the given function
f
to each message of this segment and collecting the results.
Returns a tuple containing the head of this segment as a value segment and the tail of the segment.
Returns a tuple containing the head of this segment as a value segment and the tail of the segment.
a tuple containing the head of this segment as a value segment and the tail of the segment.
Produces a collection containing cummulative results of applying the operator going left to right.
Produces a collection containing cummulative results of applying the operator going left to right.
the type of the messages in the resulting collection
the initial value
the binary operator applied to the intermediate result and the message
a segment with the intermediate results, incuding the initial value.
Produces a collection containing cummulative results of applying the operator going left to right.
Produces a collection containing cummulative results of applying the operator going left to right.
the type of the messages in the resulting collection
the initial state
a segment with the intermediate results.
Splits this segment into a prefix/suffix pair according to a predicate.
Splits this segment into a prefix/suffix pair according to a predicate.
Note: c span p
is equivalent to (but possibly more efficient than)
(c takeWhile p, c dropWhile p)
, provided the evaluation of the
predicate p
does not cause any side-effects.
the test predicate
a pair consisting of the longest prefix of this segment whose
messages all satisfy p
, and the rest of this segment.
Splits this segment into two at a given position.
Splits this segment into two at a given position.
Note: c splitAt n
is equivalent to (but possibly more efficient than)
(c take n, c drop n)
.
the position at which to split.
a pair of segments consisting of the first n
messages of this segment, and the other messages.
Catamorphism.
Catamorphism.
the return type of the arguments.
the value returned if the segment is empty.
the function applied to the head and the tail of the segment if it is not empty.
the value returned by 'empty' or 'more' depending on if the segment is empty or not.
Selects all messages except the first.
Selects all messages except the first.
a segment consisting of all messages of this segment except the first one.
if the segment is empty.
Copies values of this segment to a vector.
Returns a pair containing:
Returns a pair containing:
the type of the second half of the returned pairs
a new segment containing pairs consisting of
corresponding elements of this segment and seg
and an optional segment containing the remaining elements
if one of the two segments is longer than the other
Split a collection at the message that satisfies the predicate.
Split a collection at the message that satisfies the predicate.
the test predicate
a pair consisting of the longest prefix of this segment whose
messages do not satisfy p
, and the rest of this segment.
[use case] Builds a new collection by applying a partial function to all messages of this segment on which the function is defined.
Builds a new collection by applying a partial function to all messages of this segment on which the function is defined.
the message type of the returned collection.
the partial function which filters and maps the segment.
a new segment resulting from applying the partial function
pf
to each message on which it is defined and collecting the results.
The order of the messages is preserved.
[use case] Return a segments that concatenates all the segments it contains.
Return a segments that concatenates all the segments it contains.
the type of the messages of each traversable collection.
a new segment resulting from concatenating all segments.
[use case] Builds a new collection by applying a function to all messages of this segment and concatenating the results.
Builds a new collection by applying a function to all messages of this segment and concatenating the results.
the message type of the returned collection.
the function to apply to each message.
a new segment resulting from applying the given collection-valued function
f
to each message of this segment and concatenating the results.
[use case] Builds a new collection by applying a function to all messages of this segment and concatenating the results.
Builds a new collection by applying a function to all messages of this segment and concatenating the results.
the message type of the returned collection.
the function to apply to each message.
a new segment resulting from applying the given collection-valued function
f
to each message of this segment and concatenating the results.
[use case] Converts this segment of traversable collections into a segment in which all message collections are concatenated.
Converts this segment of traversable collections into a segment in which all message collections are concatenated.
the type of the messages of each traversable collection.
a new segment resulting from concatenating all message.
[use case] Applies a function f
to all messages of this segments.
Applies a function f
to all messages of this segments.
the function that is applied for its side-effect to every message.
The result of function f
is discarded.
[use case] Builds a new collection by applying a function to all messages of this segment.
Builds a new collection by applying a function to all messages of this segment.
the message type of the returned collection.
the function to apply to each message.
a new segment resulting from applying the given function
f
to each message of this segment and collecting the results.
Poison all messages in this segment
Poison all messages in this segment
a message typeclass used to poison every message in this segment.
The size of the segment.
The size of the segment.
Note: xs.length
and xs.size
yield the same result.
the number of messages in this segment.
Collection of messages carried on channels.