interpreter<F> method

Function1<Free<Either<Either<First, Second>, Third>, dynamic>, F> interpreter<F>(
  1. Monad<F> M,
  2. dynamic firstInterpreter(
    1. First op
    ),
  3. dynamic secondInterpreter(
    1. Second op
    ),
  4. dynamic thirdInterpreter(
    1. Third op
    ),
)

Implementation

Function1<Free<Either<Either<First, Second>, Third>, dynamic>, F> interpreter<F>(Monad<F> M, firstInterpreter(First op), secondInterpreter(Second op), thirdInterpreter(Third op)) {
  final interpreter = composeInterpreters(composeInterpreters(firstInterpreter, secondInterpreter), thirdInterpreter);
  return (fa) => fa.foldMap(M, interpreter);
}