Packages

Monads and other dark magic (monoids, functors, traversables, &c), forked by doma for maintenance and testing packagesets

Current section

Files

Jump to
doma_witchcraft lib witchcraft foldable bitstring.ex
Raw

lib/witchcraft/foldable/bitstring.ex

import TypeClass
definst Witchcraft.Foldable, for: BitString do
def right_fold(string, seed, reducer) do
string
|> String.to_charlist()
|> Witchcraft.Foldable.right_fold(seed, reducer)
end
end