The more I learn, the more I realize how much I don't know.


A 8-post collection

Scala Control Abstraction (第七篇)

Reducing code duplication One benefit of higher-order functions is they enable you to create control abstractions that allow you to reduce c ... »

不加糖 at | Scala自学, scala, currying, by-name parameters |

Scala Functions and Closures (第六篇)

Methods import object LongLines { def processFile(filename: String, width: Int) = { val source = Source.fromFile(filen ... »

不加糖 at | Scala自学, scala, closures, tail recursion |

Scala Built-in Control Structures (第五篇)

Scala has only a handful of built-in control structures. The only control struc- tures are if, while, for, try, match, and function calls. O ... »

不加糖 at | Scala自学, scala, match expressions, for expressions, variable scope |

Scala Functional Objects (第四篇)

Constructing a Rational class Rational(n: Int, d: Int) if a class doesn’t have a body, you don’t need to specify empty curly braces The Scal ... »

不加糖 at | Scala自学, scala, immutable objects, implicit conversions, auxiliary constructors |

Scala Basic Types and Operations (第三篇)

Some basic types You can use stripMargin on strings. To use this method, put a pipe character (|) at the front of each line, and then call s ... »

不加糖 at | Scala自学, scala, symbol, string interpolation, operators, bitwise, object equality |