Created
January 4, 2022 00:29
-
-
Save lucasmoreiradev/496f2c675d38bbd03cc66222b12b65be 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
let id = fun x -> x | |
let id x = x | |
let one = id 1 | |
let one_dot_ne = id 1.1 | |
let a = id "a" | |
let unit = id () | |
let hello = fun () -> print_endline "hello" | |
let add a b = a + b | |
let add_one = add 1 | |
let three = add_one 2 | |
let list_one = [1;2] | |
let hd l = | |
match l with | |
| el :: _ -> el | |
| [] -> failwith "hd" | |
let x_x = hd [1;2;3] | |
type status = | |
| Authorized | |
| Unauthorized | |
type user = { id: int; name: string; status: status } | |
let lucas = {id = 0; name = "Lucas"; status = Unauthorized } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment