IMPORTANT
I don't recommend using `colima`_ on macOS. Proceed either with `Docker Desktop`_ or `Podman Desktop`_.
| sealed interface Content<out Data> { | |
| data object Loading : Content<Nothing> | |
| data class Success<out Data>( | |
| val data: Data, | |
| val refresh: LoadState = LoadState.NotLoading, | |
| ) : Content<Data> | |
| data object Error : Content<Nothing> | |
| } |
IMPORTANT
I don't recommend using `colima`_ on macOS. Proceed either with `Docker Desktop`_ or `Podman Desktop`_.
| {:deps {org.clojure/clojure {:mvn/version "1.10.0"} | |
| com.taoensso/nippy {:mvn/version "2.14.0"} | |
| org.apache.commons/commons-compress {:mvn/version "1.18"}}} |
| import android.animation.Animator; | |
| import android.animation.AnimatorListenerAdapter; | |
| import android.animation.ValueAnimator; | |
| import android.annotation.TargetApi; | |
| import android.graphics.Matrix; | |
| import android.graphics.Rect; | |
| import android.os.Build; | |
| import android.transition.Transition; | |
| import android.transition.TransitionValues; | |
| import android.view.ViewGroup; |
#Intro
Kotlin is a new programming language for the JVM. It produces Java bytecode, supports Android and generates JavaScript. The latest version of the language is Kotlin M5.3
Kotlin project website is at kotlin.jetbrains.org.
All the codes here can be copied and run on Kotlin online editor.
Let's get started.
| (ns mmu | |
| (:gen-class) | |
| (:use [clojure.contrib duck-streams])) | |
| (defn gc [] | |
| (dotimes [_ 4] (System/gc))) | |
| (defn used-memory [] | |
| (let [runtime (Runtime/getRuntime)] | |
| (gc) |