[obsidian] vault backup: 2023-11-25 01:30:28[

This commit is contained in:
松浦 知也 Matsuura Tomoya 2023-11-25 01:30:28 +09:00
parent fadd5c0ca4
commit 8542666642

View File

@ -10,7 +10,20 @@
まあプリミティブ演算は四則演算だけで再帰関数は自力で定義 まあプリミティブ演算は四則演算だけで再帰関数は自力で定義
```lisp ```lisp
(let fix (lambda (f) ((lambda (x) (f (lambda (y) (x x y) ))) ()) ) ) (let fix
(lambda (f)
(
(lambda (x) (f (lambda(y) (x x y))))
(lambda (x) (f (lambda(y) (x x y))))
)
)
(let fact
(fix (lambda (f) (lambda (n) (if n (* n (f (- n 1))) 1) ) ))
(fact 10)
)
)
%% 一行に直す %%
(let fix (lambda (f) ( (lambda (x) (f (lambda(y) (x x y)))) (lambda (x) (f (lambda(y) (x x y))))))(let fact (fix (lambda (f) (lambda (n) (if n (* n (f (- n 1))) 1) ) ))(fact 10)))
``` ```
```js ```js