Uses of Class
fj.data.Stream
Packages that use Stream
Package
Description
Types that set the premise for the existence of Functional Java.
Parallelization strategies.
Common algebraic data types.
Provides 2-3 finger trees, a functional representation of persistent sequences supporting access to the ends in
amortized O(1) time.
Optic data types adapted from the Scala Monocle library
and inspired by the
Haskell Lens library.
Fixed-length vectors
A prelude of commonly used first-class functions
Parser combinators.
-
Uses of Stream in fj
Modifier and TypeMethodDescriptionfinal <C> Stream
<C> Applies a stream of comonadic functions to this product, returning a stream of values.Returns the display rendering of the given argument.P1.traverseStream
(F<A, Stream<B>> f) Traversable instance of P1 for StreamP2.traverseStream
(F<B, Stream<C>> f) Modifier and TypeMethodDescriptionF.mapStream()
Promotes this function to map over a Stream.F.mapStream()
Promotes this function to map over a Stream.Turns a stream of P1s into a single P1 of a stream.Show.show_()
Returns the transformation equivalent to this show.Equal.streamEqual
(Equal<A> ea) An equal instance for theStream
type.Hash.streamHash
(Hash<A> ha) A hash instance for theStream
type.F.streamK()
Promotes this function so that it returns its result in a Stream.F2.streamM()
Promotes this function to a function on Streams.F2.streamM()
Promotes this function to a function on Streams.F2.streamM()
Promotes this function to a function on Streams.Monoid.streamMonoid()
A monoid for streams.An order instance for theStream
type.Semigroup.streamSemigroup()
A semigroup for streams.Show.streamShow
(Show<A> sa) A show instance for theStream
type.Show.streamShow
(Show<A> sa, String start, String sep, String end) A show instance for theStream
type.Show.streamShow_
(Show<A> sa, String start, String sep, String end) Returns the transformation equivalent for the stream show.Show.streamShow_
(Show<A> sa, String start, String sep, String end) Returns the transformation equivalent for the stream show.Monoid.sumLeftS()
Returns a function that sums the given values with left-fold.Show.unlineShow
(Show<A> sa) A show instance for streams that splits into lines.F2.zipStreamM()
Promotes this function to zip two streams, applying the function lock-step over both streams.F2.zipStreamM()
Promotes this function to zip two streams, applying the function lock-step over both streams.F2.zipStreamM()
Promotes this function to zip two streams, applying the function lock-step over both streams.Modifier and TypeMethodDescriptionTurns a stream of P1s into a single P1 of a stream.final <C> Stream
<C> Applies a stream of comonadic functions to this product, returning a stream of values.Sums the given values with left-fold.Sums the given values with right-fold.Modifier and TypeMethodDescriptionstatic <A> Show
<A> Returns a show instance using the given function.default A
default A
default A
Sums the given values with left-fold, shortcutting the computation as early as possible.P1.traverseStream
(F<A, Stream<B>> f) Traversable instance of P1 for StreamP2.traverseStream
(F<B, Stream<C>> f) -
Uses of Stream in fj.control.parallel
Methods in fj.control.parallel that return StreamModifier and TypeMethodDescription<B> Stream
<B> Applies a stream of comonadic functions to this promise, returning a stream of values.Methods in fj.control.parallel that return types with arguments of type StreamModifier and TypeMethodDescriptionPerforms a right-fold reduction across a Stream in constant stack space.Takes a Promise-valued function and applies it to each element in the given Stream, yielding a promise of a Stream of results.ParModule.mapStream()
First-class function that maps a concurrent function over a Stream inside a promise.ParModule.mapStream()
First-class function that maps a concurrent function over a Stream inside a promise.ParModule.parFlatMap
(Stream<A> as, F<A, Stream<B>> f) Binds a Stream-valued function across a Stream in parallel, concatenating the results into a new Stream.Maps across a Stream in parallel.ParModule.parMapStream()
A first-class function that maps another function across a stream in parallel.ParModule.parMapStream()
A first-class function that maps another function across a stream in parallel.ParModule.parZipWith
(Stream<A> as, Stream<B> bs, F<A, F<B, C>> f) Zips two streams together with a given function, in parallel.Stream iteration inside a Promise.Turns a Stream of promises into a single promise of a Stream.ParModule.sequenceStream()
A first-class function that traverses a stream inside a promise.ParModule.sequenceStream()
A first-class function that traverses a stream inside a promise.Methods in fj.control.parallel with parameters of type StreamModifier and TypeMethodDescriptionTakes a Promise-valued function and applies it to each element in the given Stream, yielding a promise of a Stream of results.ParModule.parFlatMap
(Stream<A> as, F<A, Stream<B>> f) Binds a Stream-valued function across a Stream in parallel, concatenating the results into a new Stream.<A,
B> Promise <B> ParModule.parFoldMap
(Stream<A> as, F<A, B> map, Monoid<B> reduce) Maps with the given function across the given stream in parallel, while folding with the given monoid.<A,
B> Promise <B> ParModule.parFoldMap
(Stream<A> as, F<A, B> map, Monoid<B> reduce, F<Stream<A>, P2<Stream<A>, Stream<A>>> chunking) Maps with the given function across chunks of the given stream in parallel, while folding with the given monoid.Maps across a Stream in parallel.ParModule.parZipWith
(Stream<A> as, Stream<B> bs, F<A, F<B, C>> f) Zips two streams together with a given function, in parallel.Stream iteration inside a Promise.Turns a Stream of promises into a single promise of a Stream.<B> Stream
<B> Applies a stream of comonadic functions to this promise, returning a stream of values.Method parameters in fj.control.parallel with type arguments of type Stream -
Uses of Stream in fj.data
Modifier and TypeClassDescriptionprivate static final class
Stream.Cons<A>
private static final class
Stream.Nil<A>
Modifier and TypeFieldDescriptionZipper.left
TreeZipper.lefts
TreeZipper.parents
Zipper.right
TreeZipper.rights
LazyString.s
Modifier and TypeFieldDescriptionLazyString.eqS
static final F
<Stream<Character>, LazyString> LazyString.fromStream
First-class conversion from character streams to lazy strings.TreeZipper.parents
TreeZipper.parents
Java.Stream_BitSet
A function that converts streams to bit sets.Conversions.Stream_String
A function that converts streams to strings.static final F
<Stream<Character>, StringBuffer> Conversions.Stream_StringBuffer
A function that converts streams to string buffers.static final F
<Stream<Character>, StringBuilder> Conversions.Stream_StringBuilder
A function that converts streams to string builders.Conversions.String_Stream
A function that converts strings to streams.static final F
<StringBuffer, Stream<Character>> Conversions.StringBuffer_Stream
A function that converts string buffers to streams.static final F
<StringBuilder, Stream<Character>> Conversions.StringBuilder_Stream
A function that converts string builders to streams.Tree.subForest
Stream.Cons.tail
static final F
<LazyString, Stream<Character>> LazyString.toStream
First-class conversion from lazy strings to streams.Modifier and TypeMethodDescriptionAppends the given stream to this stream.Appends the given stream to this stream.final <B> Stream
<B> Performs function application within a stream (applicative functor pattern).static <A> Stream
<A> Stream.arrayStream
(A... as) final <B,
C, D, E, F$, G, H, I>
Stream<I> Stream.bind
(Stream<B> sb, Stream<C> sc, Stream<D> sd, Stream<E> se, Stream<F$> sf, Stream<G> sg, Stream<H> sh, F<A, F<B, F<C, F<D, F<E, F<F$, F<G, F<H, I>>>>>>>> f) Binds the given function across each element of this stream and the given streams with a final join.final <B,
C, D, E, F$, G, H>
Stream<H> Stream.bind
(Stream<B> sb, Stream<C> sc, Stream<D> sd, Stream<E> se, Stream<F$> sf, Stream<G> sg, F<A, F<B, F<C, F<D, F<E, F<F$, F<G, H>>>>>>> f) Binds the given function across each element of this stream and the given streams with a final join.final <B,
C, D, E, F$, G>
Stream<G> Stream.bind
(Stream<B> sb, Stream<C> sc, Stream<D> sd, Stream<E> se, Stream<F$> sf, F<A, F<B, F<C, F<D, F<E, F<F$, G>>>>>> f) Binds the given function across each element of this stream and the given streams with a final join.final <B,
C, D, E, F$>
Stream<F$> Binds the given function across each element of this stream and the given streams with a final join.final <B,
C, D, E>
Stream<E> Binds the given function across each element of this stream and the given streams with a final join.final <B,
C, D> Stream <D> Binds the given function across each element of this stream and the given streams with a final join.final <B,
C> Stream <C> Binds the given function across each element of this stream and the given stream with a final join.final <B,
C> Stream <C> Binds the given function across each element of this stream and the given stream with a final join.final <B> Stream
<B> Binds the given function across each element of this stream with a final join.final <B> Stream
<B> Binds the given function across the stream of substreams of this stream.Prepends (cons) the given element to this stream to product a new stream.static <A> Stream
<A> Prepends the given head element to the given tail element to produce a new stream.static <A> Stream
<A> Returns an infinite-length stream of the given elements cycling.TreeZipper.downParents()
Tree.drawSubTrees
(Show<A> s, Stream<Tree<A>> ts) Stream.drop
(int i) Drops the given number of elements from the head of this stream if they are available.Removes elements from the head of this stream that do not match the given predicate function until an element is found that does match or the stream is exhausted.static <A> Stream
<A> Stream.enumerationStream
(Enumeration<A> e) Filters elements from this stream by returning only elements which producetrue
when the given function is applied to them.Tree.flatten()
Puts the elements of the tree into a Stream, in pre-order.static <A> Stream
<A> Stream.forever
(Enumerator<A> e, A from) Returns a stream that is either infinite or bounded up to the maximum value of the given iterator starting at the given value and stepping at increments of1
.static <A> Stream
<A> Stream.forever
(Enumerator<A> e, A from, long step) Returns a stream that is either infinite or bounded up to the maximum value of the given iterator starting at the given value and stepping at the given increment.static <A,
B> Stream <A> Stream.fromFunction
(Enumerator<B> e, F<B, A> f, B i) Converts a function of an enumerable type to a stream of the results of that function, starting at the given index.static <A> Stream
<A> Stream.fromFunction
(F<Natural, A> f) Converts a function of natural numbers to a stream.Stream.fromString
(String s) Returns a stream of characters from the given string.Stream.inits()
Returns a stream of all prefixes of this stream.Stream.interleave
(Stream<A> as) Interleaves the given stream with this stream to produce a new stream.Stream.intersperse
(A a) Intersperses the given value between each two elements of the stream.static <A> Stream
<A> Stream.iterableStream
(Iterable<A> i) Takes the given iterable to a stream.static <A> Stream
<A> Returns a stream constructed by applying the given iteration function starting at the given value.static <A> Stream
<A> Stream.iterateWhile
(F<A, A> f, F<A, Boolean> p, A a) Creates a stream where the first item is calculated by applying the function on the third argument, the second item by applying the function on the previous result and so on.static <A> Stream
<A> Stream.iteratorStream
(Iterator<A> it) Constructs a stream with the given elements in the Iterator.static <A> Stream
<A> Java8.JavaStream_Stream
(Stream<A> s) static <A> Stream
<A> Joins the given stream of streams by concatenation.TreeZipper.lefts()
Returns the left siblings of the currently focused node.Zipper.lefts()
Returns a Stream of the elements to the left of focus.Tree.levels()
Provides a stream of the elements of the tree at each level, in level order.LazyString.lines()
Splits this lazy string into lines.TreeZipper.lp3nil()
final <B> Stream
<B> Maps the given function across this stream.private static <A> Stream
<A> Stream.mergePairs
(Ord<A> o, Stream<Stream<A>> s) private static <A> Stream
<A> Returns a new stream of all the items in this stream that do not appear in the given stream.static <A> Stream
<A> Stream.nil()
Returns an empty stream.TreeZipper.parents()
Returns the parents of the currently focused node.Stream.range
(int from) Returns an infinite stream of integers from the givenfrom
value (inclusive).Stream.range
(int from, long to) Returns a stream of integers from the givenfrom
value (inclusive) to the givento
value (exclusive).static <A> Stream
<A> Stream.range
(Enumerator<A> e, A from, A to) Returns a stream using the given enumerator from the given value to the other given value stepping at increments of1
.static <A> Stream
<A> Stream.range
(Enumerator<A> e, A from, A to, long step) Returns a stream using the given enumerator from the given value to the other given value stepping at the given increment.Filters elements from this stream by returning only elements which producefalse
when the given function is applied to them.static <A> Stream
<A> Stream.repeat
(A a) Returns an infinite-length stream of the given element.Returns a new stream resulting from replacing all elements that match the given predicate with the given element.Stream.reverse()
Reverse this stream in constant stack space.TreeZipper.rights()
Returns the right siblings of the currently focused node.Zipper.rights()
Returns a Stream of the elements to the right of focus.Sequence through the Stream monad.Sequence through the Stream monad.final <B> Stream
<B> Performs a bind across each stream element, but ignores the element value each time.Sequence through the Stream monad.List.sequenceStream
(List<Stream<B>> list) Sequence the given list and collect the output as a stream.Option.sequenceStream
(Option<Stream<B>> option) Sequence the given option and collect the output as a stream.Seq.sequenceStream
(Seq<Stream<B>> seq) Sequence the given seq and collect the output as a stream.Stream.sequenceStream
(Stream<Stream<B>> stream) Sequence the given stream and collect the output as a stream.static final <E,
C> Stream <Validation<E, C>> Validation.sequenceStream
(Validation<E, Stream<C>> validation) Sequence the given validation and collect the output as a stream.final <B> Stream
<B> Applies a stream of comonadic functions to this stream, returning a stream of values.static <A> Stream
<A> Stream.single
(A a) Returns a stream of one element containing the given value.Append the given element to this stream to product a new stream.Append the given element to this stream to produce a new stream.static <A> Stream
<A> Returns all the values in the given stream.Sort this stream according to the given ordering.Sort this stream according to the given ordering, using a parallel Quick Sort algorithm that uses the given parallelisation strategy.LazyString.split
(char c) Splits this lazy string by the given delimiter character.Splits this lazy string by characters matching the given predicate.static <A> Stream
<A> Stream.stream
(A... as) Constructs a stream with the given elements.Stream.substreams()
Returns a stream of all infixes of this stream.Stream.tails()
Returns a stream of the suffixes of this stream.Stream.take
(int n) Returns the firstn
elements from the head of this stream.Returns the first elements of the head of this stream that match the given predicate function.TreeZipper.toForest()
Returns the forest containing this location.Array.ImmutableProjection.toStream()
Returns a stream projection of this array.Array.toStream()
Returns a stream projection of this array.Either.LeftProjection.toStream()
Returns a single element stream if this projection has a value, otherwise an empty stream.Either.RightProjection.toStream()
Returns a single element stream if this projection has a value, otherwise an empty stream.Either3.LeftProjection.toStream()
Either3.MiddleProjection.toStream()
Either3.RightProjection.toStream()
Returns a stream of the values from this enumerator, starting at the given value, counting up.Returns a stream of the values from this enumerator, starting at the min of given Bounded, ending at the max, counting up.HashMap.toStream()
LazyString.toStream()
Gives a stream representation of this lazy string.List.toStream()
Returns a stream projection of this list.Option.toStream()
Returns a stream projection of this optional value.PriorityQueue.toStream()
Returns a stream of products with priority k and value a.Seq.toStream()
Converts this sequence to a StreamSet.toStream()
Returns a stream representation of this set.TreeMap.toStream()
Validation.FailProjection.toStream()
Returns a single element stream if this is a failing value, otherwise an empty list.Validation.toStream()
Returns a single element stream if this is a success value, otherwise an empty list.Zipper.toStream()
Returns the Stream representation of this zipper.Set.toStreamReverse()
Returns a stream representation of this set in reverse order.TreeMap.toStreamReverse()
Either.LeftProjection.traverseStream
(F<A, Stream<C>> f) Either.RightProjection.traverseStream
(F<B, Stream<C>> f) Either3.LeftProjection.traverseStream
(F<A, Stream<X>> f) Either3.MiddleProjection.traverseStream
(F<B, Stream<X>> f) Either3.RightProjection.traverseStream
(F<C, Stream<X>> f) List.traverseStream
(F<A, Stream<B>> f) Traverse this list with the given function and collect the output as a stream.Option.traverseStream
(F<A, Stream<B>> f) Traverse this option with the given function and collect the output as a stream.Seq.traverseStream
(F<A, Stream<B>> f) Traverse this seq with the given function and collect the output as a stream.Stream.traverseStream
(F<A, Stream<B>> f) Traverse this stream with the given function and collect the output as a stream.final <C> Stream
<Validation<E, C>> Validation.traverseStream
(F<T, Stream<C>> f) Traverse this validation with the given function and collect the output as a stream.Either.traverseStreamLeft
(F<A, Stream<C>> f) Traversable instance of LeftProjection of Either for Stream.Either.traverseStreamRight
(F<B, Stream<C>> f) Traversable instance of RightProjection of Either for Stream.private Stream
<Tree<TreeZipper<A>>> TreeZipper.uf
(F<TreeZipper<A>, Option<TreeZipper<A>>> f) static <A,
B> Stream <A> Unfolds across the given function starting at the given value to produce a stream.LazyString.words()
Splits this lazy string into words by spaces.final <B> Stream
<B> Zips this stream with the given stream of functions, applying each function in turn to the corresponding element in this stream to produce a new stream.Zips this stream with the given stream to produce a stream of pairs.Stream.zipIndex()
Zips this stream with the index of its element as a pair.final <B,
C> Stream <C> Zips this stream with the given stream using the given function to produce a new stream.final <B,
C> Stream <C> Zips this stream with the given stream using the given function to produce a new stream.Modifier and TypeMethodDescriptionConversions.Array_Stream()
A function that converts arrays to streams.Stream.bind_()
A first-class version of the bind function.Stream.bind_()
A first-class version of the bind function.Stream.bind_()
A first-class version of the bind function.Stream.cons()
Returns a function that prepends (cons) an element to a stream to produce a new stream.Stream.cons()
Returns a function that prepends (cons) an element to a stream to produce a new stream.Stream.cons_()
Returns a function that prepends (cons) an element to a stream to produce a new stream.Stream.cons_()
Returns a function that prepends (cons) an element to a stream to produce a new stream.TreeZipper.downParents()
TreeZipper.downParents()
private static <A> F
<TreeZipper<A>, P2<TreeZipper<A>, P1<Stream<TreeZipper<A>>>>> TreeZipper.dwn()
Conversions.Either_StreamA()
A function that converts eithers to streams.Conversions.Either_StreamB()
A function that converts eithers to streams.Stream.filter()
Returns a first-class version of the filter function.Stream.filter()
Returns a first-class version of the filter function.Tree.flatten_()
flatten :: Tree a -> [a] flatten t = squish t []
Stream.foldRight()
A first-class version of the foldRight function.Stream.inits()
Returns a stream of all prefixes of this stream.Stream.isEmpty_()
Returns a function that determines whether a given stream is empty.Stream.isNotEmpty_()
Returns a function that determines whether a given stream is not empty.Stream.iterate()
A first-class version of the iterate function.Stream.join()
A first-class version of joinStream.join()
A first-class version of joinStream.join()
A first-class version of joinTree.levels()
Provides a stream of the elements of the tree at each level, in level order.static F
<LazyString, Stream<LazyString>> LazyString.lines_()
Conversions.List_Stream()
A function that converts lists to streams.TreeZipper.lp3nil()
TreeZipper.lp3nil()
Stream.map_()
Provides a first-class version of the map function.Stream.map_()
Provides a first-class version of the map function.Maps the given function of arity-2 across this stream and returns a function that applies all the resulting functions to a given argument.Stream.mergePairs
(Ord<A> o, Stream<Stream<A>> s) Stream.nil_()
Returns an empty stream.Tree.node()
First-class constructor of trees.Conversions.Option_Stream()
A function that converts options to streams.Returns the tail of this stream if there is one or the given argument if this stream is empty.TreeZipper.p()
Returns the product-4 representation of this zipper.TreeZipper.p()
Returns the product-4 representation of this zipper.TreeZipper.p()
Returns the product-4 representation of this zipper.TreeZipper.p()
Returns the product-4 representation of this zipper.TreeZipper.p()
Returns the product-4 representation of this zipper.Zipper.p()
Returns the product-3 representation of this Zipper.Zipper.p()
Returns the product-3 representation of this Zipper.static <A> F
<TreeZipper<A>, P4<Tree<A>, Stream<Tree<A>>, Stream<Tree<A>>, Stream<P3<Stream<Tree<A>>, A, Stream<Tree<A>>>>>> TreeZipper.p_()
A first-class function that returns the product-4 representation of a given zipper.static <A> F
<TreeZipper<A>, P4<Tree<A>, Stream<Tree<A>>, Stream<Tree<A>>, Stream<P3<Stream<Tree<A>>, A, Stream<Tree<A>>>>>> TreeZipper.p_()
A first-class function that returns the product-4 representation of a given zipper.static <A> F
<TreeZipper<A>, P4<Tree<A>, Stream<Tree<A>>, Stream<Tree<A>>, Stream<P3<Stream<Tree<A>>, A, Stream<Tree<A>>>>>> TreeZipper.p_()
A first-class function that returns the product-4 representation of a given zipper.static <A> F
<TreeZipper<A>, P4<Tree<A>, Stream<Tree<A>>, Stream<Tree<A>>, Stream<P3<Stream<Tree<A>>, A, Stream<Tree<A>>>>>> TreeZipper.p_()
A first-class function that returns the product-4 representation of a given zipper.static <A> F
<TreeZipper<A>, P4<Tree<A>, Stream<Tree<A>>, Stream<Tree<A>>, Stream<P3<Stream<Tree<A>>, A, Stream<Tree<A>>>>>> TreeZipper.p_()
A first-class function that returns the product-4 representation of a given zipper.Zipper.p_()
A first-class function that yields the product-3 representation of a given Zipper.Zipper.p_()
A first-class function that yields the product-3 representation of a given Zipper.TreeZipper.parents()
Returns the parents of the currently focused node.TreeZipper.parents()
Returns the parents of the currently focused node.Turn a stream of functions into a function returning a stream.Stream.sequenceEither
(Stream<Either<L, B>> stream) Sequence the given stream and collect the output on the right side of an either.Stream.sequenceEitherLeft
(Stream<Either<B, R>> stream) Sequence the given stream and collect the output on the left side of an either.Stream.sequenceEitherRight
(Stream<Either<L, B>> stream) Sequence the given stream and collect the output on the right side of an either.Sequence the given stream and collect the output as a function.Stream.sequenceIO
(Stream<IO<B>> stream) Sequence the given stream and collect the output as an IO.Stream.sequenceList
(Stream<List<B>> stream) Sequence the given stream and collect the output as a list.Stream.sequenceOption
(Stream<Option<B>> stream) Sequence the given stream and collect the output as an stream.Stream.sequenceP1
(Stream<P1<B>> stream) Sequence the given stream and collect the output as a P1.Stream.sequenceSeq
(Stream<Seq<B>> stream) Sequence the given stream and collect the output as a seq.Stream.sequenceSet
(Ord<B> ord, Stream<Set<B>> stream) Sequence the given stream and collect the output as a set; use the given ord to order the set.Stream.sequenceStream
(Stream<Stream<B>> stream) Sequence the given stream and collect the output as a stream.static <B> Trampoline
<Stream<B>> Stream.sequenceTrampoline
(Stream<Trampoline<B>> stream) Sequence the given stream and collect the output as a trampoline.static <E,
B> Validation <E, Stream<B>> Stream.sequenceValidation
(Stream<Validation<E, B>> stream) Sequence the given stream and collect the output as a validation.static <E,
B> Validation <E, Stream<B>> Stream.sequenceValidation
(Semigroup<E> semigroup, Stream<Validation<E, B>> stream) Sequence the given stream and collect the output as a validation; use the given semigroup to reduce the errors.IOFunctions.sequenceWhile
(Stream<IO<A>> stream, F<A, Boolean> f) IOFunctions.sequenceWhileEager
(Stream<IO<A>> stream, F<A, Boolean> f) Stream.single()
Returns a function that yields a stream containing its argument.Returns a tuple where the first element is the longest prefix of this stream that satisfies the given predicate and the second element is the remainder of the stream.Returns a tuple where the first element is the longest prefix of this stream that satisfies the given predicate and the second element is the remainder of the stream.Returns a tuple where the first element is the longest prefix of this stream that does not satisfy the given predicate and the second element is the remainder of the stream.Returns a tuple where the first element is the longest prefix of this stream that does not satisfy the given predicate and the second element is the remainder of the stream.TreeZipper.splitChildren
(Stream<A> acc, Stream<A> xs, int n) TreeZipper.splitChildren
(Stream<A> acc, Stream<A> xs, int n) Conversions.Stream_Array()
A function that converts streams to arrays.static <A> F
<Stream<A>, ArrayBlockingQueue<A>> Java.Stream_ArrayBlockingQueue
(boolean fair) A function that converts streams to array blocking queues.Java.Stream_ArrayList()
A function that converts streams to array lists.static <A> F
<Stream<A>, ConcurrentLinkedQueue<A>> Java.Stream_ConcurrentLinkedQueue()
A function that converts streams to concurrent linked queues.static <A> F
<Stream<A>, CopyOnWriteArrayList<A>> Java.Stream_CopyOnWriteArrayList()
A function that converts streams to copy on write array lists.static <A> F
<Stream<A>, CopyOnWriteArraySet<A>> Java.Stream_CopyOnWriteArraySet()
A function that converts streams to copy on write array sets.static <A extends Delayed>
F<Stream<A>, DelayQueue<A>> Java.Stream_DelayQueue()
A function that converts streams to delay queues.Conversions.Stream_Either()
A function that converts streams to eithers.Java.Stream_EnumSet()
A function that converts streams to enum sets.Java.Stream_HashSet()
A function that converts streams to hash sets.Java.Stream_Iterable()
A function that converts streams to iterable.Java8.Stream_JavaStream()
static <A> F
<Stream<A>, LinkedBlockingQueue<A>> Java.Stream_LinkedBlockingQueue()
A function that converts streams to linked blocking queues.static <A> F
<Stream<A>, LinkedHashSet<A>> Java.Stream_LinkedHashSet()
A function that converts streams to linked hash sets.static <A> F
<Stream<A>, LinkedList<A>> Java.Stream_LinkedList()
A function that converts streams to linked lists.Conversions.Stream_List()
A function that converts streams to lists.Conversions.Stream_Option()
A function that converts streams to options.static <A> F
<Stream<A>, PriorityBlockingQueue<A>> Java.Stream_PriorityBlockingQueue()
A function that converts streams to priority blocking queues.static <A> F
<Stream<A>, PriorityQueue<A>> Java.Stream_PriorityQueue()
A function that converts streams to priority queues.Java.Stream_Stack()
A function that converts streams to stacks.static <A> F
<Stream<A>, SynchronousQueue<A>> Java.Stream_SynchronousQueue
(boolean fair) A function that converts streams to synchronous queues.Java.Stream_TreeSet()
A function that converts streams to tree sets.Java.Stream_Vector()
A function that converts streams to vectors.Tree.subForest()
Returns a stream of the tree's subtrees.Tree.subForest_()
Provides a transformation from a tree to its subforest.Stream.substreams()
Returns a stream of all infixes of this stream.Stream.Cons.tail()
Stream.Nil.tail()
Stream.tail()
The stream without the first element or fails for the empty stream.Stream.tails()
Returns a stream of the suffixes of this stream.static <A> Collector
<A, List.Buffer<A>, Stream<A>> Collectors.toStream()
Stream.traverseEither
(F<A, Either<L, B>> f) Traverse this stream with the given function and collect the output on the right side of an either.Stream.traverseEitherLeft
(F<A, Either<B, R>> f) Traverse this stream with the given function and collect the output on the left side of an either.Stream.traverseEitherRight
(F<A, Either<L, B>> f) Traverse this stream with the given function and collect the output on the right side of an either.Traverse this stream with the given function and collect the output as a function.Stream.traverseIO
(F<A, IO<B>> f) Traverse this stream with the given function and collect the output as an IO.Stream.traverseList
(F<A, List<B>> f) Traverse this stream with the given function and collect the output as a list.Stream.traverseOption
(F<A, Option<B>> f) Traverses through the Seq with the given functionStream.traverseP1
(F<A, P1<B>> f) Traverse this stream with the given function and collect the output as a p1.Stream.traverseSeq
(F<A, Seq<B>> f) Traverse this stream with the given function and collect the output as a seq.Stream.traverseSet
(Ord<B> ord, F<A, Set<B>> f) Traverse this stream with the given function and collect the output as a set; use the given ord to order the set.Stream.traverseStream
(F<A, Stream<B>> f) Traverse this stream with the given function and collect the output as a stream.<B> Trampoline
<Stream<B>> Stream.traverseTrampoline
(F<A, Trampoline<B>> f) Traverse this stream with the given function and collect the output as a trampoline.final <E,
B> Validation <E, Stream<B>> Stream.traverseValidation
(F<A, Validation<E, B>> f) Traverse this stream with the given function and collect the output as a validation.final <E,
B> Validation <E, Stream<B>> Stream.traverseValidation
(Semigroup<E> semigroup, F<A, Validation<E, B>> f) Traverse this stream with the given function and collect the output as a validation; use the given semigroup to reduce the errors.static <A> F
<Tree<A>, F<Stream<Tree<A>>, F<Stream<Tree<A>>, F<Stream<P3<Stream<Tree<A>>, A, Stream<Tree<A>>>>, TreeZipper<A>>>>> TreeZipper.treeZipper()
First-class constructor for tree zippers.static <A> F
<Tree<A>, F<Stream<Tree<A>>, F<Stream<Tree<A>>, F<Stream<P3<Stream<Tree<A>>, A, Stream<Tree<A>>>>, TreeZipper<A>>>>> TreeZipper.treeZipper()
First-class constructor for tree zippers.static <A> F
<Tree<A>, F<Stream<Tree<A>>, F<Stream<Tree<A>>, F<Stream<P3<Stream<Tree<A>>, A, Stream<Tree<A>>>>, TreeZipper<A>>>>> TreeZipper.treeZipper()
First-class constructor for tree zippers.static <A> F
<Tree<A>, F<Stream<Tree<A>>, F<Stream<Tree<A>>, F<Stream<P3<Stream<Tree<A>>, A, Stream<Tree<A>>>>, TreeZipper<A>>>>> TreeZipper.treeZipper()
First-class constructor for tree zippers.static <A> F
<Tree<A>, F<Stream<Tree<A>>, F<Stream<Tree<A>>, F<Stream<P3<Stream<Tree<A>>, A, Stream<Tree<A>>>>, TreeZipper<A>>>>> TreeZipper.treeZipper()
First-class constructor for tree zippers.static F
<Stream<LazyString>, LazyString> LazyString.unlines_()
Transforms a stream of pairs into a stream of first components and a stream of second components.Transforms a stream of pairs into a stream of first components and a stream of second components.Zipper.zipper()
First-class constructor of zippers.Zipper.zipper()
First-class constructor of zippers.Stream.zipWith()
A first-class version of the zipWith function.Stream.zipWith()
A first-class version of the zipWith function.Stream.zipWith()
A first-class version of the zipWith function.Partially-applied version of zipWith.Partially-applied version of zipWith.Modifier and TypeMethodDescriptionAppends the given stream to this stream.final <B> Stream
<B> Performs function application within a stream (applicative functor pattern).static String
Returns a string from the given stream of characters.final <B,
C, D, E, F$, G, H, I>
Stream<I> Stream.bind
(Stream<B> sb, Stream<C> sc, Stream<D> sd, Stream<E> se, Stream<F$> sf, Stream<G> sg, Stream<H> sh, F<A, F<B, F<C, F<D, F<E, F<F$, F<G, F<H, I>>>>>>>> f) Binds the given function across each element of this stream and the given streams with a final join.final <B,
C, D, E, F$, G, H>
Stream<H> Stream.bind
(Stream<B> sb, Stream<C> sc, Stream<D> sd, Stream<E> se, Stream<F$> sf, Stream<G> sg, F<A, F<B, F<C, F<D, F<E, F<F$, F<G, H>>>>>>> f) Binds the given function across each element of this stream and the given streams with a final join.final <B,
C, D, E, F$, G>
Stream<G> Stream.bind
(Stream<B> sb, Stream<C> sc, Stream<D> sd, Stream<E> se, Stream<F$> sf, F<A, F<B, F<C, F<D, F<E, F<F$, G>>>>>> f) Binds the given function across each element of this stream and the given streams with a final join.final <B,
C, D, E, F$>
Stream<F$> Binds the given function across each element of this stream and the given streams with a final join.final <B,
C, D, E>
Stream<E> Binds the given function across each element of this stream and the given streams with a final join.final <B,
C, D> Stream <D> Binds the given function across each element of this stream and the given streams with a final join.final <B,
C> Stream <C> Binds the given function across each element of this stream and the given stream with a final join.final <B,
C> Stream <C> Binds the given function across each element of this stream and the given stream with a final join.static <A> Stream
<A> Returns an infinite-length stream of the given elements cycling.Tree.drawSubTrees
(Show<A> s, Stream<Tree<A>> ts) static <A> Option
<TreeZipper<A>> TreeZipper.fromForest
(Stream<Tree<A>> ts) Creates a new tree zipper focused on the first element of the given forest.static LazyString
LazyString.fromStream
(Stream<Character> s) Constructs a lazy string from a stream of characters.Zipper.fromStream
(Stream<A> a) Possibly create a zipper if the provided stream has at least one element, otherwise None.Zipper.fromStreamEnd
(Stream<A> a) Possibly create a zipper if the provided stream has at least one element, otherwise None.Stream.interleave
(Stream<A> as) Interleaves the given stream with this stream to produce a new stream.static <A> Stream
<A> Joins the given stream of streams by concatenation.private static <A> Stream
<A> Stream.mergePairs
(Ord<A> o, Stream<Stream<A>> s) private static <A> Stream
<A> Returns a new stream of all the items in this stream that do not appear in the given stream.static <A> Tree
<A> Creates a new tree given a root and a (potentially infinite) subforest.static Natural
Takes the product of a stream of natural numbers.final <B> Stream
<B> Performs a bind across each stream element, but ignores the element value each time.Turn a stream of functions into a function returning a stream.Stream.sequenceEither
(Stream<Either<L, B>> stream) Sequence the given stream and collect the output on the right side of an either.Stream.sequenceEitherLeft
(Stream<Either<B, R>> stream) Sequence the given stream and collect the output on the left side of an either.Stream.sequenceEitherRight
(Stream<Either<L, B>> stream) Sequence the given stream and collect the output on the right side of an either.Sequence the given stream and collect the output as a function.Stream.sequenceIO
(Stream<IO<B>> stream) Sequence the given stream and collect the output as an IO.Stream.sequenceList
(Stream<List<B>> stream) Sequence the given stream and collect the output as a list.Stream.sequenceOption
(Stream<Option<B>> stream) Sequence the given stream and collect the output as an stream.Stream.sequenceP1
(Stream<P1<B>> stream) Sequence the given stream and collect the output as a P1.Stream.sequenceSeq
(Stream<Seq<B>> stream) Sequence the given stream and collect the output as a seq.Stream.sequenceSet
(Ord<B> ord, Stream<Set<B>> stream) Sequence the given stream and collect the output as a set; use the given ord to order the set.Stream.sequenceStream
(Stream<Stream<B>> stream) Sequence the given stream and collect the output as a stream.static <B> Trampoline
<Stream<B>> Stream.sequenceTrampoline
(Stream<Trampoline<B>> stream) Sequence the given stream and collect the output as a trampoline.static <E,
B> Validation <E, Stream<B>> Stream.sequenceValidation
(Stream<Validation<E, B>> stream) Sequence the given stream and collect the output as a validation.static <E,
B> Validation <E, Stream<B>> Stream.sequenceValidation
(Semigroup<E> semigroup, Stream<Validation<E, B>> stream) Sequence the given stream and collect the output as a validation; use the given semigroup to reduce the errors.final <B> Stream
<B> Applies a stream of comonadic functions to this stream, returning a stream of values.IOFunctions.sequenceWhile
(Stream<IO<A>> stream, F<A, Boolean> f) IOFunctions.sequenceWhileEager
(Stream<IO<A>> stream, F<A, Boolean> f) static <A> Stream
<A> Returns all the values in the given stream.TreeZipper.splitChildren
(Stream<A> acc, Stream<A> xs, int n) static <A> Stream
<A> Java8.Stream_JavaStream
(Stream<A> s) static Natural
Sums a stream of natural numbers.static <A> TreeZipper
<A> TreeZipper.treeZipper
(Tree<A> tree, Stream<Tree<A>> lefts, Stream<Tree<A>> rights, Stream<P3<Stream<Tree<A>>, A, Stream<Tree<A>>>> parents) Creates a new tree zipper given a currently selected tree, a forest on the left, a forest on the right, and a stream of parent contexts.static LazyString
LazyString.unlines
(Stream<LazyString> str) Joins the given stream of lazy strings into one, separated by newlines.static LazyString
LazyString.unwords
(Stream<LazyString> str) Joins the given stream of lazy strings into one, separated by spaces.Transforms a stream of pairs into a stream of first components and a stream of second components.final <B> Stream
<B> Zips this stream with the given stream of functions, applying each function in turn to the corresponding element in this stream to produce a new stream.Zips this stream with the given stream to produce a stream of pairs.static <A> Zipper
<A> Creates a new Zipper with the given streams before and after the focus, and the given focused item.final <B,
C> Stream <C> Zips this stream with the given stream using the given function to produce a new stream.final <B,
C> Stream <C> Zips this stream with the given stream using the given function to produce a new stream.Modifier and TypeMethodDescriptionAppends the given stream to this stream.final <B> Stream
<B> Binds the given function across each element of this stream with a final join.static <A,
B> Tree <B> final <B> Stream
<B> Binds the given function across the stream of substreams of this stream.static <A> Stream
<A> Prepends the given head element to the given tail element to produce a new stream.static <A> Stream
<A> Joins the given stream of streams by concatenation.Stream.mergePairs
(Ord<A> o, Stream<Stream<A>> s) private static <A> Stream
<A> static <A> Tree
<A> Creates a new tree given a root and a (potentially infinite) subforest.Returns the tail of this stream if there is one or the given argument if this stream is empty.Sequence through the Stream monad.Sequence through the Stream monad.Sequence through the Stream monad.List.sequenceStream
(List<Stream<B>> list) Sequence the given list and collect the output as a stream.Option.sequenceStream
(Option<Stream<B>> option) Sequence the given option and collect the output as a stream.Seq.sequenceStream
(Seq<Stream<B>> seq) Sequence the given seq and collect the output as a stream.Stream.sequenceStream
(Stream<Stream<B>> stream) Sequence the given stream and collect the output as a stream.static final <E,
C> Stream <Validation<E, C>> Validation.sequenceStream
(Validation<E, Stream<C>> validation) Sequence the given validation and collect the output as a stream.final <B> Stream
<B> Applies a stream of comonadic functions to this stream, returning a stream of values.Either.LeftProjection.traverseStream
(F<A, Stream<C>> f) Either.RightProjection.traverseStream
(F<B, Stream<C>> f) Either3.LeftProjection.traverseStream
(F<A, Stream<X>> f) Either3.MiddleProjection.traverseStream
(F<B, Stream<X>> f) Either3.RightProjection.traverseStream
(F<C, Stream<X>> f) List.traverseStream
(F<A, Stream<B>> f) Traverse this list with the given function and collect the output as a stream.Option.traverseStream
(F<A, Stream<B>> f) Traverse this option with the given function and collect the output as a stream.Seq.traverseStream
(F<A, Stream<B>> f) Traverse this seq with the given function and collect the output as a stream.Stream.traverseStream
(F<A, Stream<B>> f) Traverse this stream with the given function and collect the output as a stream.final <C> Stream
<Validation<E, C>> Validation.traverseStream
(F<T, Stream<C>> f) Traverse this validation with the given function and collect the output as a stream.Either.traverseStreamLeft
(F<A, Stream<C>> f) Traversable instance of LeftProjection of Either for Stream.Either.traverseStreamRight
(F<B, Stream<C>> f) Traversable instance of RightProjection of Either for Stream.final <B> B
Performs a reduction on this stream using the given arguments.Tree.unfoldTree
(F<B, P2<A, P1<Stream<B>>>> f) Builds a tree from a seed value.static <A> Zipper
<A> Creates a new Zipper from the given triple.static <A> Zipper
<A> Creates a new Zipper from the given triple. -
Uses of Stream in fj.data.fingertrees
Methods in fj.data.fingertrees that return Stream -
Uses of Stream in fj.data.hamt
Methods in fj.data.hamt that return StreamModifier and TypeMethodDescriptionBitSet.toStream()
Returns a stream of boolean where the head is the most significant bit (the bit with the largest value)HashArrayMappedTrie.toStream()
Returns a stream of key-value pairs.Node.toStream()
Methods in fj.data.hamt with parameters of type Stream -
Uses of Stream in fj.data.optic
Methods in fj.data.optic that return types with arguments of type StreamModifier and TypeMethodDescriptionLens.modifyStreamF
(F<A, Stream<A>> f) Optional.modifyStreamF
(F<A, Stream<A>> f) PIso.modifyStreamF
(F<A, Stream<B>> f) modify polymorphically the target of aPIso
with an Applicative functionPLens.modifyStreamF
(F<A, Stream<B>> f) modify polymorphically the target of aPLens
with an Applicative functionPOptional.modifyStreamF
(F<A, Stream<B>> f) modify polymorphically the target of aPOptional
with an Applicative functionPPrism.modifyStreamF
(F<A, Stream<B>> f) modify polymorphically the target of aPPrism
with an Applicative functionPTraversal.modifyStreamF
(F<A, Stream<B>> f) modify polymorphically the target of aPTraversal
with an Applicative functionTraversal.modifyStreamF
(F<A, Stream<A>> f) Method parameters in fj.data.optic with type arguments of type StreamModifier and TypeMethodDescriptionLens.modifyStreamF
(F<A, Stream<A>> f) Optional.modifyStreamF
(F<A, Stream<A>> f) PIso.modifyStreamF
(F<A, Stream<B>> f) modify polymorphically the target of aPIso
with an Applicative functionPLens.modifyStreamF
(F<A, Stream<B>> f) modify polymorphically the target of aPLens
with an Applicative functionPOptional.modifyStreamF
(F<A, Stream<B>> f) modify polymorphically the target of aPOptional
with an Applicative functionPPrism.modifyStreamF
(F<A, Stream<B>> f) modify polymorphically the target of aPPrism
with an Applicative functionPTraversal.modifyStreamF
(F<A, Stream<B>> f) modify polymorphically the target of aPTraversal
with an Applicative functionTraversal.modifyStreamF
(F<A, Stream<A>> f) -
Uses of Stream in fj.data.vector
Methods in fj.data.vector that return StreamModifier and TypeMethodDescriptionV2.toStream()
Returns a stream of the elements of this vector.V3.toStream()
Returns a stream of the elements of this vector.V4.toStream()
Returns a stream of the elements of this vector.V5.toStream()
Returns a stream of the elements of this vector.V6.toStream()
Returns a stream of the elements of this vector.V7.toStream()
Returns a stream of the elements of this vector.V8.toStream()
Returns a stream of the elements of this vector.Methods in fj.data.vector that return types with arguments of type StreamModifier and TypeMethodDescriptionV2.toStream_()
Returns a function that transforms a vector-2 to a stream of its elements.V3.toStream_()
Returns a function that transforms a vector-3 to a stream of its elements.V4.toStream_()
Returns a function that transforms a vector-4 to a stream of its elements.V5.toStream_()
Returns a function that transforms a vector-5 to a stream of its elements.V6.toStream_()
Returns a function that transforms a vector-6 to a stream of its elements.V7.toStream_()
Returns a function that transforms a vector-7 to a stream of its elements.V8.toStream_()
Returns a function that transforms a vector-8 to a stream of its elements. -
Uses of Stream in fj.function
Methods in fj.function with parameters of type StreamModifier and TypeMethodDescriptionstatic boolean
Returns true if all the elements of the given stream are true.Returns composed predicatestatic boolean
Returns true if any element of the given stream is true.Returns a composed predicate of given Stream of predicates -
Uses of Stream in fj.parser
Modifier and TypeMethodDescriptionReturns a parser that produces an alpha character.Returns a parser that produces an alpha character.Returns a parser that produces an alpha-numeric character.Returns a parser that produces an alpha-numeric character.Parser.CharsParser.character
(E e) Returns a parser that produces a character if one is available or fails with the given error.Returns a parser that produces the given character or fails otherwise.Returns a parser that produces a character if one is available or fails with the given error.Returns a parser that produces the given character or fails otherwise.Parser.CharsParser.characters
(E missing, int n) Returns a parser that produces the given number of characters, or fails with the given error.Parser.CharsParser.characters
(E missing, int n) Returns a parser that produces the given number of characters, or fails with the given error.Parser.CharsParser.characters
(E missing, F<Character, E> sat, Stream<Character> cs) Returns a parser that produces the given stream of characters or fails otherwise.Parser.CharsParser.characters
(E missing, F<Character, E> sat, Stream<Character> cs) Returns a parser that produces the given stream of characters or fails otherwise.Parser.CharsParser.characters
(F0<E> missing, int n) Returns a parser that produces the given number of characters, or fails with the given error.Parser.CharsParser.characters
(F0<E> missing, int n) Returns a parser that produces the given number of characters, or fails with the given error.Returns a parser that produces the given stream of characters or fails otherwise.Returns a parser that produces the given stream of characters or fails otherwise.Returns a parser that produces a defined character.Returns a parser that produces a defined character.Returns a parser that produces a digit (0 to 9).Returns a parser that produces a digit (0 to 9).Parser.StreamParser.element
(E e) Returns a parser that produces an element from the stream if it is available and fails otherwise.Returns a parser that produces an element from the stream if it is available and fails otherwise.Parser.CharsParser.highSurrogate
(E missing, F<Character, E> sat) Returns a parser that produces a high-surrogate character.Parser.CharsParser.highSurrogate
(F0<E> missing, F<Character, E> sat) Returns a parser that produces a high-surrogate character.Parser.CharsParser.identifierIgnorable
(E missing, F<Character, E> sat) Returns a parser that produces an identifier-ignorable character.Parser.CharsParser.identifierIgnorable
(F0<E> missing, F<Character, E> sat) Returns a parser that produces an identifier-ignorable character.Parser.CharsParser.isoControl
(E missing, F<Character, E> sat) Returns a parser that produces an ISO control character.Parser.CharsParser.isoControl
(F0<E> missing, F<Character, E> sat) Returns a parser that produces an ISO control character.Parser.CharsParser.javaIdentifierPart
(E missing, F<Character, E> sat) Returns a parser that produces a Java identifier part character.Parser.CharsParser.javaIdentifierPart
(F0<E> missing, F<Character, E> sat) Returns a parser that produces a Java identifier part character.Parser.CharsParser.javaIdentifierStart
(E missing, F<Character, E> sat) Returns a parser that produces a Java identifier start character.Parser.CharsParser.javaIdentifierStart
(F0<E> missing, F<Character, E> sat) Returns a parser that produces a Java identifier start character.Returns a parser that produces a lower-case character.Returns a parser that produces a lower-case character.Parser.CharsParser.lowSurrogate
(E missing, F<Character, E> sat) Returns a parser that produces a low-surrogate character.Parser.CharsParser.lowSurrogate
(F0<E> missing, F<Character, E> sat) Returns a parser that produces a low-surrogate character.Returns a parser that produces a mirrored character.Returns a parser that produces a mirrored character.Parser.repeat()
Returns a parser that repeats application of this parser zero or many times.Parser.repeat1()
Returns a parser that repeats application of this parser one or many times.Returns a parser that produces an element from the stream that satisfies the given predicate, or fails.Returns a parser that produces an element from the stream that satisfies the given predicate, or fails.Returns a parser that produces a space character.Returns a parser that produces a space character.Returns a parser that produces the given string or fails otherwise.Returns a parser that produces the given string or fails otherwise.Returns a parser that produces a title-case character.Returns a parser that produces a title-case character.Parser.CharsParser.unicodeIdentiferPart
(E missing, F<Character, E> sat) Returns a parser that produces a unicode identifier part character.Parser.CharsParser.unicodeIdentiferPart
(F0<E> missing, F<Character, E> sat) Returns a parser that produces a unicode identifier part character.Parser.CharsParser.unicodeIdentiferStart
(E missing, F<Character, E> sat) Returns a parser that produces a unicode identifier start character.Parser.CharsParser.unicodeIdentiferStart
(F0<E> missing, F<Character, E> sat) Returns a parser that produces a unicode identifier start character.Returns a parser that produces a upper-case character.Returns a parser that produces a upper-case character.Parser.CharsParser.whitespace
(E missing, F<Character, E> sat) Returns a parser that produces a white-space character.Parser.CharsParser.whitespace
(F0<E> missing, F<Character, E> sat) Returns a parser that produces a white-space character.Modifier and TypeMethodDescriptionParser.CharsParser.characters
(E missing, F<Character, E> sat, Stream<Character> cs) Returns a parser that produces the given stream of characters or fails otherwise.Returns a parser that produces the given stream of characters or fails otherwise.