verve-lang
verve-lang copied to clipboard
A functional language for the working hacker
``` let x = [1, ...[2, 3]] ```
```rust enum Nat { Z S(Nat) } fn even(x: Nat) -> Bool { match x { case Z: True case S(y): odd(y) } } fn odd(x: Nat) -> Bool {...
Attempting to generalize the maybe type in the tests, I found two issues: ``` verve type maybe { Just(type) None() } implementation printable { fn to_string(a) { match a {...
So far, the best I could come up with was the following ``` cpp // Printable t, List t interface PrintableList { virtual printList(List): Void virtual printNumericList(List): Void } ```