【发布时间】:2021-01-15 01:47:15
【问题描述】:
我对 Haskell 很陌生,我想使用 lambda 表达式定义一个匿名函数列表, 代表四种基本算术运算。
this is what i have done bao = (\ x y -> x+y)
but i want to apply 3 more expressions(\x y ->x-y)
(\x y ->x*y)
(\x y ->x/y)
as well by putting bao before them just like what i have done to operation (+) ,and it shows error : multi declaration of 'bao' ,what can i do ?
Thank you in advance!
【问题讨论】:
标签: haskell lambda arithmetic-expressions