code: def build_lst(a, b):
      
      if type(a) is list:
          return a + [b]
      elif a:
          return [a, b]
      else:
          return b
docs: function to be folded over a list (with initial value `None`)
          produces one of:
  
          1. `None`
          2. A single value
          3. A list of all values