Class Repeat<A>
- java.lang.Object
-
- com.jnape.palatable.lambda.functions.builtin.fn1.Repeat<A>
-
- Type Parameters:
A
- The Iterable element type
- All Implemented Interfaces:
Fn1<A,java.lang.Iterable<A>>
,Applicative<java.lang.Iterable<A>,Fn1<A,?>>
,Cartesian<A,java.lang.Iterable<A>,Fn1<?,?>>
,Cocartesian<A,java.lang.Iterable<A>,Fn1<?,?>>
,Contravariant<A,Profunctor<?,java.lang.Iterable<A>,Fn1<?,?>>>
,Functor<java.lang.Iterable<A>,Fn1<A,?>>
,Profunctor<A,java.lang.Iterable<A>,Fn1<?,?>>
,Monad<java.lang.Iterable<A>,Fn1<A,?>>
,MonadReader<A,java.lang.Iterable<A>,Fn1<A,?>>
,MonadRec<java.lang.Iterable<A>,Fn1<A,?>>
,MonadWriter<A,java.lang.Iterable<A>,Fn1<A,?>>
public final class Repeat<A> extends java.lang.Object implements Fn1<A,java.lang.Iterable<A>>
Given a value, return an infiniteIterable
that repeatedly iterates that value.
-
-
Constructor Summary
Constructors Modifier Constructor Description private
Repeat()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Iterable<A>
checkedApply(A a)
Invoke this function with the given argument, potentially throwing anyThrowable
.static <A> Repeat<A>
repeat()
static <A> java.lang.Iterable<A>
repeat(A a)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Field Detail
-
INSTANCE
private static final Repeat<?> INSTANCE
-
-
Method Detail
-
checkedApply
public java.lang.Iterable<A> checkedApply(A a)
Description copied from interface:Fn1
Invoke this function with the given argument, potentially throwing anyThrowable
.- Specified by:
checkedApply
in interfaceFn1<A,java.lang.Iterable<A>>
- Parameters:
a
- the argument- Returns:
- the result of the function application
-
repeat
public static <A> Repeat<A> repeat()
-
repeat
public static <A> java.lang.Iterable<A> repeat(A a)
-
-