eaed99e52c
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
613 B
613 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 | |||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| chunk | function | py | core | 1.0.0 | pure | def chunk(xs: list, size: int) -> list | Divide una lista en sublistas de tamanio fijo. El ultimo chunk puede ser menor. |
|
false | false | python/functions/core/core.py |
Ejemplo
result = chunk([1, 2, 3, 4, 5], 2)
# [[1, 2], [3, 4], [5]]
Notas
Funcion pura. Si size <= 0 retorna lista vacia.