This file contains hidden or 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
tbl=:3 4 $ 0; 2; 'A'; 'B'; 3; 1; 'B'; 'C'; 1; 1; 'C'; 'A' | |
init=:((~. @: , @: (2&}."1)) ; (0 #~ #)) tbl | |
NB. given a table of team scores, score a game and return new team score | |
score =: 4 : 0 | |
'allteams scores'=. > y | |
diff =. - / (> @: (2&{.)) > x | |
teams=. 2&}. > x | |
allteamIdx=. allteams i. teams |
This file contains hidden or 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
assert.response(server, { | |
url: '/', | |
method: 'GET' | |
}, { | |
status: 200 | |
}, 'X Failed to return .css extension for /index.css'); | |
node.js:134 | |
throw e; // process.nextTick error, or 'error' event on first tick |
This file contains hidden or 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
multiples: (from, to, factors...) -> | |
((for x in factors | |
([from..to].filter (y) -> y % x is 0)).reduce (xs, x) -> | |
xs.concat x).sort (a, b) -> a - b |