Skip to content

Instantly share code, notes, and snippets.

@kisom
Created May 28, 2011 02:00
Show Gist options
  • Save kisom/996511 to your computer and use it in GitHub Desktop.
Save kisom/996511 to your computer and use it in GitHub Desktop.
exercise 3.3 for saolsen
(* corrections for saolsen *)
(* Exercise 3.3 *)
let rec sum n m f =
if n = m then
f m
else
f n + sum ((n + 1) m f);;
let g x = x * x;;
sum 2 4 g;;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment