-
-
Save Wilfred/b160baa5a2d14dee04103b1e50e3f985 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type fruit = Apple of int | Pear of int | |
;; | |
(* Returns an int, not a function! *) | |
let foo = | |
let y = 2 in begin | |
function | |
| Apple x -> x + y | |
| Pear x -> x + y | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment