【发布时间】:2013-11-11 08:58:20
【问题描述】:
我需要在 ML 中编写一个函数复合,其行为如下:
Compound 接受 bin op f、int n 和值 x,并将运算符应用于 x N 次。这是一个例子:
compound f 0 x = x
compound f 1 x = x f x
我是 ML 的新手,所以我很难理解如何编写这个函数。我将非常感谢任何帮助!
【问题讨论】:
标签: ml infix-notation
我需要在 ML 中编写一个函数复合,其行为如下:
Compound 接受 bin op f、int n 和值 x,并将运算符应用于 x N 次。这是一个例子:
compound f 0 x = x
compound f 1 x = x f x
我是 ML 的新手,所以我很难理解如何编写这个函数。我将非常感谢任何帮助!
【问题讨论】:
标签: ml infix-notation