scala currying/partials to build function filter list
问题 Given the following code: case class Config( addThree: Boolean = true, halve: Boolean = true, timesFive: Boolean = true ) def doOps(num: Integer, config: Config): Integer = { var result: Integer = num if ( config.addThree ) { result += 3 } if ( config.halve ) { result /= 2 } if ( config.timesFive ) { result *= 5 } result } val config = Config(true,false,true) println( doOps(20, config) ) println( doOps(10, config) ) I'd like to replace the ugly doOps method with a more efficient and idiomatic