Closures
newGreeter = def (greeting) {
return def (name) { puts(greeting + " " + name); }
};
hello = newGreeter("Hello");
hello("dear, future Reader!");
newGreeter = def (greeting) {
return def (name) { puts(greeting + " " + name); }
};
hello = newGreeter("Hello");
hello("dear, future Reader!");