Examples
Small pieces of Kalm, one topic at a time. Most pages contain a single snippet.
Basics
Blocks and comments · Comments
Values
fix · var · Types · Literals · Text interpolation · Operators · and / or / not · Numeric conversions · Nullable types · ?. / ?[] · ?? · ??= · is · as · Null refinement
Collections
Lists · Maps · Arrays · Indexing · range
Functions
fun / return · Lambdas · Generics / given · Streams
Flow
if / elif / else · while · for / in · stop / next · choose / when · try / handle / finally · raise · Type patterns
Types
class / init / self · data / generate Display · choice · contract / impl / override · base / needs / inherits · extendable / fix · closed · singleton · alias · forward · Visibility
Properties
read / write · lazy fix · late var · constant
Java & modules
space · use / as · Calling Java · Java calling Kalm · external fun · augment · bridge augment · annotation / target · Annotation use · legacy · Overloads and varargs · Type annotations
Resources
with · defer · expect / require / ensure
Concurrency
task · async fun / await · Java completion stages · guard