Category-Theory-for-Programmers.kt
Category-Theory-for-Programmers.kt copied to clipboard
`./gradlew runAnk` is failing
./gradlew runAnk
is failing.
When I rerun with --info
, this is the output:
[✗ /Users/xxxx/dev/Category-Theory-for-Programmers.kt/build/site/2.4-representable-functors.md [2]
Exception in thread "main"
----------------------------------------------------------------
File located at: /Users/xxxx/dev/Category-Theory-for-Programmers.kt/build/site/2.4-representable-functors.md
```
import arrow.core.Id
import arrow.core.andThen
fun <D, A> fmap(run: (D) -> A): Reader<D, A> = Kleisli(run.andThen { Id(it) })
```
error: type inference failed. Expected type mismatch: inferred type is Kleisli<D, ForId, A> but Line_1.Reader<D, A> /* = Kleisli<ForId, D, A> */ was expected
fun <D, A> fmap(run: (D) -> A): Reader<D, A> = Kleisli(run.andThen { Id(it) })