aboutsummaryrefslogtreecommitdiff
path: root/algebraic-structs.foldable.vector.base.scm
diff options
context:
space:
mode:
authorMasaya Tojo <masaya@tojo.tokyo>2024-06-11 02:10:37 +0900
committerMasaya Tojo <masaya@tojo.tokyo>2024-06-11 02:10:37 +0900
commit552cd6c999f3e44b13be88e45c4a8cb391eb40cf (patch)
tree15d9cea824cd5627a7c98ba866fb38a1d69457a6 /algebraic-structs.foldable.vector.base.scm
parent53ccad935b368dbccadd6d64bedb9341f34415c3 (diff)
Rename filename from `algebraic-structs` to `algebraic-structures`
Diffstat (limited to 'algebraic-structs.foldable.vector.base.scm')
-rw-r--r--algebraic-structs.foldable.vector.base.scm21
1 files changed, 0 insertions, 21 deletions
diff --git a/algebraic-structs.foldable.vector.base.scm b/algebraic-structs.foldable.vector.base.scm
deleted file mode 100644
index 0c5af89..0000000
--- a/algebraic-structs.foldable.vector.base.scm
+++ /dev/null
@@ -1,21 +0,0 @@
-(module (algebraic-structs foldable vector base) (foldl foldr)
- (import scheme
- (only (chicken base) add1 sub1))
-
- (define (foldl f z v)
- (let ((len (vector-length v)))
- (let loop ((i 0)
- (acc z))
- (if (= i len)
- acc
- (loop (add1 i)
- (f acc (vector-ref v i)))))))
-
- (define (foldr f z v)
- (let ((len (vector-length v)))
- (let loop ((i (sub1 len))
- (acc z))
- (if (< i 0)
- acc
- (loop (sub1 i)
- (f (vector-ref v i) acc)))))))