- Resumen del evento (@npatarino y/o @jmdelpozo)
- Typelevel Unconference (@jdvega y/o rdiaz)
- Don't fear the monad (@npatarino y/o @jmdelpozo)
- An introduction to Common Lisp, language, ecosystem and industrial usage (@jdvega y/o rdiaz)
- Keynote: Category Theory in Life (@jdvega y/o rdiaz)
- FP Degustation Menu (@jdvega y/o rdiaz)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
colorUserHost="\[\033[01;32m\]" | |
colorNormal="\[\033[0m\]" | |
colorFolder="\[\033[01;34m\]" | |
colorBranch="\[\033[38;5;14m\]" | |
gitBranch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
} | |
branch=$(gitBranch) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override fun all(): Future<List<Either<NetError, Task>>> = Future(async(CommonPool) { | |
val snapshot: DataSnapshot = suspendCoroutine { cont: Continuation<DataSnapshot> -> | |
taskReference.addValueEventListener(object : ValueEventListener { | |
override fun onCancelled(error: DatabaseError) { | |
cont.resumeWithException(IOException("Error retrieving data")) | |
} | |
override fun onDataChange(dataSnapshot: DataSnapshot) { | |
cont.resume(dataSnapshot) | |
} | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import arrow.Kind | |
import arrow.core.Option | |
import arrow.core.left | |
import arrow.core.right | |
import arrow.effects.typeclasses.Async | |
import arrow.typeclasses.ApplicativeError | |
data class UserId(val value: String) | |
data class User(val userId: UserId) | |
data class Task(val value: String) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface TasksRepository { | |
suspend fun tasks(user: User): Either<RepositoryError, List<Task>> | |
} | |
fun tasks(tasksRepository: TasksRepository, userRepository: UserRepository): | |
() -> Either<RepositoryError, List<Task>> = { | |
runBlocking { tasksRepository.tasks(userRepository.currentUser()) } // This is b | |
} | |
UseCase<RepositoryError, List<Task>>().bg(tasks(tasksRepository, userRepository)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://realm.io/products/realm-studio/ | |
build.gradle | |
classpath "io.realm:realm-gradle-plugin:2.2.1" | |
app/build.gradle | |
apply plugin: 'realm-android' | |
https://github.com/realm/realm-android-adapters/blob/master/example/src/main/java/io/realm/examples/adapters/ui/recyclerview/MyRecyclerViewAdapter.java |