3: error: Cannot infer value of type parameter "MidT" of "chain"  [misc]
5: error: Cannot infer value of type parameter "InT" of "add"  [misc]