add append, specials

This commit is contained in:
xenia 2023-12-05 01:30:21 -05:00
parent 287dba62b6
commit 2ae1814d0a
1 changed files with 27 additions and 0 deletions

View File

@ -61,4 +61,31 @@ Welcome to Racket v7.5.0.900.
'((x 1) (y 2)) ; that's not a hash map...
```
- `append` semantics
append with an empty list as the first argument just returns the second argument, regardless of what
it is
```scheme
Welcome to Racket v7.5.0.900.
> (append '(1 2) '#(1 2))
'(1 2 . #(1 2))
> (append '() '#(1 2))
'#(1 2)
> (append (list) '#(1 2))
'#(1 2)
```
- specials
why use async channels when u can
```scheme
> (define-values [in out] (make-pipe-with-specials))
> (write-special + out)
#t
> (read-char-or-special in)
#<procedure:+>
```
- **TODO** more