[racket] Applicable objects

From: Jim Wise (jwise at draga.com)
Date: Tue Dec 14 11:53:04 EST 2010

David Van Horn <dvanhorn at ccs.neu.edu> writes:

> I learned that every Scala object that defines an apply method can be used
> as a function.  Cute.  It's nice to see a language emphasize the symmetry
> between objects and functions.

Note that this is actually bi-directional in Scala -- any object which
defines an unapply() method can be used in an ml-style pattern matching
statement as if it were an algebraic type constructor...

-- 
				Jim Wise
				jwise at draga.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 192 bytes
Desc: not available
URL: <http://lists.racket-lang.org/users/archive/attachments/20101214/c1606537/attachment.sig>

Posted on the users mailing list.