plum
git clone https://git.pyrossh.dev/plum
A statically typed, imperative programming language inspired by rust, python
plum-examples/strings.plum
| 73b5e55 | 1 | import std/Bool |
| ca5fd6f | 2 | import std/Number |
| 29313cb | 3 | import std/Str |
| 73b5e55 | 4 | |
| 0fe3528 | 5 | fun greet(name: Str) -> Str = |
| 0e1801a | 6 | "Hello, {name}!" |
| 0e1801a | 7 | |
| 0fe3528 | 8 | fun report(count: Int, total: Int) -> Str = |
| 0e1801a | 9 | "{count} of {total} complete" |
| 0e1801a | 10 | |
| 0fe3528 | 11 | fun empty() -> Str = |
| 0e1801a | 12 | "" |
| 0e1801a | 13 | |
| 0fe3528 | 14 | fun escaped() -> Str = |
| 0e1801a | 15 | "line one\nline two\ttabbed \"quoted\"" |