Hi Felix,

Felix <[email protected]> writes:
> Anyway, that's it.

functorific!

One question: right now it is necessary to define an intermediary module
and then another one to actually instantiate the functor like. in this
example from the documentation:

  (module nums (multiply)
    (import scheme)
    (define (multiply x y) (* x y)))

  (module number-squarer = (squaring-functor nums))


Maybe I didn't understand it all correctly but is there syntax for
folding that into one definition? E.g. something like this:

(module number-squarer ((instantiates: squaring-functor))
  (import scheme)
  (define (multiply x y) (* x y)))

My guess is that the intermediary module would rarely be used on its own
so most of the time it would just clutter the module namespace. But I
may very well be mistaken. Also, `instantiates' is just what first came
to mind ;-)

Thanks for that cool feature, looking forward to playing with it!

Moritz

_______________________________________________
Chicken-hackers mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-hackers

Reply via email to