com.jnape.palatable.lambda.functions.builtin.fn2

## Class Alter<A>

- java.lang.Object
- - com.jnape.palatable.lambda.functions.builtin.fn2.Alter<A>

- Type Parameters:
    `A` - the input and output
  All Implemented Interfaces:
    Fn1<Fn1<? super A,? extends IO<?>>,Fn1<A,IO<A>>>, Fn2<Fn1<? super A,? extends IO<?>>,A,IO<A>>, Applicative<Fn1<A,IO<A>>,Fn1<Fn1<? super A,? extends IO<?>>,?>>, Cartesian<Fn1<? super A,? extends IO<?>>,Fn1<A,IO<A>>,Fn1<?,?>>, Cocartesian<Fn1<? super A,? extends IO<?>>,Fn1<A,IO<A>>,Fn1<?,?>>, Contravariant<Fn1<? super A,? extends IO<?>>,Profunctor<?,Fn1<A,IO<A>>,Fn1<?,?>>>, Functor<Fn1<A,IO<A>>,Fn1<Fn1<? super A,? extends IO<?>>,?>>, Profunctor<Fn1<? super A,? extends IO<?>>,Fn1<A,IO<A>>,Fn1<?,?>>, Monad<Fn1<A,IO<A>>,Fn1<Fn1<? super A,? extends IO<?>>,?>>, MonadReader<Fn1<? super A,? extends IO<?>>,Fn1<A,IO<A>>,Fn1<Fn1<? super A,? extends IO<?>>,?>>, MonadRec<Fn1<A,IO<A>>,Fn1<Fn1<? super A,? extends IO<?>>,?>>, MonadWriter<Fn1<? super A,? extends IO<?>>,Fn1<A,IO<A>>,Fn1<Fn1<? super A,? extends IO<?>>,?>>

      public final class Alter<A>
      extends Object
      implements Fn2<Fn1<? super A,? extends IO<?>>,A,IO<A>>

  Given an ``Effect`<A>` and some `A`, produce an `IO` that, when run, performs the effect on `A` and returns it.

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <A> Alter<A>` | `alter()`
    `static <A> Fn1<A,IO<A>>` | `alter(Effect<? super A> effect)`
    `static <A> IO<A>` | `alter(Effect<? super A> effect, A a)`
    `IO<A>` | `checkedApply(Fn1<? super A,? extends IO<?>> effect, A a)`

    - ### 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.functions.Fn2

      `apply, apply, checkedApply, compose, contraMap, curried, curry, diMapL, discardR, flip, 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

    - #### checkedApply

          public IO<A> checkedApply(Fn1<? super A,? extends IO<?>> effect,
                                    A a)

      Specified by:
        `checkedApply` in interface `Fn2<Fn1<? super A,? extends IO<?>>,A,IO<A>>`

    - #### alter

          public static <A> Alter<A> alter()

    - #### alter

          public static <A> Fn1<A,IO<A>> alter(Effect<? super A> effect)

    - #### alter

          public static <A> IO<A> alter(Effect<? super A> effect,
                                        A a)