mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-19 05:39:17 +02:00
New file
This commit is contained in:
parent
41ebbf72b7
commit
505dd45355
2 changed files with 80 additions and 1 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
Features:
|
||||
|
||||
TODO: SRFI 113 - added under srfi/sets. need to fix up tests, rename/relocate to 113, and add to the makefile/build. also need a documentation page and refresh of API.md
|
||||
TODO: SRFI 113 - added under srfi/sets. need to fix up tests, . also need a documentation page and refresh of API.md
|
||||
|
||||
- Allow the reader to recognize `#true` and `#false`.
|
||||
|
||||
|
|
79
docs/api/srfi/113.md
Normal file
79
docs/api/srfi/113.md
Normal file
|
@ -0,0 +1,79 @@
|
|||
# SRFI 113 - Sets and bags
|
||||
|
||||
Sets and bags (also known as multisets) are unordered collections that can contain any Scheme object. Sets enforce the constraint that no two elements can be the same in the sense of the set's associated equality predicate; bags do not.
|
||||
|
||||
See the [SRFI document](http://srfi.schemers.org/srfi-113/srfi-113.html) for more information.
|
||||
|
||||
# Index
|
||||
|
||||
- Constructors:
|
||||
set
|
||||
set-unfold
|
||||
set-contains?
|
||||
bag bag-unfold
|
||||
bag-contains?
|
||||
|
||||
- Predicates:
|
||||
|
||||
set?
|
||||
set-empty?
|
||||
set-disjoint?
|
||||
bag?
|
||||
bag-empty? bag-disjoint?
|
||||
|
||||
- Accessors:
|
||||
|
||||
set-member
|
||||
set-element-comparator
|
||||
bag-member bag-element-comparator
|
||||
|
||||
- Updaters:
|
||||
|
||||
set-adjoin
|
||||
set-adjoin!
|
||||
set-replace set-replace!
|
||||
set-delete set-delete! set-delete-all set-delete-all! set-search!
|
||||
bag-adjoin bag-adjoin! bag-replace bag-replace!
|
||||
bag-delete bag-delete! bag-delete-all bag-delete-all! bag-search!
|
||||
|
||||
- The whole set:
|
||||
set-size set-find set-count set-any? set-every?
|
||||
bag-size bag-find bag-count bag-any? bag-every?
|
||||
|
||||
- Mapping and folding:
|
||||
|
||||
set-map set-for-each set-fold
|
||||
set-filter set-remove set-remove set-partition
|
||||
set-filter! set-remove! set-partition!
|
||||
bag-map bag-for-each bag-fold
|
||||
bag-filter bag-remove bag-partition
|
||||
bag-filter! bag-remove! bag-partition!
|
||||
|
||||
- Copying and conversion:
|
||||
|
||||
set-copy set->list list->set list->set!
|
||||
bag-copy bag->list list->bag list->bag!
|
||||
|
||||
- Subsets:
|
||||
set=? set<? set>? set<=? set>=?
|
||||
bag=? bag<? bag>? bag<=? bag>=?
|
||||
|
||||
- Set theory operations:
|
||||
|
||||
set-union set-intersection set-difference set-xor
|
||||
set-union! set-intersection! set-difference! set-xor!
|
||||
bag-union bag-intersection bag-difference bag-xor
|
||||
bag-union! bag-intersection! bag-difference! bag-xor!
|
||||
|
||||
- Additional bag procedures:
|
||||
|
||||
bag-sum bag-sum! bag-product bag-product!
|
||||
bag-unique-size bag-element-count bag-for-each-unique bag-fold-unique
|
||||
bag-increment! bag-decrement! bag->set set->bag set->bag!
|
||||
bag->alist alist->bag
|
||||
|
||||
- Comparators:
|
||||
|
||||
set-comparator
|
||||
bag-comparator
|
||||
|
Loading…
Add table
Reference in a new issue