add append, specials
This commit is contained in:
parent
287dba62b6
commit
2ae1814d0a
27
README.md
27
README.md
|
@ -61,4 +61,31 @@ Welcome to Racket v7.5.0.900.
|
||||||
'((x 1) (y 2)) ; that's not a hash map...
|
'((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
|
- **TODO** more
|
||||||
|
|
Loading…
Reference in New Issue