Skip to content

Commit

Permalink
sync
Browse files Browse the repository at this point in the history
  • Loading branch information
janmasrovira committed Dec 4, 2023
1 parent 5d8bb33 commit a3e08ca
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Stdlib/Data/Applicative.juvix
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ type Applicative (f : Type -> Type) :=
functor : Functor f;
pure : {A : Type} -> A -> f A;
syntax operator <*> lapp;
-- use apply and define <*>
<*> : {A B : Type} -> f (A -> B) -> f A -> f B;
-- app
};

open Applicative public;
Expand Down
1 change: 1 addition & 0 deletions Stdlib/Data/Functor.juvix
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ trait
type Functor (f : Type -> Type) :=
mkFunctor {
-- TODO what about calling it map? (like in Lean)
-- YES
fmap : {A B : Type} -> (A -> B) -> f A -> f B
};

Expand Down
1 change: 1 addition & 0 deletions Stdlib/Data/Monad.juvix
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ type Monad (f : Type -> Type) :=
mkMonad {
applicative : Applicative f;
syntax operator >>= seq;
-- bind
>>= : {A B : Type} -> f A -> (A -> f B) -> f B;
};

Expand Down

0 comments on commit a3e08ca

Please sign in to comment.