/
.let 函数定义一个临时变量,其作用域仅限于自身内部。它接受两个参数:
.let {.multiply {4} {2}}
area:
The area of the rectangle is .area.
If it were a triangle, it would have been .divide {.area} by:{2}.The area of the rectangle is 8.If it were a triangle, it would have been 4.
该函数返回 lambda 的求值结果,因此你可以将它作为表达式来使用。
.center
.let {Quarkdown}
name:
.uppercase {.name}, .lowercase {.name}, .capitalize {.name}QUARKDOWN, quarkdown, Quarkdown
lambda 块也接受隐式的位置参数。更多详情请参阅 Lambda 。
.center
.let {Quarkdown}
.uppercase {.1}, .lowercase {.1}, .capitalize {.1}QUARKDOWN, quarkdown, Quarkdown