From: Christopher C. <cc...@ma...> - 2002-06-26 12:49:48
|
Florent Hivert <flo...@un...> writes: > 1) Mark the procedure list as a wrapper so that it does not change the > level of procedure nesting for testargs. Hence when dom::generator testargs uses the very same nesting depth counter as just about anything else. I would prefer not to mess around with that. > 2) An other solution which i implemented is to copy the type of > dom::generator in list : > > copyTypeCheckDomGenerator := > // Returns the proc pr with the same inputs type checking than > // dom::generators > (pr) -> subsop(pr, 7=op(dom::generator, 7)); > > count := dom::copyTypeCheckDomGenerator(dom::count_FromGenerator); > list := dom::copyTypeCheckDomGenerator(dom::list_FromGenerator); > > This solutions is very simple, passes all the tests, but it relies > strongly on the structure of a procedure. While this works (and is likely to continue to work in the future), I do not like it on aesthetic grounds. What is the problem with simply saying count := dom::count_FromGenerator list := combinat::generators::toList@dom::generator -- +--+ +--+| |+-|+ Christopher Creutzig (cc...@mu...) +--+ Tel.: 05251-60-5525 |