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
data class Request(val url: String) | |
data class Response(val code: Int, val body: String) | |
typealias Operation = (request: Request) -> Unit | |
typealias Input = (Request) -> Response? | |
typealias Output = (Request, Response) -> Unit | |
class Process(val output: Output? = null, val input: Input) | |
class Processor { |
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 androidx.compose.ui.text.input.VisualTransformation | |
import androidx.compose.ui.text.input.TransformedText | |
import androidx.compose.ui.text.input.OffsetMapping | |
import androidx.compose.ui.text.AnnotatedString | |
/** | |
* Visually transform a string as YYYY-MM-DD. | |
*/ | |
object DateVisualTransformation : VisualTransformation { |
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 android.os.Parcel | |
import android.os.Parcelable | |
import android.os.Parcelable.Creator | |
import kotlinx.android.parcel.Parceler | |
/** | |
* Enables any polymorphic type to be parcelled given they share an interface | |
* | |
* @sample | |
* ```kotlin |