Haskell/Elm中的语法
在Haskel/Elm中找不到有关此语法的任何信息:Haskell/Elm中的语法,haskell,elm,Haskell,Elm,在Haskel/Elm中找不到有关此语法的任何信息: bar day yOffset = rect [ x <| toString <| (day.xOffset * (barWidth + barMargin)), y <| toString <| if day.amount <= 0 then yOffset else yOffset - day.amount
bar day yOffset =
rect
[
x <| toString <| (day.xOffset * (barWidth + barMargin)),
y <| toString <| if day.amount <= 0 then yOffset
else yOffset - day.amount,
height <| toString <| abs day.amount,
width <| toString barWidth
]
[ Svg.title [] [ text day.day ] ]
min = List.map (\x -> x.words) lastTwoWeeks
|> List.minimum
|> Maybe.withDefault 0
|> (\x -> if x > 0 then 0 else x)
bar-day yOffset=
直肠
[
它不是语法,它只是一个普通的Elm函数。来源:
(b)->a->b
向后函数应用程序f==f x
。
的Haskell等价物是Data.function.&
(在4.8.0.0基础中添加).@Squidly您混淆了操作数或运算符的顺序…我听说这些中缀运算符被亲切地称为左pizza运算符和右pizza运算符。在此之前,在F#中,我看到的典型短语是管道向前和管道向后运算符。