-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,17 @@ | ||
# Introduction | ||
|
||
Everything you need to run Red programs and do exercises in Exercism: | ||
|
||
* Using editor | ||
* Running your code | ||
* Executing tests for exercises | ||
|
||
Red code is built from **blocks** and **values**. Block can contain values and other blocks. In fact, a block is also a value. | ||
|
||
Each value has its **type**. Block's type is `block!`. And type is also a value of type `type!`. There are lots of types in Red, like numbers, dates, tuples, urls, paths, strings, binary data, maps, vectors, emails... about a 50 of them. | ||
|
||
There are also **comments**. They start with `;` and end with end of line. Red has also block comments, but they are a different kind. In fact, they are accomplished with a function called `comment`, which takes any type of argument (can be block, string or anything) and just does absolutely nothing. | ||
|
||
Red is a homoiconic language, so it's code is actually just a data, until we **evaluate** a block. Which simply means, that we "execute" it and get value of last expression. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,10 @@ | ||
# Introduction | ||
|
||
what's "truthy" | ||
|
||
* if | ||
* unless | ||
* either | ||
* case | ||
* default: `true` or word, like `'default` | ||
* switch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
# Introduction | ||
|
||
> Provide a brief introduction to a student who has not yet completed the corresponding concept exercise. | ||
There are various ways to implement a DSL: | ||
|
||
* define functions and run DSL as Red code | ||
* parse DSL as Red blocks of data | ||
* parse DSL strings | ||
|
||
... and any combinations of these methods. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
# Introduction | ||
|
||
Precedence is left to right | ||
|
||
There is a fun part with comparison and math operators |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters