Closures

newGreeter = def (greeting) {
  return def (name) { puts(greeting + " " + name); }
};

hello = newGreeter("Hello");

hello("dear, future Reader!");

Edit this page on GitHub