(self, xs: List[ListEntry])
return result
Merge lists by summing them.
Merge lists by summing them.
Merge lists by summing them .
def _merge_lists(self, xs: List[ListEntry]) -> Union[ast.BinOp, ListEntry]:
        """Merge lists by summing them."""
        if len(xs) == 1:
            return xs[0]

        result = ast.BinOp(left=xs[0], right=xs[1], op=ast.Add())
        for x in xs[2:]:
            result = ast.BinOp(left=result, right=x, op=ast.Add())
        return result
def _merge_lists ( self , xs : List [ ListEntry ] ) -> Union [ ast . BinOp , ListEntry ] : if len ( xs ) == 1 : return xs [ 0 ] result = ast . BinOp ( left = xs [ 0 ] , right = xs [ 1 ] , op = ast . Add ( ) ) for x in xs [ 2 : ] : result = ast . BinOp ( left = result , right = x , op = ast . Add ( ) ) return result