95959f713c
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
663 B
663 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 | ||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| compose | function | py | core | 1.0.0 | pure | def compose(*fns) -> callable | Compone funciones de derecha a izquierda. compose(f, g)(x) == f(g(x)). |
|
false | false | python/functions/core/core.py |
Ejemplo
double_then_str = compose(str, lambda n: n * 2)
result = double_then_str(5)
# "10"
Notas
Funcion pura. Composicion matematica: la ultima funcion se aplica primero. Inverso de pipe.