Last modified: 2013-10-09 20:48:28 tkych
Version: 0.1.01
cl-intset is a library for non-negative integer sets. It implements sets using bitsets.
- NIL
- SHELL$
git clone https://github.com/tkych/cl-intset
- CL-REPL>
(push #p"/path-to-cl-intset/cl-intset/" asdf:*central-registry*)
- CL-REPL>
(ql:quickload :cl-intset)
or(asdf:load-system :cl-intset)
intset
and iset
are nicknames of cl-intset
package.
CL-REPL> (defvar iset1 (iset:make-intset))
ISET1
CL-REPL> (iset:intset->list iset1)
NIL
CL-REPL> (iset:insert 42 iset1)
#<CL-INTSET:INTSET {1007AC3EB3}>
CL-REPL> (iset:intset->list iset1)
(42)
CL-REPL> (dotimes (_ 10) (iset:insert 42 iset1))
NIL
CL-REPL> (iset:intset->list iset1)
(42)
CL-REPL> (defvar iset2 (iset:list->intset '(43 41 42 43 41 42)))
ISET2
CL-REPL> (iset:intset->list iset2)
(41 42 43)
CL-REPL> (iset:map 'iset:intset #'1+ iset2)
#<CL-INTSET:INTSET {1008049063}>
CL-REPL> (iset:map 'list #'1+ iset2)
(42 43 44)
-
Takaya OCHIAI <#.(reverse "moc.liamg@lper.hcykt")>
-
MIT License
-
Copyright (C) 2013 Takaya OCHIAI