Thanks. Also I missed was that when a unit is invoked/inferred , one need not provide a another unit which implements import of first unit, only names should be visible to first unit when it is invoked.
On Sun, Jul 10, 2011 at 1:53 PM, Ryan Culpepper <r...@cs.utah.edu> wrote: > On 07/10/2011 01:04 AM, Veer wrote: >>> >>> Just between you and me, I never use internal "define". I came from >>> RnRS, >>> where "define" was only used at top level, and top level is fraught with >>> witchcraft. "let", "let*", "let-values", and "let*-values" are more >>> straightforward, overall, IMHO. >> >> I have no problem at all in using "let" and other. >> I was just looking at the unit in guide , so I thought of defining a set >> of >> configuration as internal define for eg : >> >> (define configuration >> (lambda (conf1 conf2 ...) >> (unit >> (import) >> (export some-sig^) >> (define conf1 conf1) >> (define conf2 conf2) >> .... >> ))) >> >> instead of >> >> (define configuration >> (lambda (s-conf1 s-conf2 ...) >> (unit >> (import) >> (export some-sig^) >> (define conf1 s-conf1) >> (define conf2 s-conf2) >> .... >> ))) > > In that particular case, you can use 'unit-from-context' instead: > > (define configuration > (lambda (conf1 conf2 ...) > (unit-from-context some-sig^))) > > Ryan > _________________________________________________ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users