code: def visit_ListComp(self, node):
          
          try:
              generator, = node.generators
          except ValueError:
              raise NotImplementedError(
                  'Only single loop comprehensions are allowed'
              )
  
          names = find_names(generator.target)
          argslist = [ast.arg(arg=name.id, annotation=None) for name in names]
          if len(names) <= 1:
              signature = ast.arguments(
                  args=argslist,
                  vararg=None,
                  kwonlyargs=[],
                  kw_defaults=[],
                  kwarg=None,
                  defaults=[],
              )
          else:
              signature = ast.List(elts=argslist, ctx=ast.Load())
  
          array = generator.iter
          lam_sig = functools.partial(ast.Lambda, args=signature)
  
          filters = generator.ifs
          if filters:
              filt = ast.BoolOp(op=ast.And(), values=filters)
              # array.filter
              method = ast.Attribute(value=array, attr='filter', ctx=ast.Load())
              # array.filter(func)
              array = ast.Call(
                  func=method, args=[lam_sig(body=filt)], keywords=[]
              )
  
          method = ast.Attribute(value=array, attr='map', ctx=ast.Load())
          mapped = ast.Call(
              func=method, args=[lam_sig(body=node.elt)], keywords=[]
          )
          result = self.visit(mapped)
          return result
docs: Generate a curried lambda function
  
          [x + y for x, y in [[1, 4], [2, 5], [3, 6]]]
  
          becomes
  
          [[1, 4], [2, 5], [3, 6]]].map(([x, y]) => x + y)