@molt is a small expression-oriented language for quoting code, rewriting it with first-class mutations, and executing the result explicitly.
Core primitives:
@{ ... } # quote code
~{ ... } # define a mutation
@moltis pre-alpha software. The language, implementation, and documentation are all in early stages of development. Expect breaking changes and incomplete features. Feedback and contributions are very welcome!
Requirements:
- Go
1.26
Build and test:
go build ./...
go test ./...
go vet ./...Format Molt and Go sources:
go run ./cmd/molt fmt .Check formatting without rewriting files:
go run ./cmd/molt fmt --check .Run a program:
go run ./cmd/molt ./examples/basic/basic_mutation.moltConvenience wrappers are also available:
./dev.ps1 build
./dev.ps1 test
./dev.ps1 lint
./dev.ps1 format
./dev.ps1 format:checkimport "std:io"
fn add(a, b) = a + b
fn mul = add ~{ + -> * }
print(add(2, 3))
print(mul(2, 3))Contributions are welcome! Please see the contributing guide for details on how to get involved.
This project is licensed under the MIT License. See the LICENSE file for details.