[Haskell-beginners] Haskell as a useful practical 'tool' for intelligent non-programmers
Lorenzo Bolla
lbolla at gmail.com
Sun Apr 29 16:28:15 CEST 2012
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 <michael at orlitzky.com> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/beginners/attachments/20120429/e0219afe/attachment.pgp>
More information about the Beginners
mailing list