@Test public void coyoneda() { Coyoneda<Option_, String, String> coyoneda = Coyoneda.of(Option.some("string"), identity()); Coyoneda<Option_, String, String> result = coyoneda.map(concat).map(concat); assertEquals(Option.some("stringstringstringstring"), result.run(functor())); }
private Coyoneda(Kind<F, ? extends A> value, Function1<? super A, ? extends B> map) { this.value = checkNonNull(value); this.map = checkNonNull(map); }
Coyoneda implements CoyonedaOf<F, A, B> { private Coyoneda(Kind<F, ? extends A> value, Function1<? super A, ? extends B> map) { this.value = checkNonNull(value); this.map = checkNonNull(map); } }
Coyoneda implements CoyonedaOf<F, A, B> { private Coyoneda(Kind<F, ? extends A> value, Function1<? super A, ? extends B> map) { this.value = checkNonNull(value); this.map = checkNonNull(map); } private  Coyoneda(Kind<F, ? extends A> value, Function1<? super A, ? extends B> map); }
Coyoneda implements CoyonedaOf<F, A, B> { private Coyoneda(Kind<F, ? extends A> value, Function1<? super A, ? extends B> map) { this.value = checkNonNull(value); this.map = checkNonNull(map); } private  Coyoneda(Kind<F, ? extends A> value, Function1<? super A, ? extends B> map); Kind<F, B> run(Functor<F> functor); Coyoneda<F, A, C> map(Function1<? super B, ? extends C> next); static Coyoneda<F, A, B> of(Kind<F, ? extends A> value, Function1<? super A, ? extends B> map); }
Coyoneda implements CoyonedaOf<F, A, B> { private Coyoneda(Kind<F, ? extends A> value, Function1<? super A, ? extends B> map) { this.value = checkNonNull(value); this.map = checkNonNull(map); } private  Coyoneda(Kind<F, ? extends A> value, Function1<? super A, ? extends B> map); Kind<F, B> run(Functor<F> functor); Coyoneda<F, A, C> map(Function1<? super B, ? extends C> next); static Coyoneda<F, A, B> of(Kind<F, ? extends A> value, Function1<? super A, ? extends B> map);  }