我想實現階乘的尾遞歸版本: let{factorial 0 n = n; factorial x n = factorial (x-1, n * x)}
我得到這個: <interactive>:1:41:
Occurs check: cannot construct the infinite type: t1 = t1 -> t1
In the return type of a call
我是一個新手在lisp, 我嘗試編程lisp程序,計算二項式係數迭代(階乘),但不遞歸。 從來就嘗試寄託都,全局函數,局部函數(階乘)), 但我PROGRAMM doesn't的工作,例如,當我的命令:(binom(7 4)),只是得到了一個錯誤 SELECT ALL
(defun binom-coef(a b)
(if (or (< a b) (< b 0))
我做了一個WindowForm應用程序,用於計算數字的階乘。一切都很好,但現在我必須用事件來做。事件的概念對我來說是新的,我一直在努力讓它在過去的3天裏工作無濟於事。 所以我有形式 public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}