Beispiel #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
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
Beispiel #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