Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
let (++) f g x = f (g x) in let f x = x + 1 in let g x = x * 2 in (f++g) 1;;
f++g x = 2 * x + 1
次の理由から、関数合成の実装は正しいです。
(g∘f)(x)= g(f(x))Xのすべてのx
ウィキペディアによると
私は得る:
- : int = 3
ocamlktopで