These are chat archives for typelevel/general

3rd
Sep 2017
Edmund Noble
@edmundnoble
Sep 03 2017 00:29
Whoops, looks like a Moore machine
Alexander Konovalov
@alexknvl
Sep 03 2017 00:53
Rewritten in terms of state transitions (i.e. no closures).
final case class Iteratee1[-A, S, +B](init: S, next: (S, A) => S, end: S => B)
type Iteratee[-A, +B] = Iteratee1[A, _, B]

final case class Iteratee1[F[_], A, S, B](init: F[S], next: (S, A) => F[S], end: S => F[B])
type Iteratee[F[_], A, B] = Iteratee1[F[_], A, _, B]
Fabio Labella
@SystemFw
Sep 03 2017 01:38
you might also want to look at the auto library to see a few cool things with Mealy machines. There's a blog post series by the author (Justin Le)