---
name: map_list
kind: function
lang: py
domain: core
version: "1.0.0"
purity: pure
signature: "def map_list(xs: list, fn: callable) -> list"
description: "Aplica una funcion a cada elemento de una lista, retornando una nueva lista."
tags: [list, functional, map, python]
uses_functions: []
uses_types: []
returns: []
returns_optional: false
error_type: ""
imports: []
params:
  - name: xs
    desc: "Lista de elementos a transformar"
  - name: fn
    desc: "Función a aplicar a cada elemento"
output: "Nueva lista con el resultado de aplicar fn a cada elemento"
tested: false
tests: []
test_file_path: ""
file_path: "python/functions/core/core.py"
---

## Ejemplo

```python
doubled = map_list([1, 2, 3], lambda n: n * 2)
# [2, 4, 6]
```

## Notas

Funcion pura. No muta la lista original. Equivalente a `[fn(x) for x in xs]`.
