예제 #1
0
def bootstrap():
    """no dependencies passed as parameters. could have very long list of
    dependencies"""
    r = reader_m.bind( hostname, lambda h:
        reader_m.bind( port,     lambda p:
        reader_m.bind( outfile,  lambda o:
        reader_m.unit( doSomething(h,p,o) ))))
    return r
예제 #2
0
def bootstrap():
    """no dependencies passed as parameters. could have very long list of
    dependencies"""
    r = reader_m.bind( getServletClasses, lambda servlets:
        reader_m.bind( getLogger, lambda Logger:
        reader_m.bind( getSettings,  lambda settings:
        reader_m.unit( [ Servlet(Logger(), settings) for Servlet in servlets] ))))
    return r
예제 #3
0
def bootstrap():
    """no dependencies passed as parameters. could have very long list of
    dependencies"""
    r = reader_m.bind(
        getServletClasses, lambda servlets: reader_m.bind(
            getLogger, lambda Logger: reader_m.bind(
                getSettings, lambda settings: reader_m.unit(
                    [Servlet(Logger(), settings) for Servlet in servlets]))))
    return r