com.jnape.palatable.lambda.monoid.builtin

## Class Union<A>

- java.lang.Object
- - com.jnape.palatable.lambda.monoid.builtin.Union<A>

- Type Parameters:
    `A` - the `Iterable` element type
  All Implemented Interfaces:
    Fn1<Iterable<A>,Fn1<Iterable<A>,Iterable<A>>>, Fn2<Iterable<A>,Iterable<A>,Iterable<A>>, Applicative<Fn1<Iterable<A>,Iterable<A>>,Fn1<Iterable<A>,?>>, Cartesian<Iterable<A>,Fn1<Iterable<A>,Iterable<A>>,Fn1<?,?>>, Cocartesian<Iterable<A>,Fn1<Iterable<A>,Iterable<A>>,Fn1<?,?>>, Contravariant<Iterable<A>,Profunctor<?,Fn1<Iterable<A>,Iterable<A>>,Fn1<?,?>>>, Functor<Fn1<Iterable<A>,Iterable<A>>,Fn1<Iterable<A>,?>>, Profunctor<Iterable<A>,Fn1<Iterable<A>,Iterable<A>>,Fn1<?,?>>, Monad<Fn1<Iterable<A>,Iterable<A>>,Fn1<Iterable<A>,?>>, MonadReader<Iterable<A>,Fn1<Iterable<A>,Iterable<A>>,Fn1<Iterable<A>,?>>, MonadRec<Fn1<Iterable<A>,Iterable<A>>,Fn1<Iterable<A>,?>>, MonadWriter<Iterable<A>,Fn1<Iterable<A>,Iterable<A>>,Fn1<Iterable<A>,?>>, Monoid<Iterable<A>>, Semigroup<Iterable<A>>

      public final class Union<A>
      extends Object
      implements Monoid<Iterable<A>>

  Given two `Iterables` `xs` and `ys`, return the `concatenation` of the `distinct` elements of both `xs` and `ys`.

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Iterable<A>` | `checkedApply(Iterable<A> xs, Iterable<A> ys)`
    `Iterable<A>` | `identity()` The identity element of this monoid.
    `static <A> Union<A>` | `union()`
    `static <A> Fn1<Iterable<A>,Iterable<A>>` | `union(Iterable<A> xs)`
    `static <A> Iterable<A>` | `union(Iterable<A> xs, Iterable<A> ys)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface com.jnape.palatable.lambda.monoid.Monoid

      `flip, foldLeft, foldMap, foldRight, monoid, monoid, reduceLeft, reduceRight`

    - ### Methods inherited from interface com.jnape.palatable.lambda.functions.Fn2

      `apply, apply, checkedApply, compose, contraMap, curried, curry, diMapL, discardR, fn2, fromBiFunction, toBiFunction, uncurry, widen`

    - ### Methods inherited from interface com.jnape.palatable.lambda.functions.Fn1

      `andThen, carry, cartesian, censor, choose, cocartesian, diMap, diMapR, discardL, flatMap, fmap, fn1, fromFunction, lazyZip, listens, local, pure, pureFn1, thunk, toFunction, trampolineM, zip, zip`

    - ### Methods inherited from interface com.jnape.palatable.lambda.monad.Monad

      `join`

    - ### Methods inherited from interface com.jnape.palatable.lambda.functor.Functor

      `coerce`

- - ### Method Detail

    - #### identity

          public Iterable<A> identity()

      Description copied from interface: `Monoid`
      The identity element of this monoid.
      Specified by:
        `identity` in interface `Monoid<Iterable<A>>`
      Returns:
        the identity

    - #### checkedApply

          public Iterable<A> checkedApply(Iterable<A> xs,
                                          Iterable<A> ys)

      Specified by:
        `checkedApply` in interface `Fn2<Iterable<A>,Iterable<A>,Iterable<A>>`

    - #### union

          public static <A> Union<A> union()

    - #### union

          public static <A> Fn1<Iterable<A>,Iterable<A>> union(Iterable<A> xs)

    - #### union

          public static <A> Iterable<A> union(Iterable<A> xs,
                                              Iterable<A> ys)