def _collection_literal_to_py_ast ( ctx : GeneratorContext , form : Iterable [ LispForm ] ) -> Iterable [ GeneratedPyAST ] : yield from map ( partial ( _const_val_to_py_ast , ctx ) , form )
scala fold equivalent in python
Turn a quoted collection literal of Lisp forms into Python AST nodes .
def _collection_literal_to_py_ast(
    ctx: GeneratorContext, form: Iterable[LispForm]
) -> Iterable[GeneratedPyAST]:
    """Turn a quoted collection literal of Lisp forms into Python AST nodes.

    This function can only handle constant values. It does not call back into
    the generic AST generators, so only constant values will be generated down
    this path."""
    yield from map(partial(_const_val_to_py_ast, ctx), form)