Skip to content

Instantly share code, notes, and snippets.

@reactormonk
Created August 13, 2019 16:42
Show Gist options
  • Save reactormonk/21281a6c68ad6487dc8644ffb7433500 to your computer and use it in GitHub Desktop.
Save reactormonk/21281a6c68ad6487dc8644ffb7433500 to your computer and use it in GitHub Desktop.
import cats._
// import cats._
object f1 {
trait Fold[I, O] {
type M
def tally(i: I): M
def summarize(m: M): O
def monoid: Monoid[M]
}
object Fold {
def runList[I, O](fold: Fold[I, O], data: List[I]): O = {
???
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment