Class ToCollection<A,C extends Collection<A>>

java.lang.Object
com.jnape.palatable.lambda.functions.builtin.fn2.ToCollection<A,C>
Type Parameters:
A - the iterable element type
C - the resulting collection type
All Implemented Interfaces:
Fn1<Fn0<C>,Fn1<Iterable<A>,C>>, Fn2<Fn0<C>,Iterable<A>,C>, Applicative<Fn1<Iterable<A>,C>,Fn1<Fn0<C>,?>>, Cartesian<Fn0<C>,Fn1<Iterable<A>,C>,Fn1<?,?>>, Cocartesian<Fn0<C>,Fn1<Iterable<A>,C>,Fn1<?,?>>, Contravariant<Fn0<C>,Profunctor<?,Fn1<Iterable<A>,C>,Fn1<?,?>>>, Functor<Fn1<Iterable<A>,C>,Fn1<Fn0<C>,?>>, Profunctor<Fn0<C>,Fn1<Iterable<A>,C>,Fn1<?,?>>, Monad<Fn1<Iterable<A>,C>,Fn1<Fn0<C>,?>>, MonadReader<Fn0<C>,Fn1<Iterable<A>,C>,Fn1<Fn0<C>,?>>, MonadRec<Fn1<Iterable<A>,C>,Fn1<Fn0<C>,?>>, MonadWriter<Fn0<C>,Fn1<Iterable<A>,C>,Fn1<Fn0<C>,?>>

public final class ToCollection<A,C extends Collection<A>> extends Object implements Fn2<Fn0<C>,Iterable<A>,C>
Given an Fn0 of some Collection C, create an instance of C and add all of the elements in the provided Iterable to the instance. Note that instances of C must support Collection.add(E) (which is to say, must not throw on invocation).