fizz is a programming language created in 2017.
#1767on PLDB | 7Years Old |
// Code ----------------------------------------------------------------------------------------------------------------------------------
is.tree { // test if a term is a valid binary tree
(nil)^ :- true;
(n(_,_,:l,:r))^ :- #is.tree(:l), #is.tree(:r);
(_) :- false;
}
btr.length { // how many nodes is there on a binary tree
(nil,0)^ :- true;
(n(_,_,:l,:r),:n) :- #btr.length(:l,:l.n),
#btr.length(:r,:r.n),
sum(:l.n,:r.n,1,:n);
}
Feature | Supported | Token | Example |
---|---|---|---|
Booleans | ✓ | true false | |
Comments | ✓ | // A comment |
|
Line Comments | ✓ | // | // A comment |
Semantic Indentation | X |