[Proposal] `List.replace_at/3` receiving function?

46 views
Skip to first unread message

thojan...@gmail.com

unread,
Nov 16, 2020, 1:28:23 PM11/16/20
to elixir-lang-core
What do you think about this :

```
List.replace_at(my_list, 1, &(&1 + 1))
```

Instead of 

```  
List.replace_at(my_list, 1, Enum.at(my_list, 1) + 1)
```

José Valim

unread,
Nov 16, 2020, 1:32:18 PM11/16/20
to elixir-l...@googlegroups.com
See List.update_at.
Reply all
Reply to author
Forward
0 new messages