add amd module formatter #82

This commit is contained in:
Sebastian McKenzie
2014-10-19 17:05:24 +11:00
parent 209093a3f0
commit fceff4b52f
35 changed files with 391 additions and 25 deletions

View File

@@ -0,0 +1,11 @@
import { isEven } from "./evens";
export function nextOdd(n) {
return isEven(n) ? n + 1 : n + 2;
}
export var isOdd = (function(isEven) {
return function(n) {
return !isEven(n);
};
})(isEven);

View File

@@ -0,0 +1,22 @@
"use strict";
define(["./evens"], function (_evens) {
var exports = {};
exports.nextOdd = nextOdd;
var isEven = _evens.isEven;
function nextOdd(n) {
return (isEven(n) ? n + 1 : n + 2);
}
var isOdd = function(isEven) {
return function(n) {
return !isEven(n);
};
}(isEven);
exports.isOdd = isOdd;
return exports;
});