9In the following exercises, let `l` be `` `(list @t)`['u' 'r' 'b'
121. A list is a null-terminated tuple of values. For example,
13 `[1 2 3 ~]` is a list of three integers, and
14 `['a' 'b' 'c' ~]` is a list of three cords. Try casting
15 `['a' 'b' 'c' ~]` to `(list @t)` and to `(list @)`. Lists
16 are parameterized with the type of the values.
181. `++flop` takes a list and produces its reverse. Use it to
211. Repeat the above exercise without using `++flop`.
231. `++sort` takes a list and a comparison function to sort a
24 list. The function must take two elements of the list and
25 produce true if the first element is "less than" the other.
26 Sort `l` alphabetically. Sort it reverse alphabetically.
281. `++turn` takes a list and a function and applies the function
29 to each element in the list, forming a new list of the
30 results. This is called "map" in many functional languages.
31 The function must accept an element of the list. Use the
32 fact that subtracting 32 from a lowercase letter gives the
33 equivalent uppercase letter (i.e. `(sub 'a' 'A')` is 32) to
34 change every character in `l` to uppercase.
361. `++welp` concatentates two lists. Concatenate `l` with the
391. `++snag` takes a number `n` and a list and produces the
40 element at index `n`. Pull out the `'i'` in `l`.
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list