Lambda Discipline

Examples

Strings

tests/golden/programs/strings.lbd

greeting : String = (concat "Hello, " "World")
(println greeting)
(println (show (stringLength greeting)))
(println (show (split ", " greeting)))
(println (join "-" (chars "abc")))
(println (show (lines "first\nsecond\r\nthird")))
(println (show (add (unwrapOk (parseFloat " 2.5 ")) 1.0)))
(println (show "quoted\tand escaped"))
(println "unicode: \u{3bb}")

Output

Hello, World
12
["Hello", "World"]
a-b-c
["first", "second", "third"]
3.5
"quoted\tand escaped"
unicode: λ

Run it yourself from the repository root: lbd run tests/golden/programs/strings.lbd