【发布时间】:2020-07-28 03:18:51
【问题描述】:
我有这个功能
result =
add 1 2 |> \a -> a % 2 == 0)
我收到了这个错误
Elm does not use (%) as the remainder operator
当我查看文档时,我发现我可以使用 modBy,所以我尝试了这个。
result =
add 1 2 |> (\a -> a modBy 2 == 0)
但这给了我以下错误。
This function cannot handle the argument sent through the (|>) pipe:
【问题讨论】:
-
@KenWhite 从您的文章中我找到了 rem 但是当我尝试..."-> a rem 2 == 0" 我收到以下错误。我找不到
rem变量:
标签: elm