I threw together a quick, naive, FizzBuzz in it on their online demo, was surprised to find that it doesn't have a modulus operator. Can anyone come up with something simpler?
let divisible = fn (x, y){
return (x-(x/y*y))==0;
};
for let i=1;i<=30;i++ {
if divisible(i,15){
print("FizzBuzz");
}else if divisible(i,3){
print("Fizz");
}else if divisible(i,5){
print("Buzz");
}else{
print(i);
}
}
Edit: Correction, apparently it does have a modulo operator.