feat: 21 funciones core — composicion funcional y operaciones de slice

Composicion: Pipe2, Pipe3, Compose2, Identity, Curry2, Uncurry2, Partial2,
Flip, Const. Slices: Find, FindIndex, Any, All, GroupBy, Flatten,
FlatMapSlice, Unique, Zip, Reduce, Take, Drop.
Stubs que documentan devfactory/core para el registry.
This commit is contained in:
2026-03-28 03:58:17 +01:00
parent 62dcadceb8
commit 133982cfaf
42 changed files with 877 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
---
name: group_by
kind: function
lang: go
domain: core
version: "1.0.0"
purity: pure
signature: "func GroupBy[T any, K comparable](slice []T, keyFn func(T) K) map[K][]T"
description: "Agrupa elementos de un slice por clave generada con una funcion."
tags: [slice, functional, generic, grouping]
uses_functions: []
uses_types: []
returns: []
returns_optional: false
error_type: ""
imports: []
tested: false
tests: []
test_file_path: ""
file_path: "functions/core/group_by.go"
---
## Ejemplo
```go
groups := GroupBy([]string{"go", "git", "python"}, func(s string) byte { return s[0] })
// groups = map[byte][]string{'g': {"go", "git"}, 'p': {"python"}}
```
## Notas
Funcion pura generica. Implementacion en devfactory/core.