Files
fn_registry/python/functions/core/partition.md
T
egutierrez 95959f713c feat: funciones Python para core, cybersecurity, datascience y finance
Agrega funciones Python reutilizables organizadas por dominio:
- core: composicion funcional (pipe, compose, map, filter, reduce, etc.)
- cybersecurity: analisis de amenazas y puertos
- datascience: estadisticas y deteccion de outliers
- finance: indicadores tecnicos y analisis financiero
2026-03-29 00:13:50 +01:00

686 B

name, kind, lang, domain, version, purity, signature, description, tags, uses_functions, uses_types, returns, returns_optional, error_type, imports, tested, tests, test_file_path, file_path
name kind lang domain version purity signature description tags uses_functions uses_types returns returns_optional error_type imports tested tests test_file_path file_path
partition function py core 1.0.0 pure def partition(xs: list, pred: callable) -> tuple Divide una lista en dos: (elementos que cumplen el predicado, elementos que no).
list
functional
partition
split
python
false
false
python/functions/core/core.py

Ejemplo

evens, odds = partition([1, 2, 3, 4, 5], lambda n: n % 2 == 0)
# evens = [2, 4], odds = [1, 3, 5]

Notas

Funcion pura. Retorna tupla de dos listas: (matches, non_matches).