Skip to content

Commit

Permalink
add join
Browse files Browse the repository at this point in the history
  • Loading branch information
janmasrovira committed Aug 22, 2024
1 parent 83250b7 commit a9bd82d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Stdlib/Trait/Monad.juvix
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,9 @@ syntax operator >>= seq;

syntax operator >=> seq;
>=> {A B C} {f : Type -> Type} {{Monad f}} (h : A -> f B) (g : B -> f C) (a : A) : f C := h a >>= g;

join {A} {f : Type -> Type} {{Monad f}} (x : f (f A)) : f A :=
do {
y <- x;
y;
};

0 comments on commit a9bd82d

Please sign in to comment.