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:
@@ -0,0 +1,32 @@
|
||||
---
|
||||
name: all_slice
|
||||
kind: function
|
||||
lang: go
|
||||
domain: core
|
||||
version: "1.0.0"
|
||||
purity: pure
|
||||
signature: "func All[T any](slice []T, predicate func(T) bool) bool"
|
||||
description: "Devuelve true si todos los elementos del slice cumplen el predicado."
|
||||
tags: [slice, functional, generic, predicate]
|
||||
uses_functions: []
|
||||
uses_types: []
|
||||
returns: []
|
||||
returns_optional: false
|
||||
error_type: ""
|
||||
imports: []
|
||||
tested: false
|
||||
tests: []
|
||||
test_file_path: ""
|
||||
file_path: "functions/core/all_slice.go"
|
||||
---
|
||||
|
||||
## Ejemplo
|
||||
|
||||
```go
|
||||
result := All([]int{2, 4, 6}, func(x int) bool { return x%2 == 0 })
|
||||
// result = true
|
||||
```
|
||||
|
||||
## Notas
|
||||
|
||||
Funcion pura generica. Implementacion en devfactory/core.
|
||||
Reference in New Issue
Block a user