π string helloWorld π π¨ "Hello World!
JS:
console.log("Hello World!");
QUEEN:
π float fib (x: int) π
    match x with
    π [0] -> 0
    π [1] -> 1
    π π³ -> (let a π x - 1 in let b
        π x - 2 in let z π fib (a) in
        let y π fib (b) in y + z)
JS:
myRecursiveFunction = (n) => {
    if (n > 0) {
        return myRecursiveFunction(n-1);
    } else {
        return n;
    }
};
π int length (l : string) π
    match l with
    π hd β‘οΈ [] β 1
    π hd β‘οΈ tl β 1 + length(tl)
JS:
let l = [1, 2, 3];
let lengthl = l.length;
QUEEN:
π€ (a π 0 ππΌ b π 0) then a
elseπ€ (c π 0) then c
JS:
if (a == 0 || b == 0) {
    return a
} else if (c == 0) {
    return c
}
π string reverse (l : string) π
    match l with
    π [] β []
    π hd β‘οΈ tl β reverse(tl) @ [hd]
JS:
let fruits = [βstrawberriesβ, βbananasβ, blueberriesβ, βraspberriesβ];
let reversed = fruits.reverse();
QUEEN:
π int change (n : int) π
(let quarters π n/25 in
let dimes π (n mod 25)/10 in
let nickels π ((n mod 25) mod 10)/5 in
let pennies π (((n mod 25) mod 10) mod 5) in
[quarters;dimes;nickels;pennies])
JS:
var change = function (n) {
  var changeAmt = [],
  total = 0;
  [25, 10, 5, 1].forEach(function(coin) {
    while (total + coin <= n) {
      changeAmt.push(coin);
      total += coin;
    }
  });
  return changeAmt;
};
Append → π‘ TYPE ERROR: Both lists must contain elements of the
          same type.
BinExp Add → π‘ TYPE ERROR: Only numeric types can be added and               subtracted.
BinExp Rel → π‘ TYPE ERROR: Incomparable types.
Conditional → π‘ TYPE ERROR: Condition must be a boolean.
Cons Long → π‘ UNDECLARED VARIABLE: ${this.e} has not been              declared.
→ π‘ TYPE ERROR: ${this.e} must be numeric.
Cons Short → π‘ UNDECLARED VARIABLE: ${this.e} has not been              declared.
→ π‘ TYPE ERROR: ${this.e} must be numeric.
Exp Id → π‘ UNDECLARED VARIABLE: ${this.id} has not been           declared.
Exp Print → π‘ UNDECLARED VARIABLE: ${this.n} has not been             declared.
→ π‘ TYPE ERROR: ${this.string} is not a string.
Exp1 Mult → π‘ TYPE ERROR: Only numeric types can be multiplied             and divided.
Exp2 → π‘ TYPE ERROR: Only numeric types can be negated.
Exp3 → π‘ UNDECLARED VARIABLE: ${this.n} has not been declared.
→ π‘ TYPE ERROR: ${this.n} must be numeric.
Funcall → π‘ ARITY ERROR: ${this.args.length} arguments provided           and ${func.parameters.length} were expected.
→ π‘ UNDECLARED VARIABLE: ${this.args[i]} has not been           declared.
→ π‘ TYPE ERROR: Expected ${this.args[i]} to be          ${func.paramTypes[i].toString()}.
→ π‘ UNDECLARED VARIABLE: ${this.id} has not been           declared.
FunDecl → π‘ TYPE ERROR: Function was expected to evaluate to            type ${this.returnType}.
Let Let → π‘ VARIABLE DECLARARTION ERROR: ${this.exp} cannot be           assigned to a variable.
List → π‘ TYPE ERROR: List elements must all be of the same type.
Match → π‘ UNDECLARED VARIABLE: ${this.id} has not been           declared.
MatchExp → π‘ TYPE ERROR: Must match to something of the same             type.
Pattern Pattern → π‘ UNDECLARED VARIABLE: ${this.e} has not been                  declared.
→ π‘ TYPE ERROR: ${this.e} must be numeric.