Skip to content

Instantly share code, notes, and snippets.

@rpiotrow
Last active August 28, 2019 10:42
Show Gist options
  • Save rpiotrow/59cf6f24b27b18eee3b42ba02dedd77f to your computer and use it in GitHub Desktop.
Save rpiotrow/59cf6f24b27b18eee3b42ba02dedd77f to your computer and use it in GitHub Desktop.
interface EmployeeRepository<F> {
fun findAll(): Kind<F, List<Employee>>
}
class IOEmployeeRepository: EmployeeRepository<ForIO> {
override fun findAll(): IO<List<Employee>> = IO {
listOf(Employee(1, "John", "Smith"))
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment