On Tue, Feb 01, 2005 at 03:50:50PM -0800, Stewart Stremler wrote:
> > LISP trades slighly increased complexity
> > relative to Python for supreme Jedi powers that you won't find anywhere
> > else... namely something called 'macros'.  (No I don't mean #define
> > type macros like in C... Those are similar in /name/ only.)
> I thought it was "closures".

no.
closures are something completely different.

closures are local functions that reference surrounding variables:

function prefix(string arg)
{
  string outside = arg+" ";
  function closure = lambda(string in){ write(outside+in); };

  return closure;
}


// use prefix() like this:
function write_kplug = prefix("the kernel panic linux user group");

// and now
write_kplug("is great");

// will produce: "the kernel panic linux user group is great"

the above is pike. python (and of course lisp) and a number of other
languages also do support closures.

greetings, martin.
-- 
cooperative communication with sTeam      -     caudium, pike, roxen and unix
offering: programming, training and administration   -  anywhere in the world
--
pike programmer   travelling and working in europe             open-steam.org
unix system-      bahai.or.at                        iaeste.(tuwien.ac|or).at
administrator     (caudium|gotpike).org                          is.schon.org
Martin B�hr       http://www.iaeste.or.at/~mbaehr/
-- 
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list

Reply via email to