Use sugar
The use expression is syntactic sugar for a regular function call
and an anonymous function.
use 式は、通常の関数呼び出しと無名関数のための糖衣構文です。
This code:
コード:
use a, b <- my_function next(a) next(b)
Expands into this code:
コードを展開したもの:
my_function(fn(a, b) {
next(a)
next(b)
})
To ensure that your use code works and is as understandable as
possible, the right-hand-side ideally should be a function call rather than a
pipeline or other expression, which is typically more difficult to read.
use コードを動作させてできるだけ理解しやすくなるように、右項はパイプラインや他の式ではなく、関数呼び出しにするのが理想的です。
use is an expression like everything else in Gleam, so it can be
placed within blocks.
use は、Gleam の他の式と同じように、ブロック内に置くことができます。