src/basilisp/lang/compiler/optimizer.py
def _filter_dead_code(nodes: Iterable[ast.AST]) -> List[ast.AST]:
    """Return a list of body nodes, trimming out unreachable code (any
    statements appearing after `break`, `continue`, and `return` nodes)."""
    new_nodes: List[ast.AST] = []
    for node in nodes:
        if isinstance(node, (ast.Break, ast.Continue, ast.Return)):
            new_nodes.append(node)
            break
        new_nodes.append(node)
    return new_nodes
def _filter_dead_code(nodes: Iterable[ast.AST]) -> List[ast.AST]:
    """Return a list of body nodes, trimming out unreachable code (any
    statements appearing after `break`, `continue`, and `return` nodes)."""
    new_nodes: List[ast.AST] = []
    for node in nodes:
        if isinstance(node, (ast.Break, ast.Continue, ast.Return)):
            new_nodes.append(node)
            break
        new_nodes.append(node)
    return new_nodes
def _filter_dead_code ( nodes : Iterable [ ast . AST ] ) -> List [ ast . AST ] : new_nodes : List [ ast . AST ] = [ ] for node in nodes : if isinstance ( node , ( ast . Break , ast . Continue , ast . Return ) ) : new_nodes . append ( node ) break new_nodes . append ( node ) return new_nodes
Return a list of body nodes, trimming out unreachable code (any
    statements appearing after `break`, `continue`, and `return` nodes).
Return a list of body nodes trimming out unreachable code ( any statements appearing after break continue and return nodes ) .