This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; | |
//Project Euler Problem #98 - Anagramic Squares | |
(function (exports) { | |
exports.parseWords = function() { | |
var fs = require ('fs'); | |
var arr = fs.readFileSync('euler_files/words.txt').toString().split(',').map(function(s){ | |
return s.replace(/"/g, ""); | |
});//.split(","); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; | |
//Project Euler Problem #98 - Anagramic Squares | |
(function (exports) { | |
exports.parseWords = function() { | |
var fs = require ('fs'); | |
var arr = fs.readFileSync('euler_files/words.txt').toString().split(',').map(function(s){ | |
return s.replace(/"/g, ""); | |
});//.split(","); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; | |
; | |
//Project Euler Problem #107 - Minimal Network | |
(function (exports) { | |
Array.prototype.map = function (f) { | |
if (this.length === 0) { | |
return []; | |
} else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curryIt : function(fn) { | |
var args = []; | |
return function (a) { | |
args.push(a); | |
return args.length === fn.length ? fn.apply(null, args) : arguments.callee; | |
}; | |
} |
NewerOlder