com.jnape.palatable.lambda.optics

## Interface Prism.Simple<S,A>

- Type Parameters:
    `S` - the input that might fail to map to its output and the guaranteed output from the other direction
    `A` - the output that might fail to be produced and the input that guarantees its output in the other direction
  All Superinterfaces:
    Applicative<S,Prism<S,?,A,A>>, Contravariant<S,Profunctor<?,S,Prism<?,?,A,A>>>, Functor<S,Prism<S,?,A,A>>, Monad<S,Prism<S,?,A,A>>, MonadRec<S,Prism<S,?,A,A>>, Optic<Cocartesian<?,?,?>,Identity<?>,S,S,A,A>, Prism<S,S,A,A>, Profunctor<S,S,Prism<?,?,A,A>>, ProtoOptic<Cocartesian<?,?,?>,S,S,A,A>
  Enclosing interface:
    Prism<S,T,A,B>

      public static interface Prism.Simple<S,A>
      extends Prism<S,S,A,A>

  A convenience type with a simplified type signature for common `prism` with unified `S/T` and `A/B` types.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface com.jnape.palatable.lambda.optics.Prism

      `Prism.Simple<S,A>`

  - ### Method Summary

    All Methods Static Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <S,A> Prism.Simple<S,A>` | `adapt(Optic<? super Cocartesian<?,?,?>,? super Functor<?,?>,S,S,A,A> optic)` Adapt an `Optic` with compatible bounds to a `simple Prism`.
    `static <S,A> Prism.Simple<S,A>` | `adapt(Prism<S,S,A,A> prism)` Adapt a `Prism` with compatible bounds to a `simple Prism`.
    `static <S,A> Prism.Simple<S,A>` | `adapt(ProtoOptic<? super Cocartesian<?,?,?>,S,S,A,A> protoOptic)` Adapt a `ProtoOptic` with compatible bounds to a `simple Prism`.
    `static <S,A> Prism.Simple<S,A>` | `fromPartial(Fn1<? super S,? extends A> partialSa, Fn1<? super A,? extends S> as)` Static factory method for creating a `simple Prism` from a partial function `S -> A` and a total function `A -> T`.

    - ### Methods inherited from interface com.jnape.palatable.lambda.optics.Prism

      `andThen, apply, compose, contraMap, diMap, diMapL, diMapR, discardL, discardR, flatMap, fmap, fromPartial, lazyZip, mapA, mapB, mapS, mapT, prism, prism, prism, pure, purePrism, simplePrism, trampolineM, unPrism, zip`

    - ### Methods inherited from interface com.jnape.palatable.lambda.optics.ProtoOptic

      `toOptic`

    - ### Methods inherited from interface com.jnape.palatable.lambda.optics.Optic

      `andThen, compose, monomorphize, optic, reframe`

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

      `join`

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

      `coerce`

- - ### Method Detail

    - #### adapt

          static <S,A> Prism.Simple<S,A> adapt(Prism<S,S,A,A> prism)

      Adapt a `Prism` with compatible bounds to a `simple Prism`.
      Type Parameters:
        `S` - the input that might fail to map to its output and the guaranteed output from the other direction
        `A` - the output that might fail to be produced and the input that guarantees its output in the other direction
      Parameters:
        `prism` - the `Prism`
      Returns:
        the `simple Prism`

    - #### adapt

          static <S,A> Prism.Simple<S,A> adapt(ProtoOptic<? super Cocartesian<?,?,?>,S,S,A,A> protoOptic)

      Adapt a `ProtoOptic` with compatible bounds to a `simple Prism`.
      Type Parameters:
        `S` - the input that might fail to map to its output and the guaranteed output from the other direction
        `A` - the output that might fail to be produced and the input that guarantees its output in the other direction
      Parameters:
        `protoOptic` - the `ProtoOptic`
      Returns:
        the `simple Prism`

    - #### adapt

          static <S,A> Prism.Simple<S,A> adapt(Optic<? super Cocartesian<?,?,?>,? super Functor<?,?>,S,S,A,A> optic)

      Adapt an `Optic` with compatible bounds to a `simple Prism`.
      Type Parameters:
        `S` - the input that might fail to map to its output and the guaranteed output from the other direction
        `A` - the output that might fail to be produced and the input that guarantees its output in the other direction
      Parameters:
        `optic` - the `Optic`
      Returns:
        the `simple Prism`

    - #### fromPartial

          static <S,A> Prism.Simple<S,A> fromPartial(Fn1<? super S,? extends A> partialSa,
                                                     Fn1<? super A,? extends S> as)

      Static factory method for creating a `simple Prism` from a partial function `S -> A` and a total function `A -> T`.
      Type Parameters:
        `S` - the input that might fail to map to its output and the guaranteed output from the other direction
        `A` - the output that might fail to be produced and the input that guarantees its output in the other direction
      Parameters:
        `partialSa` - the partial direction
        `as` - the reverse total direction
      Returns:
        the `simple Prism`