@Test public void analyze() { FreeAp<DSL_, Tuple5<Integer, Boolean, Double, String, Unit>> tuple = applicative.mapN( DSL.readInt(2), DSL.readBoolean(false), DSL.readDouble(2.1), DSL.readString("hola mundo"), DSL.readUnit(), Tuple::of ).fix(toFreeAp()); String analize = tuple.analyze(constTransform(), ConstInstances.applicative(Monoid.string())); assertEquals("ReadInt(2)\n" + "ReadBoolean(false)\n" + "ReadDouble(2.1)\n" + "ReadString(hola mundo)\n" + "ReadUnit(Unit)\n", analize); }
public <M> M analyze(FunctionK<F, Kind<Const_, M>> functionK, Applicative<Kind<Const_, M>> applicative) { return foldMap(functionK, applicative).fix(toConst()).get(); }
FreeAp implements FreeApOf<F, A> { public <M> M analyze(FunctionK<F, Kind<Const_, M>> functionK, Applicative<Kind<Const_, M>> applicative) { return foldMap(functionK, applicative).fix(toConst()).get(); } }
FreeAp implements FreeApOf<F, A> { public <M> M analyze(FunctionK<F, Kind<Const_, M>> functionK, Applicative<Kind<Const_, M>> applicative) { return foldMap(functionK, applicative).fix(toConst()).get(); } private  FreeAp(); }
FreeAp implements FreeApOf<F, A> { public <M> M analyze(FunctionK<F, Kind<Const_, M>> functionK, Applicative<Kind<Const_, M>> applicative) { return foldMap(functionK, applicative).fix(toConst()).get(); } private  FreeAp(); abstract FreeAp<F, B> map(Function1<? super A, ? extends B> mapper); FreeAp<F, B> ap(FreeAp<F, Function1<? super A, ? extends B>> apply); Kind<F, A> fold(Applicative<F> applicative); FreeAp<G, A> compile(FunctionK<F, G> transformer); FreeAp<G, A> flatCompile(
      FunctionK<F, Kind<FreeAp_, G>> functionK, Applicative<Kind<FreeAp_, G>> applicative); M analyze(FunctionK<F, Kind<Const_, M>> functionK, Applicative<Kind<Const_, M>> applicative); Free<F, A> monad(); @SuppressWarnings({"rawtypes", "unchecked"}) Kind<G, A> foldMap(FunctionK<F, G> functionK, Applicative<G> applicative); static FreeAp<F, T> pure(T value); static FreeAp<F, T> lift(Kind<F, T> value); static FreeAp<F, R> apply(FreeAp<F, ? extends T> value, 
      FreeAp<F, ? extends Function1<? super T, ? extends R>> mapper); static FunctionK<F, Kind<FreeAp_, G>> functionKF(FunctionK<F, G> functionK); @SuppressWarnings("unchecked") static Applicative<Kind<FreeAp_, F>> applicativeF(); }
FreeAp implements FreeApOf<F, A> { public <M> M analyze(FunctionK<F, Kind<Const_, M>> functionK, Applicative<Kind<Const_, M>> applicative) { return foldMap(functionK, applicative).fix(toConst()).get(); } private  FreeAp(); abstract FreeAp<F, B> map(Function1<? super A, ? extends B> mapper); FreeAp<F, B> ap(FreeAp<F, Function1<? super A, ? extends B>> apply); Kind<F, A> fold(Applicative<F> applicative); FreeAp<G, A> compile(FunctionK<F, G> transformer); FreeAp<G, A> flatCompile(
      FunctionK<F, Kind<FreeAp_, G>> functionK, Applicative<Kind<FreeAp_, G>> applicative); M analyze(FunctionK<F, Kind<Const_, M>> functionK, Applicative<Kind<Const_, M>> applicative); Free<F, A> monad(); @SuppressWarnings({"rawtypes", "unchecked"}) Kind<G, A> foldMap(FunctionK<F, G> functionK, Applicative<G> applicative); static FreeAp<F, T> pure(T value); static FreeAp<F, T> lift(Kind<F, T> value); static FreeAp<F, R> apply(FreeAp<F, ? extends T> value, 
      FreeAp<F, ? extends Function1<? super T, ? extends R>> mapper); static FunctionK<F, Kind<FreeAp_, G>> functionKF(FunctionK<F, G> functionK); @SuppressWarnings("unchecked") static Applicative<Kind<FreeAp_, F>> applicativeF();  }