NOTE: rhombus first try
Rhombus is Racket 2(maybe?), an another syntax style choose for Racket's
User, one must write #lang rhombus
to use it. To install, use
raco pkg install --auto rhombus-prototype
1. Expression and block form
1+1 begin: let v: 1 v
2. Define Variable
val x :: Integer : 1 x+1 val mutable ha: 1 ha := 2 ha def y: 1 y
3. Define template
def '$x @mul $y': '$x * $y' 2 @mul 3
4. Define function
def foo(x) :: Integer: x foo(y) fun bar(x :: Integer) :: Integer: x + 1
5. Define new operator
operator(x ! y): x + y 1 ! 2
6. Class
class Book(name :: String, author :: String) val b: Book("The Lord of the Rings", "J. R. R. Tolkien") b.author