[racket] Applicable objects

From: Jay McCarthy (jay.mccarthy at gmail.com)
Date: Tue Dec 14 12:05:36 EST 2010

Something close in Racket... You could define a match-expander whose runtime
use was the class.

Jay

On Tue, Dec 14, 2010 at 9:53 AM, Jim Wise <jwise at draga.com> wrote:

> 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
>
> _________________________________________________
>  For list-related administrative tasks:
>  http://lists.racket-lang.org/listinfo/users
>



-- 
Jay McCarthy <jay at cs.byu.edu>
Assistant Professor / Brigham Young University
http://faculty.cs.byu.edu/~jay

"The glory of God is Intelligence" - D&C 93
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20101214/00ba3379/attachment.html>

Posted on the users mailing list.