europalang / Europa-Lang

A fun and simple language with NO classes whatsoever!
MIT License
22 stars 3 forks source link

Implement optional args #31

Closed cursorweb closed 2 years ago

cursorweb commented 2 years ago

Finally, the feature we all want!

use io.println;

fn add(a, b, print = false) {
  if print { println(a + b); }
  return a + b;
}

println(add(1, 2)); // 3
add(1, 2, print = true); // 3