Packages
doma_algae
1.3.2-doma
Bootstrapped algebraic data types for Elixir, forked by doma for maintenance and testing packagesets
Current section
Files
Jump to
Current section
Files
lib/algae/tree/rose/functor.ex
alias Algae.Tree.Rose
alias Witchcraft.Functor
import TypeClass
definst Witchcraft.Functor, for: Algae.Tree.Rose do
def map(%Rose{rose: rose, forest: forest}, fun) do
%Rose{
rose: fun.(rose),
forest: Functor.map(forest, &Functor.map(&1, fun))
}
end
end