From 6c7ab94299b0996d2dbba5305f4e4f81d2405738 Mon Sep 17 00:00:00 2001 From: Masaya Tojo Date: Thu, 13 Jun 2024 23:51:03 +0900 Subject: Rename procedures `map` to `map1` and `map*` to `map` --- algebraic-structures.applicative.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'algebraic-structures.applicative.scm') diff --git a/algebraic-structures.applicative.scm b/algebraic-structures.applicative.scm index ac3028a..489f76d 100644 --- a/algebraic-structures.applicative.scm +++ b/algebraic-structures.applicative.scm @@ -1,5 +1,5 @@ -(functor ((algebraic-structures applicative) (A (pure map map2))) - (pure map map2 map* apply) +(functor ((algebraic-structures applicative) (A (pure map1 map2))) + (pure map1 map2 map apply) (import (rename scheme (map scheme:map) (apply scheme:apply)) (only (chicken base) sub1 add1 foldl case-lambda) A @@ -16,9 +16,9 @@ (lambda (args) (k (cons x args)))))))) - (define map* + (define map (case-lambda - ((f x) (map f x)) + ((f x) (map1 f x)) ((f x y) (map2 f x y)) ((f x . xs) (let ((g (curry-n f (add1 (length xs))))) -- cgit v1.2.3