133982cfaf
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.
620 B
620 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 | |||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| const_func | function | go | core | 1.0.0 | pure | func Const[T, U any](value T) func(U) T | Devuelve una funcion que siempre retorna el valor dado, ignorando su argumento. |
|
false | false | functions/core/const_func.go |
Ejemplo
always42 := Const[int, string](42)
result := always42("ignored") // 42
Notas
Funcion pura generica. Implementacion en devfactory/core.