diff options
author | Eduardo Julian | 2021-09-05 21:03:05 -0400 |
---|---|---|
committer | Eduardo Julian | 2021-09-05 21:03:05 -0400 |
commit | 09e2747bf8c6dcdc1d7318f2490f0de37d77b39f (patch) | |
tree | ccee4dd90b0f5f84d813a8f29b3b9a5dc602068b /documentation/book/the_lux_programming_language/chapter_3.md | |
parent | 0f7bfa0d4a4e5a79fffe72adec1dd35992c7dde3 (diff) |
Added a chapter on cross-platform Lux.
Diffstat (limited to 'documentation/book/the_lux_programming_language/chapter_3.md')
-rw-r--r-- | documentation/book/the_lux_programming_language/chapter_3.md | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/documentation/book/the_lux_programming_language/chapter_3.md b/documentation/book/the_lux_programming_language/chapter_3.md index a8e3c3247..a08fbc618 100644 --- a/documentation/book/the_lux_programming_language/chapter_3.md +++ b/documentation/book/the_lux_programming_language/chapter_3.md @@ -8,14 +8,14 @@ _Where you will learn the what Lux code is made of._ * `Bit`s look like this: -``` +```clojure #0 ## false #1 ## true ``` * `Nat`s look like this: -``` +```clojure 0 123 0456 @@ -24,7 +24,7 @@ _Where you will learn the what Lux code is made of._ * `Int`s look like this: -``` +```clojure +0 -123 +0456 @@ -33,7 +33,7 @@ _Where you will learn the what Lux code is made of._ * `Rev`s look like this: -``` +```clojure .123 .04,56 .7890 @@ -41,7 +41,7 @@ _Where you will learn the what Lux code is made of._ * `Frac`s look like this: -``` +```clojure +123.456 -456.7890 +0.001 @@ -50,32 +50,32 @@ _Where you will learn the what Lux code is made of._ * `Text`s look like this: -``` +```clojure "This is a single-line text" ``` * `Unit` looks like this: -``` +```clojure [] ``` * Variants look like this: -``` +```clojure #Foo (#Bar 10 +20.0 "thirty") ``` * Tuples look like this: -``` +```clojure [123 ["nested" #tuple] true] ``` * Records look like this: -``` +```clojure {#name "Lux" #paradigm #Functional #platforms (list #JVM)} ``` @@ -161,7 +161,7 @@ There is also a separate macro for type-coerciones that's called `:as`, which is Now that we know about type annotations, I'll show you some types by giving you some valid Lux expressions: -``` +```clojure (: Bit #1) (: Bit .true) (: Nat 123) |