Traversable Binary Tree #
Provides a Traversable instance for the Tree type.
theorem
Tree.comp_traverse
{α : Type u_1}
{F : Type u → Type v}
{G : Type v → Type w}
[Applicative F]
[Applicative G]
[LawfulApplicative G]
{β : Type v}
{γ : Type u}
(f : β → F γ)
(g : α → G β)
(t : Tree α)
:
traverse (Functor.Comp.mk ∘ (fun (x : G β) => f <$> x) ∘ g) t = Functor.Comp.mk ((fun (x : Tree β) => traverse f x) <$> traverse g t)
theorem
Tree.naturality
{α : Type u_1}
{F : Type u → Type u_3}
{G : Type u → Type u_4}
[Applicative F]
[Applicative G]
[LawfulApplicative F]
[LawfulApplicative G]
(η : ApplicativeTransformation F G)
{β : Type u}
(f : α → F β)
(t : Tree α)
: