Alma is a programming language created in 2014 by Carl M盲sak.
#1188on PLDB | 10Years Old |
git clone https://github.com/masak/alma
Alma is a small language created as a testbed for Raku macros.
macro swap(a, b) {
return quasi {
my t = {{{a}}};
{{{a}}} = {{{b}}};
{{{b}}} = t;
};
}
func gcd(a, b) {
if b {
return gcd(b, a % b);
}
return a.abs();
}
my bigger = +prompt("Enter the bigger integer: ");
my smaller = +prompt("Enter the smaller integer: ");
if bigger < smaller {
swap(bigger, smaller);
}
say();
say("Greatest common denominator: ", gcd(bigger, smaller));