com.jnape.palatable.lambda.optics.functions

## Class Pre<P extends Profunctor<?,?,? extends P>,S,T,A,B>

- java.lang.Object
- - com.jnape.palatable.lambda.optics.functions.Pre<P,S,T,A,B>

- Type Parameters:
    `S` - the value to read from
    `T` - used for unification of the `optic's` unused morphism
    `A` - the result to `maybe` read out
    `B` - used for unification of the `optic's` unused morphism
  All Implemented Interfaces:
    Fn1<Optic<P,? super Const<Maybe<A>,?>,S,T,A,B>,Optic<P,Const<Maybe<A>,?>,S,T,Maybe<A>,B>>, Applicative<Optic<P,Const<Maybe<A>,?>,S,T,Maybe<A>,B>,Fn1<Optic<P,? super Const<Maybe<A>,?>,S,T,A,B>,?>>, Cartesian<Optic<P,? super Const<Maybe<A>,?>,S,T,A,B>,Optic<P,Const<Maybe<A>,?>,S,T,Maybe<A>,B>,Fn1<?,?>>, Cocartesian<Optic<P,? super Const<Maybe<A>,?>,S,T,A,B>,Optic<P,Const<Maybe<A>,?>,S,T,Maybe<A>,B>,Fn1<?,?>>, Contravariant<Optic<P,? super Const<Maybe<A>,?>,S,T,A,B>,Profunctor<?,Optic<P,Const<Maybe<A>,?>,S,T,Maybe<A>,B>,Fn1<?,?>>>, Functor<Optic<P,Const<Maybe<A>,?>,S,T,Maybe<A>,B>,Fn1<Optic<P,? super Const<Maybe<A>,?>,S,T,A,B>,?>>, Profunctor<Optic<P,? super Const<Maybe<A>,?>,S,T,A,B>,Optic<P,Const<Maybe<A>,?>,S,T,Maybe<A>,B>,Fn1<?,?>>, Monad<Optic<P,Const<Maybe<A>,?>,S,T,Maybe<A>,B>,Fn1<Optic<P,? super Const<Maybe<A>,?>,S,T,A,B>,?>>, MonadReader<Optic<P,? super Const<Maybe<A>,?>,S,T,A,B>,Optic<P,Const<Maybe<A>,?>,S,T,Maybe<A>,B>,Fn1<Optic<P,? super Const<Maybe<A>,?>,S,T,A,B>,?>>, MonadRec<Optic<P,Const<Maybe<A>,?>,S,T,Maybe<A>,B>,Fn1<Optic<P,? super Const<Maybe<A>,?>,S,T,A,B>,?>>, MonadWriter<Optic<P,? super Const<Maybe<A>,?>,S,T,A,B>,Optic<P,Const<Maybe<A>,?>,S,T,Maybe<A>,B>,Fn1<Optic<P,? super Const<Maybe<A>,?>,S,T,A,B>,?>>

      public final class Pre<P extends Profunctor<?,?,? extends P>,S,T,A,B>
      extends Object
      implements Fn1<Optic<P,? super Const<Maybe<A>,?>,S,T,A,B>,Optic<P,Const<Maybe<A>,?>,S,T,Maybe<A>,B>>

  Turn an `Optic` with a unary mapping that can be used for viewing some number of values into an `Optic` that views the first value, if it exists.

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Optic<P,Const<Maybe<A>,?>,S,T,Maybe<A>,B>` | `checkedApply(Optic<P,? super Const<Maybe<A>,?>,S,T,A,B> optic)` Invoke this function with the given argument, potentially throwing any `Throwable`.
    `static <P extends Profunctor<?,?,? extends P>,S,T,A,B> Pre<P,S,T,A,B>` | `pre()`
    `static <P extends Profunctor<?,?,? extends P>,S,T,A,B> Optic<P,Const<Maybe<A>,?>,S,T,Maybe<A>,B>` | `pre(Optic<P,? super Const<Maybe<A>,?>,S,T,A,B> optic)`
    `static <P extends Profunctor<?,?,? extends P>,S,T,A,B> Optic<P,Const<Maybe<A>,?>,S,T,Maybe<A>,B>` | `pre(ProtoOptic<P,S,T,A,B> protoOptic)`

    - ### 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.Fn1

      `andThen, apply, carry, cartesian, censor, choose, cocartesian, compose, contraMap, diMap, diMapL, diMapR, discardL, discardR, flatMap, fmap, fn1, fromFunction, lazyZip, listens, local, pure, pureFn1, thunk, toFunction, trampolineM, widen, 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 Optic<P,Const<Maybe<A>,?>,S,T,Maybe<A>,B> checkedApply(Optic<P,? super Const<Maybe<A>,?>,S,T,A,B> optic)

      Description copied from interface: `Fn1`
      Invoke this function with the given argument, potentially throwing any `Throwable`.
      Specified by:
        `checkedApply` in interface `Fn1<Optic<P extends Profunctor<?,?,? extends P>,? super Const<Maybe<A>,?>,S,T,A,B>,Optic<P extends Profunctor<?,?,? extends P>,Const<Maybe<A>,?>,S,T,Maybe<A>,B>>`
      Parameters:
        `optic` - the argument
      Returns:
        the result of the function application

    - #### pre

          public static <P extends Profunctor<?,?,? extends P>,S,T,A,B> Pre<P,S,T,A,B> pre()

    - #### pre

          public static <P extends Profunctor<?,?,? extends P>,S,T,A,B> Optic<P,Const<Maybe<A>,?>,S,T,Maybe<A>,B> pre(Optic<P,? super Const<Maybe<A>,?>,S,T,A,B> optic)

    - #### pre

          public static <P extends Profunctor<?,?,? extends P>,S,T,A,B> Optic<P,Const<Maybe<A>,?>,S,T,Maybe<A>,B> pre(ProtoOptic<P,S,T,A,B> protoOptic)