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
'use strict'; | |
describe('Groups Controller', function() { | |
var scope, ctrl, groups, user, guild, $rootScope; | |
beforeEach(function() { | |
module(function($provide) { | |
$provide.value('User', {}); | |
}); |
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
package pivot | |
class Pivot(val rows: List[List[String]]) { | |
val headers = rows.head.zipWithIndex.map(_.swap) | |
val body = rows.tail | |
def addCalcCol(f: List[String] => String)(newColName: String) : Pivot = { | |
val newRows = (headers.map(_._2) :+ newColName) +: | |
body.map(row => { row :+ f(row)}) |