From 6439277a2a95887864151b06d5935d118acfdad9 Mon Sep 17 00:00:00 2001 From: j0urneyK Date: Thu, 25 Jan 2024 22:04:42 +0900 Subject: [PATCH] Update capture operator example in Elixir documentation --- modules/ROOT/pages/elixir/operators/capture-operator.adoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/ROOT/pages/elixir/operators/capture-operator.adoc b/modules/ROOT/pages/elixir/operators/capture-operator.adoc index 4ecf260..e39587b 100644 --- a/modules/ROOT/pages/elixir/operators/capture-operator.adoc +++ b/modules/ROOT/pages/elixir/operators/capture-operator.adoc @@ -32,11 +32,11 @@ You can also use the Capture operator to reference named functions from modules. [source,elixir] ---- -iex> len = &List.length/1 -&List.length/1 +iex> len = &length/1 +&:erlang.length/1 iex> len.([1, 2, 3, 4, 5]) 5 ---- -In the example above, `&List.length/1` captures the `length` function from the `List` module, which takes one argument (`/1`). This function is then assigned to the variable `len`. +In the example above, `&length/1` captures the `length` function from the which takes one argument (`/1`). This function is then assigned to the variable `len`.