精益中有前缀符号吗?

Is there a prefix notation in Lean?

在 Haskell 中,我可以使用括号将 + 等中缀运算符转换为前缀函数,因此 (+) 2 32 + 3 相同。精益中是否有类似的功能?

精益 4 中有新的 ·“这是函数输入的占位符”符号,因此您可以做一些很酷的事情,例如

#check (· + 1)
-- fun a => a + 1
#check (2 - ·)
-- fun a => 2 - a
#eval [1, 2, 3, 4, 5].foldl (·*·) 1
-- 120

(这些示例来自 the manual)。在精益 3 中,您可以使用 Haskell 技巧:#eval (+) 2 3 returns 5.