This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
software:racket:functions [2018/09/22 18:15] dave |
software:racket:functions [2018/09/22 18:23] (current) dave [list] |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Racket Notes == | ====== Racket Notes == | ||
| + | |||
| + | The [[https://docs.racket-lang.org/reference/|Racket Reference]] has more details than this here page. I took these notes regarding Racket as a memory aid to help me get started with Racket. | ||
| Racket identifiers can contain any characters except for whitespace and the following special characters: '''( ) [ ] { } " , ' ` ; # | \'''. A special case is ''#'' which is allowed at the beginning of a symbol. | Racket identifiers can contain any characters except for whitespace and the following special characters: '''( ) [ ] { } " , ' ` ; # | \'''. A special case is ''#'' which is allowed at the beginning of a symbol. | ||
| + | |||
| ===== Data Structures == | ===== Data Structures == | ||
| Line 9: | Line 12: | ||
| In Racket, ''null'' is an empty list, which is a singleton. | In Racket, ''null'' is an empty list, which is a singleton. | ||
| + | |||
| + | ===== Common Constants == | ||
| + | |||
| + | ==== #t == | ||
| + | |||
| + | The boolean true value. | ||
| + | |||
| + | ==== #f == | ||
| + | |||
| + | The boolean false value. | ||
| + | |||
| + | ==== null == | ||
| + | |||
| + | The empty list. | ||
| ===== Racket Functions == | ===== Racket Functions == | ||
| Line 62: | Line 79: | ||
| (number->string <number>) | (number->string <number>) | ||
| </code> | </code> | ||
| + | |||
| + | ==== list == | ||
| + | |||
| + | Constructs a linked list from the specified arguments. | ||
| + | |||
| + | <code> | ||
| + | (list <arg1> <argN>...) | ||
| + | </code> | ||
| + | |||
| + | Note that the value returned is a pair containing the value of the first argument and pointer to the next pair in the list. | ||