diff options
Diffstat (limited to 'data/functor.scm')
-rw-r--r-- | data/functor.scm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/data/functor.scm b/data/functor.scm index 2286337..4e4722f 100644 --- a/data/functor.scm +++ b/data/functor.scm @@ -1,7 +1,8 @@ (define-module (data functor) #:use-module (oop goops) #:use-module (srfi srfi-1) - #:export (fmap <$>)) + #:use-module (ice-9 curried-definitions) + #:export (fmap <$> cmap)) ;;; We don't overwrite the default map since that creates way to many ;;; namespace problems. @@ -12,3 +13,7 @@ ;;; 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)) |