def compose(*functions):
 def _composed(*args):
  for fn in functions:
   try:
    args = fn(*args)
   except TypeError:
    args = fn(args)
  return args
 return _composed

def compose ( * functions ) : def _composed ( * args ) : for fn in functions : try : args = fn ( * args ) except TypeError : args = fn ( args ) return args return _composed
parse the first yaml document in a stream and produce the corresponding representation tree .