2013-10-21 00:41:12 +00:00
|
|
|
**Lamb** is a toy dynamically typed functional programming language
|
|
|
|
|
|
|
|
It's not meant for real-world use but for educational purposes on writing an interpreter with pattern matching in Haskell.
|
|
|
|
|
|
|
|
**Features**
|
|
|
|
|
2013-10-21 00:48:02 +00:00
|
|
|
* No re-assignment (i.e., once you bind a value, you can't re-assign it)
|
|
|
|
* Pattern matching: `f([]) -> "nothing". f([a]) -> one thing".`
|
|
|
|
* Imperative I/O
|
|
|
|
* Higher-order functions
|
2013-10-23 11:08:45 +00:00
|
|
|
* Lexical scope
|
2013-10-21 00:41:12 +00:00
|
|
|
|
2013-10-21 00:45:00 +00:00
|
|
|
|
|
|
|
**Hello World!**
|
2013-10-21 00:41:12 +00:00
|
|
|
|
2013-10-23 11:08:45 +00:00
|
|
|
From `examples/helloworld.lamb`:
|
2013-10-21 00:41:12 +00:00
|
|
|
|
|
|
|
hello() -> "hello, " + hello("world").
|
2013-10-21 01:59:22 +00:00
|
|
|
hello(object) -> object + "!".
|
2013-10-21 00:41:12 +00:00
|
|
|
|
|
|
|
putstrln(hello()).
|
|
|
|
|
2013-10-23 11:08:45 +00:00
|
|
|
See other examples in the `examples` directory.
|
|
|
|
|
2013-10-21 01:59:22 +00:00
|
|
|
**License**
|
2013-10-21 00:41:12 +00:00
|
|
|
|
|
|
|
Licensed under the terms of the zlib license. See `LICENSE` for details.
|