cps.monads.logic
Members list
Type members
Classlikes
Should be used inside of reify block over CpsLogicMonad. Form mini-DSL after choice
prefux
Should be used inside of reify block over CpsLogicMonad. Form mini-DSL after choice
prefux
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Logic monad, where computation is done into known async concurrent monad F[_].
Logic monad, where computation is done into known async concurrent monad F[_].
Attributes
- Supertypes
-
trait CpsLogicMonad[M]trait CpsTryMonad[M]trait CpsTrySupport[M]trait CpsThrowMonad[M]trait CpsThrowSupport[M]trait CpsMonad[M]class Objecttrait Matchableclass AnyShow all
- Known subtypes
-
class CpsLogicStreamConcurrenctMonad[F]
Attributes
- Supertypes
-
trait CpsLogicMonadContext[M]trait CpsTryMonadContext[M]trait CpsThrowMonadContext[M]trait CpsMonadContext[M]class Objecttrait Matchableclass AnyShow all
- Known subtypes
-
Attributes
- Supertypes
-
trait CpsLogicMonad[M]trait CpsTryMonad[M]trait CpsTrySupport[M]trait CpsThrowMonad[M]trait CpsThrowSupport[M]trait CpsMonad[M]class Objecttrait Matchableclass AnyShow all
- Known subtypes
-
class CpsLogicStreamConcurrenctMonad[F]
Attributes
- Supertypes
-
trait CpsLogicMonadContext[M]trait CpsTryMonadContext[M]trait CpsThrowMonadContext[M]trait CpsMonadContext[M]class Objecttrait Matchableclass AnyShow all
Typeclass for monad with backtracking logic operations. We can interpret it as a monad with non-deterministic choice or as a potentialy infinite stream of values corresponding to possible choices.
Typeclass for monad with backtracking logic operations. We can interpret it as a monad with non-deterministic choice or as a potentialy infinite stream of values corresponding to possible choices.
The default implementation is LogicStream (for no need in async operations) or LogicStreamT[F] (for need in async operations)
Attributes
- Companion
- object
- Supertypes
-
trait CpsTryMonad[M]trait CpsTrySupport[M]trait CpsThrowMonad[M]trait CpsThrowSupport[M]trait CpsMonad[M]class Objecttrait Matchableclass AnyShow all
- Known subtypes
-
class CpsLogicStreamConcurrenctMonad[F]trait CpsLogicMonadInstanceContext[M]object CpsLogicStreamSyncMonadclass CpsLogicStreamTryMonad[F]object LazyListCpsLogicMonadtrait CpsLogicStreamMonadBase[F]trait CpsSyncLogicMonad[M]Show all
Attributes
- Companion
- trait
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
CpsLogicMonad.type
Attributes
- Supertypes
-
trait CpsTryMonadContext[M]trait CpsThrowMonadContext[M]trait CpsMonadContext[M]class Objecttrait Matchableclass AnyShow all
- Known subtypes
-
class CpsLogicMonadInstanceContextBody[M]
Attributes
- Supertypes
-
trait CpsLogicMonad[M]trait CpsTryMonad[M]trait CpsTrySupport[M]trait CpsThrowMonad[M]trait CpsThrowSupport[M]trait CpsMonad[M]class Objecttrait Matchableclass AnyShow all
- Known subtypes
Attributes
- Supertypes
-
trait CpsLogicMonadContext[M]trait CpsTryMonadContext[M]trait CpsThrowMonadContext[M]trait CpsMonadContext[M]class Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
Attributes
- Supertypes
-
class Objecttrait Matchableclass AnyShow all
- Known subtypes
-
class CpsLogicStreamConcurrenctMonad[F]object CpsLogicStreamSyncMonadclass CpsLogicStreamTryMonad[F]
Attributes
- Supertypes
-
trait CpsSyncLogicMonad[LogicStream]trait CpsLogicStreamMonadBase[CpsIdentity]trait CpsLogicMonad[LogicStream]trait CpsTryMonad[LogicStream]trait CpsTrySupport[LogicStream]trait CpsThrowMonad[LogicStream]trait CpsThrowSupport[LogicStream]trait CpsMonad[LogicStream]class Objecttrait Matchableclass AnyShow all
- Self type
Attributes
- Supertypes
Attributes
- Supertypes
-
trait CpsLogicMonad[M]trait CpsTryMonad[M]trait CpsTrySupport[M]trait CpsThrowMonad[M]trait CpsThrowSupport[M]trait CpsMonad[M]class Objecttrait Matchableclass AnyShow all
- Known subtypes
-
object CpsLogicStreamSyncMonadobject LazyListCpsLogicMonad
Attributes
- Supertypes
-
trait CpsLogicMonadInstanceContext[LazyList]trait CpsSyncLogicMonad[LazyList]trait CpsLogicMonad[LazyList]trait CpsTryMonad[LazyList]trait CpsTrySupport[LazyList]trait CpsThrowMonad[LazyList]trait CpsThrowSupport[LazyList]trait CpsMonad[LazyList]class Objecttrait Matchableclass AnyShow all
- Self type
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
LogicStream.type
Attributes
- Companion
- trait
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
LogicStreamT.type
Types
Value members
Concrete methods
Transform collection into logical stream, which include all elements.
Transform collection into logical stream, which include all elements.
Value parameters
- collection
-
- collection to transform
- m
-
- logical monad to use.
Attributes
Should be used inside of reify block over CpsLogicMonad. Create a Choices instance, which can be used for 'injecting' value of collection into logical stream via mini-DSL.
Should be used inside of reify block over CpsLogicMonad. Create a Choices instance, which can be used for 'injecting' value of collection into logical stream via mini-DSL.
Value parameters
- mc
-
- monad context
Attributes
Should be used inside of reify block over CpsLogicMonad. The next sequent code will be executed for all elements of collection
Should be used inside of reify block over CpsLogicMonad. The next sequent code will be executed for all elements of collection
Value parameters
- collection
-
- collection to iterate over
- mc
-
- monad context
Attributes
Should be used inside of reify block over CpsLogicMonad. The next sequent code will be executed only if p
is true, otherwise the computation of the current value of logical stream will be terminated.
Should be used inside of reify block over CpsLogicMonad. The next sequent code will be executed only if p
is true, otherwise the computation of the current value of logical stream will be terminated.
Value parameters
- mc
-
- monad context
- p
-
- predicate to check
Attributes
Givens
Givens
Extensions
Extensions
Synonym for 'fairFlatMap' or haskell >>-
Synonym for 'fairFlatMap' or haskell >>-
Attributes
- Returns
-
- stream, which contains values from
ma
andf
applied to each value ofma
in interleaved order.
- stream, which contains values from
- See also
-
cps.monads.logic.CpsLogicMonad.fairFlatMap
Version of flatMap, which interleave all results of ma (i.e. horizontal search instead of bfs).
Version of flatMap, which interleave all results of ma (i.e. horizontal search instead of bfs).
Value parameters
- f
-
- function to apply to each value of
ma
- function to apply to each value of
Attributes
- See also
-
cps.monads.logic.CpsLogicMonad.fairFlatMap
filter values, which satisfy predicate.
filter values, which satisfy predicate.
Attributes
CpsLogicMonad extension methods.
CpsLogicMonad extension methods.
Attributes
If ma
is note empty, then run thenp
on it else elsep
,
If ma
is note empty, then run thenp
on it else elsep
,
Attributes
- See also
-
cps.monads.logic.CpsLogicMonad.ifte
get first N values of computation, discarding all other.
get first N values of computation, discarding all other.
Value parameters
- n
-
- how many values to get
Attributes
- Returns
-
- sequence of values in observer monad
- See also
-
cps.monads.logic.CpsLogicMonad.mObserveN
get first value of computation.
get first value of computation.
Attributes
- See also
-
cps.monads.logic.CpsLogicMonad.mObserveOne
retrieve only first value of computation.
retrieve only first value of computation.
Attributes
- Returns
-
- stream, which contains only first value of
ma
- stream, which contains only first value of
- See also
-
cps.monads.logic.CpsLogicMonad.once
Run thenp
if ma
is empty.
Run thenp
if ma
is empty.
Attributes
- See also
-
cps.monads.logic.CpsLogicMonad.otherwise
interleave current computation with mb
interleave current computation with mb
Value parameters
- mb
-
computation to interleave.
Attributes
- Returns
-
- stream, which contains values from
ma
andmb
in interleaved order.
- stream, which contains values from
- See also
-
cps.monads.logic.CpsLogicMonad.interleave
Synonym for 'mplus'.
Synonym for 'mplus'.
Value parameters
- mb
-
- computation to add
Attributes
- Returns
-
- stream, which contains values from
ma
and whenma
is exhaused -mb
- stream, which contains values from
- See also
-
cps.monads.logic.CpsLogicMonad.mplus
Synonym for 'mplus'.
Synonym for 'mplus'.
Attributes
- See also
-
cps.monads.logic.CpsLogicMonad.mplus