Skip to content

Instantly share code, notes, and snippets.

@florina-muntenescu
florina-muntenescu / BaseDao.kt
Last active July 8, 2024 12:48
Use Dao inheritance to reduce the amount of boilerplate code - https://medium.com/google-developers/7-pro-tips-for-room-fbadea4bfbd1
/*
* Copyright (C) 2017 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@mikesol
mikesol / prose.kt
Last active August 19, 2019 19:36
Kotlin code snippet
class _First {
infix fun sign(into: _Into) = into
}
class _Into {
infix fun your(console: _Console) {
// insert sign in logic, ie via Robolectric
return console
}
}
class _Console { val Then = this