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
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
---
|
||||
name: compose
|
||||
kind: function
|
||||
lang: py
|
||||
domain: core
|
||||
version: "1.0.0"
|
||||
purity: pure
|
||||
signature: "def compose(*fns) -> callable"
|
||||
description: "Compone funciones de derecha a izquierda. compose(f, g)(x) == f(g(x))."
|
||||
tags: [functional, compose, composition, python]
|
||||
uses_functions: []
|
||||
uses_types: []
|
||||
returns: []
|
||||
returns_optional: false
|
||||
error_type: ""
|
||||
imports: []
|
||||
tested: false
|
||||
tests: []
|
||||
test_file_path: ""
|
||||
file_path: "python/functions/core/core.py"
|
||||
---
|
||||
|
||||
## Ejemplo
|
||||
|
||||
```python
|
||||
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.
|
||||
Reference in New Issue
Block a user