-
Notifications
You must be signed in to change notification settings - Fork 0
/
flexvectors.sld
50 lines (42 loc) · 1.89 KB
/
flexvectors.sld
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
(define-library (flexvectors)
(export ; Constructors
make-flexvector flexvector
flexvector-unfold flexvector-unfold-right
flexvector-copy flexvector-reverse-copy
flexvector-append flexvector-concatenate flexvector-append-subvectors
; Predicates
flexvector? flexvector-empty? flexvector=?
; Selectors
flexvector-ref flexvector-front flexvector-back flexvector-length
; Mutators
flexvector-add! flexvector-add-front! flexvector-add-back!
flexvector-remove! flexvector-remove-front! flexvector-remove-back!
flexvector-add-all! flexvector-remove-range! flexvector-clear!
flexvector-set! flexvector-swap!
flexvector-fill! flexvector-reverse!
flexvector-copy! flexvector-reverse-copy!
flexvector-append!
; Iteration
flexvector-fold flexvector-fold-right
flexvector-map flexvector-map! flexvector-map/index flexvector-map/index!
flexvector-append-map flexvector-append-map/index
flexvector-filter flexvector-filter! flexvector-filter/index flexvector-filter/index!
flexvector-for-each flexvector-for-each/index
flexvector-count flexvector-cumulate
; Searching
flexvector-index flexvector-index-right
flexvector-skip flexvector-skip-right
flexvector-binary-search
flexvector-any flexvector-every flexvector-partition
; Conversion
flexvector->vector flexvector->list flexvector->string
vector->flexvector list->flexvector string->flexvector
reverse-flexvector->list reverse-list->flexvector
generator->flexvector)
(import (scheme base)
(scheme case-lambda)
(scheme write)
(srfi 1)
(srfi 145))
(include "flexvectors-body1.scm")
(include "flexvectors-body2.scm"))