Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rizo/ppx_lambda
Simplified lambda syntax extension for OCaml.
https://github.com/rizo/ppx_lambda
Last synced: about 1 month ago
JSON representation
Simplified lambda syntax extension for OCaml.
- Host: GitHub
- URL: https://github.com/rizo/ppx_lambda
- Owner: rizo
- Created: 2014-08-12T10:27:41.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-08-26T19:04:16.000Z (over 10 years ago)
- Last Synced: 2023-03-11T03:57:01.981Z (almost 2 years ago)
- Language: OCaml
- Size: 176 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
ppx_lambda
==========Simplified lambda syntax extension for OCaml.
```ocaml
let obtain_number = () => 42
let inc = x => x + 1
let ignore = (x) => 42
let hello = name => "Hello, " ^ name ^ "!"
let sum = x y => x + ylet test () =
assert (inc 1 = 2);
assert (inc 101 = 102);
assert (inc (-1) = 0);
assert (ignore 987 = 42);
assert (ignore true = 42);
assert (ignore () = 42);
assert (hello "Bob" = "Hello, Bob!");
assert (((x => x + 1) 1) = 2);
assert (sum 2 3 = 5);
assert ((List.map (x => x * x) [1; 2; 3]) = [1; 4; 9]);
```