Search results
assure :: forall a e g f. ErrorControl f g e => Monad f => g a -> (a -> Maybe e) -> f a
bind :: forall m a b. Bind m => m a -> (a -> m b) -> m b
discard :: forall a f b. Discard a => Bind f => f a -> (a -> f b) -> f b
bind' :: forall v1 v0 m c. HasBind c m => ObjectOf c v0 => ObjectOf c (m v1) => Restrictable Function c => m v0 -> (v0 -> (m v1)) -> m v1
bind :: forall c b a. HasChain a => a b -> (b -> a c) -> a c
A version of chain
with the arguments flipped. This is provided only to
support desugaring do
notation. It is not recommended to use explicitly.
fairConjunction :: forall b a m. MonadLogic m => m a -> (a -> m b) -> m b
hummingbird :: forall m b a. Bind m => m a -> (a -> m b) -> m b
H combinator - hummingbird
BW(BC)
Λ a b c (a → b → a → c) → a → b → c
λ f x y . f x y x
when :: forall b a m. MonadLogic m => m a -> (a -> m b) -> m b
catchError :: forall e m a. MonadError e m => m a -> (e -> m a) -> m a
controlError :: forall f g e a. ErrorControl f g e => f a -> (e -> g a) -> g a
mapFlipped :: forall f a b. Functor f => f a -> (a -> b) -> f b
mapFlipped
is map
with its arguments reversed. For example:
[1, 2, 3] <#> \n -> n * n
flippedMap :: forall f a b. Functor f => f a -> (a -> b) -> f b
delay :: forall m a b. Delay m => a -> (a -> m b) -> m b
fromMaybeS :: forall a f. Selective f => f a -> f (Maybe a) -> f a
fromMaybeS :: forall @f @a. Select f => f a -> f (Maybe a) -> f a
If the second action is Nothing
, run and return the first
cmapFlipped :: forall a b f. Contravariant f => f a -> (b -> a) -> f b
cmapFlipped
is cmap
with its arguments reversed.
intercept :: forall a e g f. ErrorControl f g e => f a -> (e -> a) -> g a
applyFlipped :: forall a b. a -> (a -> b) -> b
Applies an argument to a function. This is primarily used as the (#)
operator, which allows parentheses to be omitted in some cases, or as a
natural way to apply a value to a chain of composed functions.
applySecond :: forall a b f. Apply f => f a -> f b -> f b
Combine two effectful actions, keeping only the result of the second.
voidLeft :: forall f a b. Functor f => f a -> b -> f b
A version of voidRight
with its arguments flipped.
fromMaybe' :: forall a. Maybe a -> a -> a
An infix form of fromMaybe
with arguments flipped.
mulNat :: forall proxy a b c. ProductNat a b c => proxy a -> proxy b -> proxy c
plus :: forall proxy a b c. SumInt a b c => proxy a -> proxy b -> proxy c
plusNat :: forall proxy a b c. SumNat a b c => proxy a -> proxy b -> proxy c
powNat :: forall proxy a b c. ExponentiationNat a b c => proxy a -> proxy b -> proxy c
> powNat d2 d3
8 -- : NProxy D8
a raised to the power of b a^b = c
prod :: forall proxy a b c. ProductInt a b c => proxy a -> proxy b -> proxy c
sampleOnLeft_ :: forall event a b. IsEvent event => event a -> event b -> event b
divides :: forall a. Divisible a => a -> a -> Maybe a
downcast :: forall ctor from to. ctor -> from -> Maybe to
Attempt to cast to a type given a constructor for it
applySecond :: forall v1 v0 f c. HasApply c f => HasConst c => HasIdentity c => HasMap c f => ObjectOf c v0 => ObjectOf c v1 => ObjectOf c (c v1 v1) => ObjectOf c (c v0 (c v1 v1)) => ObjectOf c (c (c v1 v1) (c v0 (c v1 v1))) => f v0 -> f v1 -> f v1
concat :: forall xs ys zs lproxy. Concat xs ys zs => lproxy xs -> lproxy ys -> lproxy zs
downcast :: forall ctor from to. ctor -> from -> Maybe to
Attempt to cast to a type given a constructor for it
drop :: forall n xs ys lproxy iproxy. Drop n xs ys => iproxy n -> lproxy xs -> lproxy ys
lookup :: forall c k r. Lookup c k r => c -> k -> Maybe r
Given some type and a key on that type, extract some value that corresponds to that key.
lookup :: forall c k r. Lookup c k r => c -> k -> Maybe r
Given some type and a key on that type, extract some value that corresponds to that key.
map :: forall f xs ys fproxy kproxy lproxy. Map f xs ys => fproxy f -> kproxy xs -> lproxy ys
take :: forall n xs ys lproxy iproxy. Take n xs ys => iproxy n -> lproxy xs -> lproxy ys
zip :: forall x y z lproxy. Zip x y z => lproxy x -> lproxy y -> lproxy z
getOrAlt :: forall v s r' r l h g f. Alternative h => Cons s v r' r => RowToList r l => RGetOrAlt f g s l r => g s -> f r -> h v
max :: forall a. PartialOrd a => a -> a -> Maybe a
min :: forall a. PartialOrd a => a -> a -> Maybe a
pMax :: forall a. PartialOrd a => a -> a -> Maybe a
pMin :: forall a. PartialOrd a => a -> a -> Maybe a
rsingleton :: forall f g s v r. RSingleton f g s => Cons s v () r => Lacks s () => g s -> v -> f r
singleton :: forall v s r g f. Cons s v () r => Lacks s () => RSingleton f g s => g s -> v -> f r
_call :: forall b a. a -> (a -> b) -> b
after :: forall k f. Eq k => Foldable f => k -> f k -> Maybe k
always_ :: forall a i. i -> a -> Maybe i
before :: forall k f. Eq k => Foldable f => k -> f k -> Maybe k
bind :: forall a. Semigroup a => a -> (a -> a) -> a