Skip to content
/ swona Public

A Swift port of the Siilinkari language and VM

License

Notifications You must be signed in to change notification settings

tlazenka/swona

Repository files navigation

Swona

A Swift port of the lovely Siilinkari. Examples of @dynamicMemberLookup and @dynamicCallable.

Launch the REPL

cd Repl && swift run && cd -

or

docker-compose run --rm repl

Example

var a = stringArrayOfSize(3, "")
var done = false
var i = 0

while (!done) { stringArraySet(a, i, "item" + i); i = i + 1; if (i==stringArrayLength(a)) done=true }

stringArrayGet(a, 2)

fun pow(a: Int, n: Int): Int = unless (n == 0 ) a * pow(a, n-1) else 1

pow(2, 8)

More in the Prelude.

Run the tests

swift test

or

docker-compose run --rm tests

Acknowledgements

Juha Komulainen and others listed in the LICENSE.

About

A Swift port of the Siilinkari language and VM

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages