- filter(Predicate<? super T>) - Method in class com.aol.cyclops.hkt.cyclops.MaybeType.Box
-
- filter(Predicate<? super PT>) - Method in class com.aol.cyclops.hkt.cyclops.XorType.Box
-
- filter(Predicate<? super T>, Higher<CRE, T>) - Method in class com.aol.cyclops.hkt.instances.General.SupplierMonadZero
-
- filter(Predicate<? super T>, Higher<CRE, T>) - Method in interface com.aol.cyclops.hkt.typeclasses.Filterable
-
- filter(Predicate<? super T>, Higher<CRE, T>) - Method in interface com.aol.cyclops.hkt.typeclasses.monad.MonadZero
-
- Filterable<CRE> - Interface in com.aol.cyclops.hkt.typeclasses
-
- FilterableFunctor<CRE> - Interface in com.aol.cyclops.hkt.typeclasses.functor
-
- flatMap(Function<? super T, ? extends MonadicValue<? extends R>>) - Method in class com.aol.cyclops.hkt.cyclops.EvalType.Box
-
- flatMap(Function<? super T, ? extends MonadicValue<? extends R>>) - Method in class com.aol.cyclops.hkt.cyclops.MaybeType.Box
-
- flatMap(Function<? super PT, ? extends MonadicValue2<? extends LT1, ? extends RT1>>) - Method in class com.aol.cyclops.hkt.cyclops.XorType.Box
-
- flatMap(Function<? super T, ? extends Higher<CRE, R>>, Higher<CRE, T>) - Method in class com.aol.cyclops.hkt.instances.General.GeneralMonad
-
- flatMap(Function<? super T, ? extends Higher<CRE, R>>, Higher<CRE, T>) - Method in class com.aol.cyclops.hkt.instances.General.GeneralMonadPlus
-
- flatMap(Function<? super T, ? extends Higher<CRE, R>>, Higher<CRE, T>) - Method in class com.aol.cyclops.hkt.instances.General.GeneralMonadZero
-
- flatMap(Function<? super T, ? extends Higher<CRE, R>>, Higher<CRE, T>) - Method in class com.aol.cyclops.hkt.instances.General.SupplierMonadPlus
-
- flatMap(Function<? super T, ? extends Higher<CRE, R>>, Higher<CRE, T>) - Method in class com.aol.cyclops.hkt.instances.General.SupplierMonadZero
-
- flatMap(Function<? super T, ? extends Higher<CRE, R>>, Higher<CRE, T>) - Method in interface com.aol.cyclops.hkt.typeclasses.monad.Monad
-
- flatten(Higher<CRE, Higher<CRE, T>>) - Method in interface com.aol.cyclops.hkt.typeclasses.monad.Monad
-
- foldable() - Static method in class com.aol.cyclops.hkt.instances.cyclops.EvalInstances
-
int sum = Evals.foldable()
.foldLeft(0, (a,b)->a+b, EvalType.widen(Arrays.asEval(1,2,3,4)));
//10
- foldable() - Static method in class com.aol.cyclops.hkt.instances.cyclops.FutureWInstances
-
int sum = FutureWs.foldable()
.foldLeft(0, (a,b)->a+b, FutureType.widen(FutureW.ofResult(4)));
//4
- foldable() - Static method in class com.aol.cyclops.hkt.instances.cyclops.MaybeInstances
-
int sum = Maybes.foldable()
.foldLeft(0, (a,b)->a+b, MaybeType.widen(Maybe.just(1)));
//1
- foldable(BiFunction<Monoid<T>, Higher<CRE, T>, T>, BiFunction<Monoid<T>, Higher<CRE, T>, T>) - Static method in interface com.aol.cyclops.hkt.instances.General
-
- foldable() - Static method in class com.aol.cyclops.hkt.instances.jdk.CompletableFutureInstances
-
int sum = CompletableFutures.foldable()
.foldLeft(0, (a,b)->a+b, CompletableFutureType.widen(CompletableFuture.completedFuture(3)));
//3
- foldable() - Static method in class com.aol.cyclops.hkt.instances.jdk.DequeInstances
-
int sum = Deques.foldable()
.foldLeft(0, (a,b)->a+b, DequeType.widen(DequeX.of(1,2,3,4)));
//10
- foldable() - Static method in class com.aol.cyclops.hkt.instances.jdk.ListInstances
-
int sum = Lists.foldable()
.foldLeft(0, (a,b)->a+b, ListType.widen(Arrays.asList(1,2,3,4)));
//10
- foldable() - Static method in class com.aol.cyclops.hkt.instances.jdk.OptionalInstances
-
int sum = Optionals.foldable()
.foldLeft(0, (a,b)->a+b, OptionalType.widen(Arrays.asOptional(1,2,3,4)));
//10
- foldable() - Static method in class com.aol.cyclops.hkt.instances.jdk.QueueInstances
-
int sum = Queues.foldable()
.foldLeft(0, (a,b)->a+b, QueueType.widen(QueueX.of(1,2,3,4)));
//10
- foldable() - Static method in class com.aol.cyclops.hkt.instances.jdk.StreamInstances
-
int sum = Streams.foldable()
.foldLeft(0, (a,b)->a+b, StreamType.widen(Stream.of(1,2,3,4)));
//10
- foldable() - Static method in class com.aol.cyclops.hkt.instances.pcollections.PQueueInstances
-
int sum = PQueues.foldable()
.foldLeft(0, (a,b)->a+b, PQueueType.widen(Arrays.asPQueue(1,2,3,4)));
//10
- foldable() - Static method in class com.aol.cyclops.hkt.instances.pcollections.PStackInstances
-
int sum = PStacks.foldable()
.foldLeft(0, (a,b)->a+b, PStackType.widen(Arrays.asPStack(1,2,3,4)));
//10
- foldable() - Static method in class com.aol.cyclops.hkt.instances.pcollections.PVectorInstances
-
int sum = PVectors.foldable()
.foldLeft(0, (a,b)->a+b, PVectorType.widen(Arrays.asPVector(1,2,3,4)));
//10
- Foldable<CRE> - Interface in com.aol.cyclops.hkt.typeclasses.foldable
-
Type class for foldables
- foldLeft(Monoid<T>, Higher<CRE, T>) - Method in class com.aol.cyclops.hkt.instances.General.GeneralFoldable
-
- foldLeft(Monoid<T>, Higher<CRE, T>) - Method in interface com.aol.cyclops.hkt.typeclasses.foldable.Foldable
-
Starting from the left combine each value in turn with an accumulator
- foldLeft(T, BinaryOperator<T>, Higher<CRE, T>) - Method in interface com.aol.cyclops.hkt.typeclasses.foldable.Foldable
-
Starting from the left combine each value in turn with an accumulator
- foldRight(Monoid<T>, Higher<CRE, T>) - Method in class com.aol.cyclops.hkt.instances.General.GeneralFoldable
-
- foldRight(Monoid<T>, Higher<CRE, T>) - Method in interface com.aol.cyclops.hkt.typeclasses.foldable.Foldable
-
Starting from the right combine each value in turn with an accumulator
- foldRight(T, BinaryOperator<T>, Higher<CRE, T>) - Method in interface com.aol.cyclops.hkt.typeclasses.foldable.Foldable
-
Starting from the right combine each value in turn with an accumulator
- fromIterable(Iterable<T>) - Static method in interface com.aol.cyclops.hkt.cyclops.EvalType
-
Create an EvalType instance from an Iterable
- fromIterable(Iterable<T>, Executor) - Static method in class com.aol.cyclops.hkt.cyclops.FutureType
-
Construct a FutureW asyncrhonously that contains a single value extracted from the supplied Iterable
- fromIterable(Iterable<T>) - Static method in class com.aol.cyclops.hkt.cyclops.FutureType
-
Construct a FutureW syncrhonously that contains a single value extracted from the supplied Iterable
- fromOptional(Higher<OptionalType.µ, T>) - Static method in interface com.aol.cyclops.hkt.cyclops.MaybeType
-
Construct an equivalent Maybe from the Supplied Optional
- fromPublisher(Publisher<T>) - Static method in interface com.aol.cyclops.hkt.cyclops.EvalType
-
Create an EvalType instance from a reactive-streams publisher
- fromPublisher(Publisher<T>, Executor) - Static method in class com.aol.cyclops.hkt.cyclops.FutureType
-
Construct a FutureW asyncrhonously that contains a single value extracted from the supplied reactive-streams Publisher
- fromPublisher(Publisher<T>) - Static method in class com.aol.cyclops.hkt.cyclops.FutureType
-
Construct a FutureW syncrhonously that contains a single value extracted from the supplied reactive-streams Publisher
- fromXor(Xor<ST, T>) - Static method in interface com.aol.cyclops.hkt.cyclops.MaybeType
-
- fromXor(Try<T, X>) - Static method in interface com.aol.cyclops.hkt.cyclops.MaybeType
-
- functor() - Static method in class com.aol.cyclops.hkt.instances.cyclops.EvalInstances
-
Transform a list, mulitplying every element by 2
- functor() - Static method in class com.aol.cyclops.hkt.instances.cyclops.FutureWInstances
-
Transform a future, mulitplying every element by 2
- functor() - Static method in class com.aol.cyclops.hkt.instances.cyclops.MaybeInstances
-
Transform a maybe, mulitplying every element by 2
- functor(BiFunction<? extends Higher<CRE, T>, Function<? super T, ? extends R>, ? extends Higher<CRE, R>>) - Static method in interface com.aol.cyclops.hkt.instances.General
-
- functor() - Static method in class com.aol.cyclops.hkt.instances.jdk.CompletableFutureInstances
-
Transform a future, mulitplying every element by 2
- functor() - Static method in class com.aol.cyclops.hkt.instances.jdk.DequeInstances
-
Transform a list, mulitplying every element by 2
- functor() - Static method in class com.aol.cyclops.hkt.instances.jdk.ListInstances
-
Transform a list, mulitplying every element by 2
- functor() - Static method in class com.aol.cyclops.hkt.instances.jdk.OptionalInstances
-
Transform a list, mulitplying every element by 2
- functor() - Static method in class com.aol.cyclops.hkt.instances.jdk.QueueInstances
-
Transform a queue, mulitplying every element by 2
- functor() - Static method in class com.aol.cyclops.hkt.instances.jdk.StreamInstances
-
Transform a list, mulitplying every element by 2
- functor() - Static method in class com.aol.cyclops.hkt.instances.pcollections.PQueueInstances
-
Transform a list, mulitplying every element by 2
- functor() - Static method in class com.aol.cyclops.hkt.instances.pcollections.PStackInstances
-
Transform a list, mulitplying every element by 2
- functor() - Static method in class com.aol.cyclops.hkt.instances.pcollections.PVectorInstances
-
Transform a list, mulitplying every element by 2
- Functor<CRE> - Interface in com.aol.cyclops.hkt.typeclasses.functor
-
Functor type class, performs a transformation operation over the supplied data structure
- future() - Static method in class com.aol.cyclops.hkt.cyclops.FutureType
-
An empty FutureType
- FutureType<T> - Class in com.aol.cyclops.hkt.cyclops
-
Simulates Higher Kinded Types for FutureW's
FutureWType is a FutureW and a Higher Kinded Type (FutureWType.µ,T)
- FutureType.µ - Class in com.aol.cyclops.hkt.cyclops
-
Witness type
- FutureWInstances - Class in com.aol.cyclops.hkt.instances.cyclops
-
Companion class for creating Type Class instances for working with FutureWs
- FutureWInstances() - Constructor for class com.aol.cyclops.hkt.instances.cyclops.FutureWInstances
-
- main(String[]) - Static method in class com.aol.cyclops.hkt.instances.jdk.DequeInstances
-
- main(String[]) - Static method in class com.aol.cyclops.hkt.instances.jdk.ListInstances
-
- main(String[]) - Static method in class com.aol.cyclops.hkt.instances.jdk.QueueInstances
-
- map(Function<? super T, ? extends R>) - Method in class com.aol.cyclops.hkt.cyclops.EvalType.Box
-
- map(Function<? super T, ? extends R>) - Method in class com.aol.cyclops.hkt.cyclops.MaybeType.Box
-
- map(Function<? super PT, ? extends R>) - Method in class com.aol.cyclops.hkt.cyclops.XorType.Box
-
- map(Function<? super T, ? extends R>, Higher<CRE, T>) - Method in class com.aol.cyclops.hkt.instances.General.GeneralApplicative
-
- map(Function<? super T, ? extends R>, Higher<CRE, T>) - Method in class com.aol.cyclops.hkt.instances.General.GeneralComonad
-
- map(Function<? super T, ? extends R>, Higher<CRE, T>) - Method in class com.aol.cyclops.hkt.instances.General.GeneralFunctor
-
- map(Function<? super T, ? extends R>, Higher<CRE, T>) - Method in class com.aol.cyclops.hkt.instances.General.GeneralMonad
-
- map(Function<? super T, ? extends R>, Higher<CRE, T>) - Method in class com.aol.cyclops.hkt.instances.General.GeneralMonadPlus
-
- map(Function<? super T, ? extends R>, Higher<CRE, T>) - Method in class com.aol.cyclops.hkt.instances.General.GeneralMonadZero
-
- map(Function<? super T, ? extends R>, Higher<CRE, T>) - Method in class com.aol.cyclops.hkt.instances.General.GeneralTraverse
-
- map(Function<? super T, ? extends R>, Higher<CRE, T>) - Method in class com.aol.cyclops.hkt.instances.General.GeneralTraverseByTraverse
-
- map(Function<? super T, ? extends R>, Higher<CRE, T>) - Method in class com.aol.cyclops.hkt.instances.General.SupplierMonadPlus
-
- map(Function<? super T, ? extends R>, Higher<CRE, T>) - Method in class com.aol.cyclops.hkt.instances.General.SupplierMonadZero
-
- map(Function<? super T, ? extends R>, Higher<CRE, Higher<C2, T>>) - Method in class com.aol.cyclops.hkt.typeclasses.functor.Compose
-
Transformation operation
- map(Function<? super T, ? extends R>, Higher<CRE, T>) - Method in interface com.aol.cyclops.hkt.typeclasses.functor.Functor
-
Transform the supplied data structure using the supplied transformation function
- mapM(Function<T, Higher<CRE, R>>) - Method in interface com.aol.cyclops.hkt.typeclasses.monad.Monad
-
- mapRev(Higher<CRE, T>, Function<? super T, ? extends R>) - Method in interface com.aol.cyclops.hkt.typeclasses.functor.Functor
-
- matches(Function<Matchable.CheckValue1<ST, R>, Matchable.CheckValue1<ST, R>>, Function<Matchable.CheckValue1<PT, R>, Matchable.CheckValue1<PT, R>>, Supplier<? extends R>) - Method in class com.aol.cyclops.hkt.cyclops.XorType.Box
-
- MaybeInstances - Class in com.aol.cyclops.hkt.instances.cyclops
-
Companion class for creating Type Class instances for working with Maybes
- MaybeInstances() - Constructor for class com.aol.cyclops.hkt.instances.cyclops.MaybeInstances
-
- MaybeType<T> - Interface in com.aol.cyclops.hkt.cyclops
-
Simulates Higher Kinded Types for Maybe's
MaybeType is a Maybe and a Higher Kinded Type (MaybeType.µ,T)
- MaybeType.Box<T> - Class in com.aol.cyclops.hkt.cyclops
-
- MaybeType.µ - Class in com.aol.cyclops.hkt.cyclops
-
Witness type
- minus() - Method in class com.aol.cyclops.hkt.pcollections.PQueueType.Box
-
- minus(Object) - Method in class com.aol.cyclops.hkt.pcollections.PQueueType.Box
-
- minus(Object) - Method in class com.aol.cyclops.hkt.pcollections.PStackType.Box
-
- minus(int) - Method in class com.aol.cyclops.hkt.pcollections.PStackType.Box
-
- minus(Object) - Method in class com.aol.cyclops.hkt.pcollections.PVectorType.Box
-
- minus(int) - Method in class com.aol.cyclops.hkt.pcollections.PVectorType.Box
-
- minusAll(Collection<?>) - Method in class com.aol.cyclops.hkt.pcollections.PQueueType.Box
-
- minusAll(Collection<?>) - Method in class com.aol.cyclops.hkt.pcollections.PStackType.Box
-
- minusAll(Collection<?>) - Method in class com.aol.cyclops.hkt.pcollections.PVectorType.Box
-
- monad() - Static method in class com.aol.cyclops.hkt.instances.cyclops.EvalInstances
-
import static com.aol.cyclops.hkt.jdk.EvalType.widen;
EvalType<Integer> list = Evals.monad()
.flatMap(i->widen(EvalX.range(0,i)), widen(Arrays.asEval(1,2,3)))
.convert(EvalType::narrowK);
- monad() - Static method in class com.aol.cyclops.hkt.instances.cyclops.FutureWInstances
-
import static com.aol.cyclops.hkt.jdk.FutureType.widen;
FutureType<Integer> future = FutureWs.monad()
.flatMap(i->widen(FutureW.ofResult(0)), widen(FutureW.ofResult(2)))
.convert(FutureType::narrowK);
- monad() - Static method in class com.aol.cyclops.hkt.instances.cyclops.MaybeInstances
-
import static com.aol.cyclops.hkt.jdk.MaybeType.widen;
MaybeType<Integer> maybe = Maybes.monad()
.flatMap(i->widen(MaybeX.range(0,i)), widen(Maybe.just(1,2,3)))
.convert(MaybeType::narrowK);
- monad(Applicative<CRE>, BiFunction<? extends Higher<CRE, A>, Function<? super A, ? extends Higher<CRE, B>>, ? extends Higher<CRE, B>>) - Static method in interface com.aol.cyclops.hkt.instances.General
-
- monad() - Static method in class com.aol.cyclops.hkt.instances.jdk.CompletableFutureInstances
-
import static com.aol.cyclops.hkt.jdk.CompletableFutureType.widen;
CompletableFutureType<Integer> future = CompletableFutures.monad()
.flatMap(i->widen(CompletableFutureX.range(0,i)), widen(CompletableFuture.completedFuture(3)))
.convert(CompletableFutureType::narrowK);
- monad() - Static method in class com.aol.cyclops.hkt.instances.jdk.DequeInstances
-
import static com.aol.cyclops.hkt.jdk.DequeType.widen;
DequeType<Integer> list = Deques.monad()
.flatMap(i->widen(DequeX.range(0,i)), widen(DequeX.of(1,2,3)))
.convert(DequeType::narrowK);
- monad() - Static method in class com.aol.cyclops.hkt.instances.jdk.ListInstances
-
import static com.aol.cyclops.hkt.jdk.ListType.widen;
ListType<Integer> list = Lists.monad()
.flatMap(i->widen(ListX.range(0,i)), widen(Arrays.asList(1,2,3)))
.convert(ListType::narrowK);
- monad() - Static method in class com.aol.cyclops.hkt.instances.jdk.OptionalInstances
-
import static com.aol.cyclops.hkt.jdk.OptionalType.widen;
OptionalType<Integer> list = Optionals.monad()
.flatMap(i->widen(OptionalX.range(0,i)), widen(Arrays.asOptional(1,2,3)))
.convert(OptionalType::narrowK);
- monad() - Static method in class com.aol.cyclops.hkt.instances.jdk.QueueInstances
-
import static com.aol.cyclops.hkt.jdk.QueueType.widen;
QueueType<Integer> queue = Queues.monad()
.flatMap(i->widen(QueueX.range(0,i)), widen(QueueX.of(1,2,3)))
.convert(QueueType::narrowK);
- monad() - Static method in class com.aol.cyclops.hkt.instances.jdk.StreamInstances
-
import static com.aol.cyclops.hkt.jdk.StreamType.widen;
StreamType<Integer> list = Streams.monad()
.flatMap(i->widen(StreamX.range(0,i)), widen(Stream.of(1,2,3)))
.convert(StreamType::narrowK);
- monad() - Static method in class com.aol.cyclops.hkt.instances.pcollections.PQueueInstances
-
import static com.aol.cyclops.hkt.jdk.PQueueType.widen;
PQueueType<Integer> list = PQueues.monad()
.flatMap(i->widen(PQueueX.range(0,i)), widen(Arrays.asPQueue(1,2,3)))
.convert(PQueueType::narrowK);
- monad() - Static method in class com.aol.cyclops.hkt.instances.pcollections.PStackInstances
-
import static com.aol.cyclops.hkt.jdk.PStackType.widen;
PStackType<Integer> list = PStacks.monad()
.flatMap(i->widen(PStackX.range(0,i)), widen(Arrays.asPStack(1,2,3)))
.convert(PStackType::narrowK);
- monad() - Static method in class com.aol.cyclops.hkt.instances.pcollections.PVectorInstances
-
import static com.aol.cyclops.hkt.jdk.PVectorType.widen;
PVectorType<Integer> list = PVectors.monad()
.flatMap(i->widen(PVectorX.range(0,i)), widen(Arrays.asPVector(1,2,3)))
.convert(PVectorType::narrowK);
- Monad<CRE> - Interface in com.aol.cyclops.hkt.typeclasses.monad
-
- monadPlus() - Static method in class com.aol.cyclops.hkt.instances.cyclops.EvalInstances
-
EvalType<Integer> list = Evals.<Integer>monadPlus()
.plus(EvalType.widen(Arrays.asEval()), EvalType.widen(Arrays.asEval(10)))
.convert(EvalType::narrowK);
//Arrays.asEval(10))
- monadPlus(Monoid<EvalType<T>>) - Static method in class com.aol.cyclops.hkt.instances.cyclops.EvalInstances
-
Monoid<EvalType<Integer>> m = Monoid.of(EvalType.widen(Arrays.asEval()), (a,b)->a.isEmpty() ? b : a);
EvalType<Integer> list = Evals.<Integer>monadPlus(m)
.plus(EvalType.widen(Arrays.asEval(5)), EvalType.widen(Arrays.asEval(10)))
.convert(EvalType::narrowK);
//Arrays.asEval(5))
- monadPlus() - Static method in class com.aol.cyclops.hkt.instances.cyclops.FutureWInstances
-
FutureType<Integer> future = FutureWs.<Integer>monadPlus()
.plus(FutureType.widen(FutureW.future()), FutureType.widen(FutureW.ofResult(10)))
.convert(FutureType::narrowK);
//FutureW[10]
- monadPlus(Monoid<FutureType<T>>) - Static method in class com.aol.cyclops.hkt.instances.cyclops.FutureWInstances
-
Monoid<FutureType<Integer>> m = Monoid.of(FutureType.widen(FutureW.future()()), (a,b)->a.isDone() ? b : a);
FutureType<Integer> future = FutureWs.<Integer>monadPlus(m)
.plus(FutureType.widen(FutureW.ofResult(5)), FutureType.widen(FutureW.ofResult(10)))
.convert(FutureType::narrowK);
//FutureW(5)
- monadPlus() - Static method in class com.aol.cyclops.hkt.instances.cyclops.MaybeInstances
-
MaybeType<Integer> maybe = Maybes.<Integer>monadPlus()
.plus(MaybeType.widen(Maybe.just()), MaybeType.widen(Maybe.just(10)))
.convert(MaybeType::narrowK);
//Maybe.just(10))
- monadPlus(Monoid<MaybeType<T>>) - Static method in class com.aol.cyclops.hkt.instances.cyclops.MaybeInstances
-
Monoid<MaybeType<Integer>> m = Monoid.of(MaybeType.widen(Maybe.just()), (a,b)->a.isEmpty() ? b : a);
MaybeType<Integer> maybe = Maybes.<Integer>monadPlus(m)
.plus(MaybeType.widen(Maybe.just(5)), MaybeType.widen(Maybe.just(10)))
.convert(MaybeType::narrowK);
//Maybe[5]
- monadPlus(Monad<CRE>, Monoid<Higher<CRE, ?>>) - Static method in interface com.aol.cyclops.hkt.instances.General
-
- monadPlus(MonadZero<CRE>, Monoid<Higher<CRE, A>>) - Static method in interface com.aol.cyclops.hkt.instances.General
-
- monadPlus() - Static method in class com.aol.cyclops.hkt.instances.jdk.CompletableFutureInstances
-
CompletableFutureType<Integer> future = CompletableFutures.<Integer>monadPlus()
.plus(CompletableFutureType.widen(CompletableFuture.completedFuture()), CompletableFutureType.widen(CompletableFuture.completedFuture(10)))
.convert(CompletableFutureType::narrowK);
//CompletableFuture.completedFuture(10))
- monadPlus(Monoid<CompletableFutureType<T>>) - Static method in class com.aol.cyclops.hkt.instances.jdk.CompletableFutureInstances
-
Monoid<CompletableFutureType<Integer>> m = Monoid.of(CompletableFutureType.widen(CompletableFuture.completedFuture()), (a,b)->a.isEmpty() ? b : a);
CompletableFutureType<Integer> future = CompletableFutures.<Integer>monadPlus(m)
.plus(CompletableFutureType.widen(CompletableFuture.completedFuture(5)), CompletableFutureType.widen(CompletableFuture.completedFuture(10)))
.convert(CompletableFutureType::narrowK);
//CompletableFuture.completedFuture(5))
- monadPlus() - Static method in class com.aol.cyclops.hkt.instances.jdk.DequeInstances
-
DequeType<Integer> list = Deques.<Integer>monadPlus()
.plus(DequeType.widen(DequeX.of()), DequeType.widen(DequeX.of(10)))
.convert(DequeType::narrowK);
//DequeX.of(10))
- monadPlus(Monoid<DequeType<T>>) - Static method in class com.aol.cyclops.hkt.instances.jdk.DequeInstances
-
Monoid<DequeType<Integer>> m = Monoid.of(DequeType.widen(DequeX.of()), (a,b)->a.isEmpty() ? b : a);
DequeType<Integer> list = Deques.<Integer>monadPlus(m)
.plus(DequeType.widen(DequeX.of(5)), DequeType.widen(DequeX.of(10)))
.convert(DequeType::narrowK);
//DequeX.of(5))
- monadPlus() - Static method in class com.aol.cyclops.hkt.instances.jdk.ListInstances
-
ListType<Integer> list = Lists.<Integer>monadPlus()
.plus(ListType.widen(Arrays.asList()), ListType.widen(Arrays.asList(10)))
.convert(ListType::narrowK);
//Arrays.asList(10))
- monadPlus(Monoid<ListType<T>>) - Static method in class com.aol.cyclops.hkt.instances.jdk.ListInstances
-
Monoid<ListType<Integer>> m = Monoid.of(ListType.widen(Arrays.asList()), (a,b)->a.isEmpty() ? b : a);
ListType<Integer> list = Lists.<Integer>monadPlus(m)
.plus(ListType.widen(Arrays.asList(5)), ListType.widen(Arrays.asList(10)))
.convert(ListType::narrowK);
//Arrays.asList(5))
- monadPlus() - Static method in class com.aol.cyclops.hkt.instances.jdk.OptionalInstances
-
OptionalType<Integer> list = Optionals.<Integer>monadPlus()
.plus(OptionalType.widen(Arrays.asOptional()), OptionalType.widen(Arrays.asOptional(10)))
.convert(OptionalType::narrowK);
//Arrays.asOptional(10))
- monadPlus(Monoid<OptionalType<T>>) - Static method in class com.aol.cyclops.hkt.instances.jdk.OptionalInstances
-
Monoid<OptionalType<Integer>> m = Monoid.of(OptionalType.widen(Arrays.asOptional()), (a,b)->a.isEmpty() ? b : a);
OptionalType<Integer> list = Optionals.<Integer>monadPlus(m)
.plus(OptionalType.widen(Arrays.asOptional(5)), OptionalType.widen(Arrays.asOptional(10)))
.convert(OptionalType::narrowK);
//Arrays.asOptional(5))
- monadPlus() - Static method in class com.aol.cyclops.hkt.instances.jdk.QueueInstances
-
QueueType<Integer> queue = Queues.<Integer>monadPlus()
.plus(QueueType.widen(QueueX.of()), QueueType.widen(QueueX.of(10)))
.convert(QueueType::narrowK);
//QueueX.of(10))
- monadPlus(Monoid<QueueType<T>>) - Static method in class com.aol.cyclops.hkt.instances.jdk.QueueInstances
-
Monoid<QueueType<Integer>> m = Monoid.of(QueueType.widen(QueueX.of()), (a,b)->a.isEmpty() ? b : a);
QueueType<Integer> queue = Queues.<Integer>monadPlus(m)
.plus(QueueType.widen(QueueX.of(5)), QueueType.widen(QueueX.of(10)))
.convert(QueueType::narrowK);
//QueueX.of(5))
- monadPlus() - Static method in class com.aol.cyclops.hkt.instances.jdk.StreamInstances
-
StreamType<Integer> list = Streams.<Integer>monadPlus()
.plus(StreamType.widen(Stream.of()), StreamType.widen(Stream.of(10)))
.convert(StreamType::narrowK);
//Stream.of(10))
- monadPlus(Monoid<StreamType<T>>) - Static method in class com.aol.cyclops.hkt.instances.jdk.StreamInstances
-
Monoid<StreamType<Integer>> m = Monoid.of(StreamType.widen(Stream.of()), (a,b)->a.isEmpty() ? b : a);
StreamType<Integer> list = Streams.<Integer>monadPlus(m)
.plus(StreamType.widen(Stream.of(5)), StreamType.widen(Stream.of(10)))
.convert(StreamType::narrowK);
//Stream.of(5))
- monadPlus() - Static method in class com.aol.cyclops.hkt.instances.pcollections.PQueueInstances
-
PQueueType<Integer> list = PQueues.<Integer>monadPlus()
.plus(PQueueType.widen(Arrays.asPQueue()), PQueueType.widen(Arrays.asPQueue(10)))
.convert(PQueueType::narrowK);
//Arrays.asPQueue(10))
- monadPlus(Monoid<PQueueType<T>>) - Static method in class com.aol.cyclops.hkt.instances.pcollections.PQueueInstances
-
Monoid<PQueueType<Integer>> m = Monoid.of(PQueueType.widen(Arrays.asPQueue()), (a,b)->a.isEmpty() ? b : a);
PQueueType<Integer> list = PQueues.<Integer>monadPlus(m)
.plus(PQueueType.widen(Arrays.asPQueue(5)), PQueueType.widen(Arrays.asPQueue(10)))
.convert(PQueueType::narrowK);
//Arrays.asPQueue(5))
- monadPlus() - Static method in class com.aol.cyclops.hkt.instances.pcollections.PStackInstances
-
PStackType<Integer> list = PStacks.<Integer>monadPlus()
.plus(PStackType.widen(Arrays.asPStack()), PStackType.widen(Arrays.asPStack(10)))
.convert(PStackType::narrowK);
//Arrays.asPStack(10))
- monadPlus(Monoid<PStackType<T>>) - Static method in class com.aol.cyclops.hkt.instances.pcollections.PStackInstances
-
Monoid<PStackType<Integer>> m = Monoid.of(PStackType.widen(Arrays.asPStack()), (a,b)->a.isEmpty() ? b : a);
PStackType<Integer> list = PStacks.<Integer>monadPlus(m)
.plus(PStackType.widen(Arrays.asPStack(5)), PStackType.widen(Arrays.asPStack(10)))
.convert(PStackType::narrowK);
//Arrays.asPStack(5))
- monadPlus() - Static method in class com.aol.cyclops.hkt.instances.pcollections.PVectorInstances
-
PVectorType<Integer> list = PVectors.<Integer>monadPlus()
.plus(PVectorType.widen(Arrays.asPVector()), PVectorType.widen(Arrays.asPVector(10)))
.convert(PVectorType::narrowK);
//Arrays.asPVector(10))
- monadPlus(Monoid<PVectorType<T>>) - Static method in class com.aol.cyclops.hkt.instances.pcollections.PVectorInstances
-
Monoid<PVectorType<Integer>> m = Monoid.of(PVectorType.widen(Arrays.asPVector()), (a,b)->a.isEmpty() ? b : a);
PVectorType<Integer> list = PVectors.<Integer>monadPlus(m)
.plus(PVectorType.widen(Arrays.asPVector(5)), PVectorType.widen(Arrays.asPVector(10)))
.convert(PVectorType::narrowK);
//Arrays.asPVector(5))
- MonadPlus<CRE> - Interface in com.aol.cyclops.hkt.typeclasses.monad
-
- monadZero() - Static method in class com.aol.cyclops.hkt.instances.cyclops.EvalInstances
-
EvalType<String> list = Evals.unit()
.unit("hello")
.then(h->Evals.monadZero().filter((String t)->t.startsWith("he"), h))
.convert(EvalType::narrowK);
//Arrays.asEval("hello"));
- monadZero() - Static method in class com.aol.cyclops.hkt.instances.cyclops.FutureWInstances
-
FutureType<String> future = FutureWs.unit()
.unit("hello")
.then(h->FutureWs.monadZero().filter((String t)->t.startsWith("he"), h))
.convert(FutureType::narrowK);
//FutureW["hello"]
- monadZero() - Static method in class com.aol.cyclops.hkt.instances.cyclops.MaybeInstances
-
MaybeType<String> maybe = Maybes.unit()
.unit("hello")
.then(h->Maybes.monadZero().filter((String t)->t.startsWith("he"), h))
.convert(MaybeType::narrowK);
//Maybe.just("hello"));
- monadZero(Monad<CRE>, Higher<CRE, A>) - Static method in interface com.aol.cyclops.hkt.instances.General
-
- monadZero(Monad<CRE>, Supplier<Higher<CRE, A>>, BiFunction<Higher<CRE, A>, Predicate<? super A>, Higher<CRE, A>>) - Static method in interface com.aol.cyclops.hkt.instances.General
-
- monadZero() - Static method in class com.aol.cyclops.hkt.instances.jdk.CompletableFutureInstances
-
CompletableFutureType<String> future = CompletableFutures.unit()
.unit("hello")
.then(h->CompletableFutures.monadZero().filter((String t)->t.startsWith("he"), h))
.convert(CompletableFutureType::narrowK);
//CompletableFuture.completedFuture("hello"));
- monadZero() - Static method in class com.aol.cyclops.hkt.instances.jdk.DequeInstances
-
DequeType<String> list = Deques.unit()
.unit("hello")
.then(h->Deques.monadZero().filter((String t)->t.startsWith("he"), h))
.convert(DequeType::narrowK);
//DequeX.of("hello"));
- monadZero() - Static method in class com.aol.cyclops.hkt.instances.jdk.ListInstances
-
ListType<String> list = Lists.unit()
.unit("hello")
.then(h->Lists.monadZero().filter((String t)->t.startsWith("he"), h))
.convert(ListType::narrowK);
//Arrays.asList("hello"));
- monadZero() - Static method in class com.aol.cyclops.hkt.instances.jdk.OptionalInstances
-
OptionalType<String> list = Optionals.unit()
.unit("hello")
.then(h->Optionals.monadZero().filter((String t)->t.startsWith("he"), h))
.convert(OptionalType::narrowK);
//Arrays.asOptional("hello"));
- monadZero() - Static method in class com.aol.cyclops.hkt.instances.jdk.QueueInstances
-
QueueType<String> queue = Queues.unit()
.unit("hello")
.then(h->Queues.monadZero().filter((String t)->t.startsWith("he"), h))
.convert(QueueType::narrowK);
//QueueX.of("hello"));
- monadZero() - Static method in class com.aol.cyclops.hkt.instances.jdk.StreamInstances
-
StreamType<String> list = Streams.unit()
.unit("hello")
.then(h->Streams.monadZero().filter((String t)->t.startsWith("he"), h))
.convert(StreamType::narrowK);
//Stream.of("hello"));
- monadZero() - Static method in class com.aol.cyclops.hkt.instances.pcollections.PQueueInstances
-
PQueueType<String> list = PQueues.unit()
.unit("hello")
.then(h->PQueues.monadZero().filter((String t)->t.startsWith("he"), h))
.convert(PQueueType::narrowK);
//Arrays.asPQueue("hello"));
- monadZero() - Static method in class com.aol.cyclops.hkt.instances.pcollections.PStackInstances
-
PStackType<String> list = PStacks.unit()
.unit("hello")
.then(h->PStacks.monadZero().filter((String t)->t.startsWith("he"), h))
.convert(PStackType::narrowK);
//Arrays.asPStack("hello"));
- monadZero() - Static method in class com.aol.cyclops.hkt.instances.pcollections.PVectorInstances
-
PVectorType<String> list = PVectors.unit()
.unit("hello")
.then(h->PVectors.monadZero().filter((String t)->t.startsWith("he"), h))
.convert(PVectorType::narrowK);
//Arrays.asPVector("hello"));
- MonadZero<CRE> - Interface in com.aol.cyclops.hkt.typeclasses.monad
-
A filterable monad
The zero() operator is used to replace supplied HKT with it's zero / empty equivalent when filtered out
- monoid() - Method in class com.aol.cyclops.hkt.instances.General.GeneralMonadPlus
-
- monoid() - Method in class com.aol.cyclops.hkt.instances.General.SupplierMonadPlus
-
- monoid() - Method in interface com.aol.cyclops.hkt.typeclasses.monad.MonadPlus
-
- zero() - Method in class com.aol.cyclops.hkt.instances.General.GeneralMonadZero
-
- zero() - Method in class com.aol.cyclops.hkt.instances.General.SupplierMonadPlus
-
- zero() - Method in class com.aol.cyclops.hkt.instances.General.SupplierMonadZero
-
- zero() - Method in interface com.aol.cyclops.hkt.typeclasses.monad.MonadPlus
-
- zero() - Method in interface com.aol.cyclops.hkt.typeclasses.monad.MonadZero
-
e.g.
- zippingApplicative() - Static method in class com.aol.cyclops.hkt.instances.jdk.DequeInstances
-
import static com.aol.cyclops.hkt.jdk.DequeType.widen;
import static com.aol.cyclops.util.function.Lambda.l1;
import static java.util.DequeX.of;
Deques.zippingApplicative()
.ap(widen(asDeque(l1(this::multiplyByTwo))),widen(asDeque(1,2,3)));
//[2,4,6]
- zippingApplicative() - Static method in class com.aol.cyclops.hkt.instances.jdk.ListInstances
-
import static com.aol.cyclops.hkt.jdk.ListType.widen;
import static com.aol.cyclops.util.function.Lambda.l1;
import static java.util.Arrays.asList;
Lists.zippingApplicative()
.ap(widen(asList(l1(this::multiplyByTwo))),widen(asList(1,2,3)));
//[2,4,6]
- zippingApplicative() - Static method in class com.aol.cyclops.hkt.instances.jdk.QueueInstances
-
import static com.aol.cyclops.hkt.jdk.QueueType.widen;
import static com.aol.cyclops.util.function.Lambda.l1;
import static java.util.QueueX.of;
Queues.zippingApplicative()
.ap(widen(asQueue(l1(this::multiplyByTwo))),widen(asQueue(1,2,3)));
//[2,4,6]
- zippingApplicative() - Static method in class com.aol.cyclops.hkt.instances.jdk.StreamInstances
-
import static com.aol.cyclops.hkt.jdk.StreamType.widen;
import static com.aol.cyclops.util.function.Lambda.l1;
Streams.zippingApplicative()
.ap(widen(Stream.of(l1(this::multiplyByTwo))),widen(Stream.of(1,2,3)));
//[2,4,6]
- zippingApplicative() - Static method in class com.aol.cyclops.hkt.instances.pcollections.PQueueInstances
-
import static com.aol.cyclops.hkt.jdk.PQueueType.widen;
import static com.aol.cyclops.util.function.Lambda.l1;
import static java.util.Arrays.asPQueue;
PQueues.zippingApplicative()
.ap(widen(asPQueue(l1(this::multiplyByTwo))),widen(asPQueue(1,2,3)));
//[2,4,6]
- zippingApplicative() - Static method in class com.aol.cyclops.hkt.instances.pcollections.PStackInstances
-
import static com.aol.cyclops.hkt.jdk.PStackType.widen;
import static com.aol.cyclops.util.function.Lambda.l1;
import static java.util.Arrays.asPStack;
PStacks.zippingApplicative()
.ap(widen(asPStack(l1(this::multiplyByTwo))),widen(asPStack(1,2,3)));
//[2,4,6]
- zippingApplicative() - Static method in class com.aol.cyclops.hkt.instances.pcollections.PVectorInstances
-
import static com.aol.cyclops.hkt.jdk.PVectorType.widen;
import static com.aol.cyclops.util.function.Lambda.l1;
import static java.util.Arrays.asPVector;
PVectors.zippingApplicative()
.ap(widen(asPVector(l1(this::multiplyByTwo))),widen(asPVector(1,2,3)));
//[2,4,6]