예제 #1
0
파일: combin.py 프로젝트: fredokun/pypretty
def hang(nb, doc):
    return align(nest(nb, doc))
예제 #2
0
파일: combin.py 프로젝트: fredokun/pypretty
def align(doc):
    return column(lambda k: nesting(lambda i: nest(k - i, doc)))
예제 #3
0
파일: combin.py 프로젝트: fredokun/pypretty
 def f(n):
     if n > nb_spaces:
         return nest(nb_spaces, lbreak())
     else:
         return spaces(nb_spaces - n)