Duck util-list.

This commit is contained in:
Dominik Pantůček 2023-07-05 21:58:34 +02:00
parent 1a2e9ee726
commit 2f1589579e
5 changed files with 34 additions and 21 deletions

View file

@ -256,3 +256,21 @@ When the ```line``` contains whitespace character(s), it returns a
pair consisting of symbol created by interning the string of
non-whitespace characters before the first whitespace character and
the string with the rest of the line.
## util-list [module]
(import util-list)
This module implements basic list functionality which is common in
most scheme implementations.
### filter [procedure]
(filter pred?
lst)
* ```pred?``` - procedure accepting any value and returning #t or #f
* ```lst``` - list to be filtered
Returns a list containing only elements matching given ```pred?```
predicate.

View file

@ -139,21 +139,6 @@ Converts given number to a string with two-digit fractional
part. Should the fractional part be 0, it is replaced with the string
"--".
### List
(import util-list)
This module implements basic list functionality which is common in
most scheme implementations.
(filter pred? lst)
* ```pred?``` - procedure accepting any value and returning #t or #f
* ```lst``` - list to be filtered
Returns a list containing only elements matching given ```pred?```
predicate.
### Mail
(import util-mail)