From d6c7a20b9895653d3ab24a1776781cdfe18ccf4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Mon, 18 Mar 2019 23:18:19 +0100 Subject: Removed monoid class. --- monad/monoid.scm | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 monad/monoid.scm diff --git a/monad/monoid.scm b/monad/monoid.scm deleted file mode 100644 index 4b10a72..0000000 --- a/monad/monoid.scm +++ /dev/null @@ -1,26 +0,0 @@ -;;; ??? -(define-module (monad monoid) - #:use-module (oop goops) - #:use-module (srfi srfi-1) - #:export (null mappend <>)) - -(define-generic null) -(define-generic mappend) - -(define (<> . args) - (fold mappend (null (car args)) (reverse args))) - -;;; Lists - -(define-method (mappend (a ) (b )) - (append a b)) -(define-method (mappend (a ) (b )) a) -(define-method (mappend (a ) (b )) b) -(define-method (mappend (a ) (b )) '()) -(define-method (null (a )) '()) -(define-method (null (a )) '()) - -;;; Strings -(define-method (mappend (a ) (b )) - (string-append a b)) -(define-method (null (a )) "") -- cgit v1.2.3