---
name: unique
kind: function
lang: go
domain: core
version: "1.0.0"
purity: pure
signature: "func Unique[T comparable](slice []T) []T"
description: "Devuelve un slice con elementos unicos preservando el orden original."
tags: [slice, functional, generic, dedup, pendiente-usar]
uses_functions: []
uses_types: []
returns: []
returns_optional: false
error_type: ""
imports: []
params:
  - name: slice
    desc: "slice del cual eliminar duplicados"
output: "nuevo slice con elementos únicos preservando orden de primera aparición"
tested: false
tests: []
test_file_path: ""
file_path: "functions/core/unique.go"
---

## Ejemplo

```go
result := Unique([]int{1, 2, 2, 3, 1, 4})
// result = [1, 2, 3, 4]
```

## Notas

Funcion pura generica. Implementacion en devfactory/core.
