monads vocabulary
Factor handbook ยป Vocabulary index


Summary
Haskell-style monads

Metadata
Tags:extensions
Authors:Slava Pestov


Words

Tuple classes
ClassSuperclassSlots
identity tuplevalue
just tuplevalue
left tuplevalue
reader tuplequot
right tuplevalue
state tuplequot
writer tuplevalue log


Singleton classes
array-monad
either-monad
identity-monad
list-monad
maybe-monad
nothing
reader-monad
state-monad
writer-monad


Mixin classes
monad


Union classes
either
maybe


Generic words
WordStack effect
$>( functor quot -- functor' )
<$( functor quot -- functor' )
>>=( mvalue -- quot )
fail( value singleton -- mvalue )
fmap( functor quot -- functor' )
monad-of( mvalue -- singleton )
return( value singleton -- mvalue )


Ordinary words
WordStack effect
<just>( value -- just )
<left>( value -- left )
<reader>( quot -- reader )
<right>( value -- right )
<state>( quot -- state )
<writer>( value log -- writer )
>>( mvalue k -- mvalue' )
apply( mvalue mquot monad -- result )
ask( -- reader )
bind( mvalue quot -- mvalue' )
bind*( mvalue quot -- mvalue' )
do( quots -- result )
get-st( -- state )
if-either( value left-quot right-quot -- )
if-maybe( maybe just-quot nothing-quot -- )
lift-m2( m1 m2 f monad -- m3 )
listen( writer -- writer' )
local( reader quot -- reader' )
mcall( x state -- y )
pass( writer -- writer' )
put-st( value -- state )
return-st( value -- mvalue )
run-identity( identity -- value )
run-reader( reader env -- value )
run-st( state initial -- value )
run-writer( writer -- value log )
tell( seq -- writer )


Class predicate words
WordStack effect
array-monad?( object -- ? )
either-monad?( object -- ? )
either?( object -- ? )
identity-monad?( object -- ? )
identity?( object -- ? )
just?( object -- ? )
left?( object -- ? )
list-monad?( object -- ? )
maybe-monad?( object -- ? )
maybe?( object -- ? )
monad?( object -- ? )
nothing?( object -- ? )
reader-monad?( object -- ? )
reader?( object -- ? )
right?( object -- ? )
state-monad?( object -- ? )
state?( object -- ? )
writer-monad?( object -- ? )
writer?( object -- ? )


Files


Metadata files