[plt-scheme] Composing mixins
On Fri, May 22, 2009 at 11:07 AM, Dave Gurnell <d.j.gurnell at gmail.com> wrote:
> Hi all,
>
> Is there anything special about a mixin that distinguishes it from a regular
> procedure, apart from the fact that it operates on classes? In other words,
> if I compose two mixins like this:
>
> (define b<%> (interface ()))
> (define c<%> (interface ()))
>
> (define mixin-ab (mixin () (b<%>) (super-new)))
> (define mixin-bc (mixin (b<%>) (c<%>) (super-new)))
>
> (define mixin-ac (compose mixin-bc mixin-ab))
>
> is mixin-ac actually a mixin?
>
> Cheers,
>
> -- Dave
Yup, that's a mixin. Go for it.
--
Carl Eastlund