ifM<F> static method

Free<F, Unit> ifM<F>(
  1. Free<F, bool> fbool,
  2. Free<F, Unit> ifTrue
)

Implementation

static Free<F, Unit> ifM<F>(Free<F, bool> fbool, Free<F, Unit> ifTrue) => fbool.flatMap((bool b) => b ? ifTrue : new Pure(unit));