Uses of Class
com.jnape.palatable.lambda.functor.builtin.State
Packages that use State
-
Uses of State in com.jnape.palatable.lambda.functor.builtin
Classes in com.jnape.palatable.lambda.functor.builtin that implement interfaces with type arguments of type StateModifier and TypeClassDescriptionfinal classState<S,A> The stateMonad, useful for iteratively building up state and state-contextualized result.final classState<S,A> The stateMonad, useful for iteratively building up state and state-contextualized result.final classState<S,A> The stateMonad, useful for iteratively building up state and state-contextualized result.Methods in com.jnape.palatable.lambda.functor.builtin that return StateModifier and TypeMethodDescriptionUpdate the accumulated state.State.discardL(Applicative<B, State<S, ?>> appB) Sequence both thisApplicativeandappB, discarding thisApplicative'sresult and returningappB.State.discardR(Applicative<B, State<S, ?>> appB) Sequence both thisApplicativeandappB, discardingappB'sresult and returning thisApplicative.Chain dependent computations that may continue or short-circuit based on previous results.Covariantly transmute this functor's parameter using the given mapping function.static <A> State<A, A> State.get()Create aStatethat simply returns back the initial state as both the result and the final statestatic <S,A> State <S, A> Create aStatethat maps its initial state into its result, but leaves the initial state unchanged.Map the accumulation into a value and pair it with the current output.Modify thisMonadReader'senvironment after reading it but before running the effect.Map both the result and the final state to a new result and final state.State.pure(B b) Lift the valuebinto this applicative functor.State.put(S s) static <S,A> State <S, A> State.state(A a) Create aStatethat returnsaas its result and its initial state as its final state.static <S,A> State <S, A> Create aStatefromstateFn, a function that maps an initial state into a result and a final state.State.trampolineM(Fn1<? super A, ? extends MonadRec<RecursiveResult<A, B>, State<S, ?>>> fn) Given some operation yielding aRecursiveResultinside thisMonadRec, internally trampoline the operation until it yields aterminationinstruction.Map the final state to a new final state using the provided function.Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.Methods in com.jnape.palatable.lambda.functor.builtin that return types with arguments of type StateModifier and TypeMethodDescriptionGiven alazyinstance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.State.pureState()Method parameters in com.jnape.palatable.lambda.functor.builtin with type arguments of type StateModifier and TypeMethodDescriptionState.discardL(Applicative<B, State<S, ?>> appB) Sequence both thisApplicativeandappB, discarding thisApplicative'sresult and returningappB.State.discardR(Applicative<B, State<S, ?>> appB) Sequence both thisApplicativeandappB, discardingappB'sresult and returning thisApplicative.Chain dependent computations that may continue or short-circuit based on previous results.Given alazyinstance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.State.trampolineM(Fn1<? super A, ? extends MonadRec<RecursiveResult<A, B>, State<S, ?>>> fn) Given some operation yielding aRecursiveResultinside thisMonadRec, internally trampoline the operation until it yields aterminationinstruction.Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.