[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 43d2ca0 090/271: Remove unused monad.
From: |
Jackson Ray Hamilton |
Subject: |
[elpa] master 43d2ca0 090/271: Remove unused monad. |
Date: |
Thu, 05 Feb 2015 18:29:59 +0000 |
branch: master
commit 43d2ca06020807fbb831f9980b8f4c31cd6db58d
Author: Jackson Ray Hamilton <address@hidden>
Commit: Jackson Ray Hamilton <address@hidden>
Remove unused monad.
---
test/fixtures/monad.js | 47 -----------------------------------------------
1 files changed, 0 insertions(+), 47 deletions(-)
diff --git a/test/fixtures/monad.js b/test/fixtures/monad.js
deleted file mode 100644
index cd625db..0000000
--- a/test/fixtures/monad.js
+++ /dev/null
@@ -1,47 +0,0 @@
-// The MONAD function is a macroid that produces monad constructor functions.
-// It can take an optional modifier function, which is a function that is
-// allowed to modify new monads at the end of the construction processes.
-
-// A monad constructor (sometimes called 'unit' or 'return' in some
mythologies)
-// comes with three methods, lift, lift_value, and method, all of which can add
-// methods and properties to the monad's prototype.
-
-// A monad has a 'bind' method that takes a function that receives a value and
-// is usually expected to return a monad.
-
-function MONAD(modifier) {
- 'use strict';
- var prototype = Object.create(null);
- prototype.is_monad = true;
- function unit(value) {
- var monad = Object.create(prototype);
- monad.bind = function (func, args) {
- return func.apply(
- undefined,
- [value].concat(Array.prototype.slice.apply(args || []))
- );
- };
- if (typeof modifier === 'function') {
- value = modifier(monad, value);
- }
- return monad;
- }
- unit.method = function (name, func) {
- prototype[name] = func;
- return unit;
- };
- unit.lift_value = function (name, func) {
- prototype[name] = function () {
- return this.bind(func, arguments);
- };
- return unit;
- };
- unit.lift = function (name, func) {
- prototype[name] = function () {
- var result = this.bind(func, arguments);
- return result && result.is_monad === true ? result : unit(result);
- };
- return unit;
- };
- return unit;
-}
- [elpa] master f9eb4a1 080/271: Revert "Use alist of faces.", (continued)
- [elpa] master f9eb4a1 080/271: Revert "Use alist of faces.", Jackson Ray Hamilton, 2015/02/05
- [elpa] master ea3fd79 071/271: Make implicit global variables bold., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 1039a74 073/271: Update microoptimized version., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 18e35dd 069/271: Shift token properties., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 49f5e3e 079/271: Use alist of faces., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 8615688 089/271: Create tests., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 10d7726 077/271: Use custom JSON parser., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 099f434 082/271: Add optimizations for byte-compilation., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 0bfdbcd 085/271: Remove naive timers., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 4874e1e 086/271: Improve documentation and Makefile., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 43d2ca0 090/271: Remove unused monad.,
Jackson Ray Hamilton <=
- [elpa] master 820becb 084/271: Fix test., Jackson Ray Hamilton, 2015/02/05
- [elpa] master fb57258 088/271: Reorder readme., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 426a7cd 083/271: Fix regression where existent definitions were missed., Jackson Ray Hamilton, 2015/02/05
- [elpa] master f8120d4 092/271: Update scenarios. Update readme., Jackson Ray Hamilton, 2015/02/05
- [elpa] master f50880d 091/271: Update header., Jackson Ray Hamilton, 2015/02/05
- [elpa] master a0139c3 087/271: Cleanup Makefile., Jackson Ray Hamilton, 2015/02/05
- [elpa] master f3e4d7b 094/271: Improve benchmarks., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 9ad5fb2 097/271: Update benchmark times., Jackson Ray Hamilton, 2015/02/05
- [elpa] master ab13a16 093/271: Add back optional timer. Improve docs., Jackson Ray Hamilton, 2015/02/05
- [elpa] master a321d8b 096/271: Update screenshot., Jackson Ray Hamilton, 2015/02/05