aboutsummaryrefslogtreecommitdiff
path: root/data/functor.scm
diff options
context:
space:
mode:
Diffstat (limited to 'data/functor.scm')
-rw-r--r--data/functor.scm19
1 files changed, 0 insertions, 19 deletions
diff --git a/data/functor.scm b/data/functor.scm
deleted file mode 100644
index 4e4722f..0000000
--- a/data/functor.scm
+++ /dev/null
@@ -1,19 +0,0 @@
-(define-module (data functor)
- #:use-module (oop goops)
- #:use-module (srfi srfi-1)
- #:use-module (ice-9 curried-definitions)
- #:export (fmap <$> cmap))
-
-;;; We don't overwrite the default map since that creates way to many
-;;; namespace problems.
-
-(define-generic fmap)
-(define <$> fmap)
-
-;;; Default fallback for fmap is regular (srfi-1) map.
-(define-method (fmap f . lists)
- (apply map f lists))
-
-;; Curried map
-(define ((cmap f) item)
- (fmap f item))