Skip to content

Commit

Permalink
fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
taiansu committed Dec 10, 2024
1 parent 20bfccd commit 23b1156
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions lib/ndim.ex
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,15 @@ defmodule Ndim do
## Examples
```elixir
iex> numbers = [[1, 2], [3, 4], [5, 6]]
iex> Ndim.dmap(numbers, 2, fn i -> i * 10 end)
[[10, 20], [30, 40], [50, 60]]
iex> nested = [[["a", "b"], ["c", "d"]], [["e", "f"], ["g", "h"]], [["i", "j"], ["k", "l"]]]
iex> Ndim.dmap(nested, 3, &String.upcase/1)
[[["A", "B"], ["C", "D"]], [["E", "F"], ["G", "H"]], [["I", "J"], ["K", "L"]]]
```
```elixir
iex> numbers = [[1, 2], [3, 4], [5, 6]]
iex> Ndim.dmap(numbers, 2, fn i -> i * 10 end)
[[10, 20], [30, 40], [50, 60]]
iex> nested = [[["a", "b"], ["c", "d"]], [["e", "f"], ["g", "h"]], [["i", "j"], ["k", "l"]]]
iex> Ndim.dmap(nested, 3, &String.upcase/1)
[[["A", "B"], ["C", "D"]], [["E", "F"], ["G", "H"]], [["I", "J"], ["K", "L"]]]
```
"""
def dmap(list, dim, func) do
dim_accessors = List.duplicate(Access.all(), dim)
Expand Down

0 comments on commit 23b1156

Please sign in to comment.