Function captures

Gleam has a shorthand syntax for creating anonymous functions that take one argument and immediately call another function with that argument: the function capture syntax.

Gleam には、引数を 1 つ取り、その引数を持つ別の関数を即座に呼び出す無名関数を作成するための省略記法、関数キャプチャ構文があります。

The anonymous function fn(a) { some_function(..., a, ...) } can be written as some_function(..., _, ...), with any number of other arguments passed to the inner function. The underscore _ is a placeholder for the final argument.

無名関数 fn(a) { some_function(..., a, ...) } は、some_function(..., _, ...) と書くことができます。アンダースコア _ は最後の引数のプレースホルダーです。