
On Sun, Apr 29, 2012 at 03:32:48AM -0400, Michael Orlitzky wrote:
On 04/29/2012 02:35 AM, Mike Meyer wrote:
On Sun, 29 Apr 2012 01:20:22 -0400 Michael Orlitzky
wrote: They're wrapped in Proc objects, but those objects can be treated like any other in the language. Everything else is just syntactic sugar on top of Procs.
That makes *Procs* first class object, not functions.
What's the difference? You're not passing around the actual function, in any language.
$ python Python 2.7.3 (default, Apr 14 2012, 23:17:33) [GCC 4.7.0 20120407 (prerelease)] on linux2 Type "help", "copyright", "credits" or "license" for more information.
def f(): ... print 'foo' ... def g(f): ... print 'bar' ... f() ... g(f) bar foo
Also: http://en.wikipedia.org/wiki/First-class_function#Language_support L. -- Lorenzo Bolla http://lbolla.info