Because Fold is a Comonad, it's also an instance of Extend (from "semigroupoids").
FoldM is not a Comonad because we cant define extract, but it can be given an Extend instance. The implementation of duplicated is the same as the already-existing function duplicateM.
Because
Fold
is aComonad
, it's also an instance ofExtend
(from "semigroupoids").FoldM
is not aComonad
because we cant defineextract
, but it can be given anExtend
instance. The implementation ofduplicated
is the same as the already-existing functionduplicateM
.