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 <jw...@draga.com> wrote: > David Van Horn <dvanh...@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 > jw...@draga.com > > _________________________________________________ > For list-related administrative tasks: > http://lists.racket-lang.org/listinfo/users > -- Jay McCarthy <j...@cs.byu.edu> Assistant Professor / Brigham Young University http://faculty.cs.byu.edu/~jay "The glory of God is Intelligence" - D&C 93
_________________________________________________ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users