Functional Weave
Code in Rust

todo.list@1.1.0

impl/python/clear_completed.py

235 bytes · the Python implementation · view raw

Imports name this capability’s declared dependencies, which fune builds next to it in your project; each one links to its page.

from typing import List, Sequence

from .todo_item import Todo  ← from todo.item ^1.0.0 · built alongside by fune


def clear_completed(todos: Sequence[Todo]) -> List[Todo]:
    """Every done todo removed, the rest untouched and in order."""
    return [t for t in todos if not t.done]