var name = "Kamby";
name = "Kamby Language";
func hello(who age) {
print "Hello, " who "!";
print "You are " age " years old.";
}
hello name (3 + 1);
var name = "Kamby";
name = "Kamby Language";
func hello(who age) {
print "Hello, " who "!";
print "You are " age " years old.";
}
hello name (3 + 1);
var name = "Kamby";
name = "Kamby Language";
func show-item(item) {
print "Item: " item;
}
for-each show-item ["First" "Second" "Third"];
func hello(who age) {
print "Hello, " who "!";
print "You are " age " years old.";
}
hello name (3 + 1);
(define name "Kamby")
(set! name "Kamby Language")
(define (show-item item )
(begin
(print "Item: " item )))
(for-each show-item '("First" "Second" "Third"))
(define (hello who age)
(begin
(print "Hello, " who "!")
(print "You are " age " years old." )))
(hello name (+ 3 1))
Some aditional macros are prepended to the transpiled code.
Kamby is pure Scheme, so you can do everything your Scheme program can.
$ scheme --script kamby.scm < example.ka # Chez Scheme
$ csi -s kamby.scm < example.ka # Chicken Scheme
$ gsi kamby.scm < example.ka # Gambit Scheme
$ guile kamby.scm < example.ka # Guile Scheme
Kamby is both a transpiler and an evaluator. It converts Kamby code into Scheme, so once you understand the syntax, you can leverage the full power of Scheme.
To maximize compatibility with various Scheme implementations, Kamby reads input from `stdin`.
The current implementation supports R5RS, R6RS, and R7RS standards, making it compatible with major Scheme implementations like Chicken, Chibi, Gambit, Guile, and Chez. The `include-script` directive works like `include`, but is only available in R6RS.
MIT