aboutsummaryrefslogtreecommitdiff
path: root/source/lux/data/writer.lux
diff options
context:
space:
mode:
Diffstat (limited to 'source/lux/data/writer.lux')
-rw-r--r--source/lux/data/writer.lux31
1 files changed, 0 insertions, 31 deletions
diff --git a/source/lux/data/writer.lux b/source/lux/data/writer.lux
deleted file mode 100644
index 3bf99c1ad..000000000
--- a/source/lux/data/writer.lux
+++ /dev/null
@@ -1,31 +0,0 @@
-## Copyright (c) Eduardo Julian. All rights reserved.
-## This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
-## If a copy of the MPL was not distributed with this file,
-## You can obtain one at http://mozilla.org/MPL/2.0/.
-
-(;import lux
- (lux/control (monoid #as m #refer #all)
- (functor #as F #refer #all)
- (monad #as M #refer #all)))
-
-## [Types]
-(deftype #export (Writer l a)
- (, l a))
-
-## [Structures]
-(defstruct #export Writer/Functor (All [l]
- (Functor (Writer l)))
- (def (map f fa)
- (let [[log datum] fa]
- [log (f datum)])))
-
-(defstruct #export (Writer/Monad mon) (All [l]
- (-> (Monoid l) (Monad (Writer l))))
- (def _functor Writer/Functor)
-
- (def (wrap x)
- [(:: mon unit) x])
-
- (def (join mma)
- (let [[log1 [log2 a]] mma]
- [(:: mon (++ log1 log2)) a])))