Style Collections & Pattern Matching Organization Concepts & Principles

100

What is a return statement?
Action of producing a resulting value that does not need to be explicitly written in Scala

100

What is Option?
A container that may or may not hold something.

100

Who is Stefan Tobler?
The name of Okanagan Spring's brewmaster.

100

What is expression-oriented programming?
Every construction is an expression and thus yields a value

200

What is mutation?
A change in state of local variables that often has side-effecting operations, and is highly undesirable in the state of an object.

200

What is Map?
A collection that contains a lookup data structure.

200

What is scala.AnyRef?
The base type of all reference types and alias of java.lang.Object.

200

What is lazy evaluation?
Strategy that delays evaluation of an expression until its value is needed and avoids repeated evaluations.

300

What is the meaning of "mild" beer?
Any beer that is fresh and unaged.

300

What is _* ?
Syntax used to pattern match a "wildcard" segment of a List. (May accept two answers...depending on use...)

300

What is a package?
When imported, all members of this are automatically available in scope.

300

What is "low gravity" beer?
Beer with a predominantly malty palate.

400

What is WWI?
During this war stronger beer was exempt from these rules, and brewers produced less Milds in pursuit of higher profits.

400

What is decomposition?
Conceptually, pattern matching employs this to break down data structures into parts that are easier to conceive.

400

What is a companion object?
Has the same name as a class or trait that has exclusive access rights to private methods or fields.

400

What are higher-order functions?
Functions that take other functions as parameters, or may return a function.

500

What are local value bindings?
Helpful to prevent long lines of code, this is used locally to simplify complex expressions. On a local level, helps with binding.

500

What is val re = """^path/to/(\d+)$""".r ?
Problem solving! Define re in the following: "path/to/20" match { case re(number) => number * 2 }

500

What is a trait?
Similar to Java interfaces and have non-abstract members.

500

What is rank-1 polymorphism?
Concept where type variables may not be instantiated with polymorphic types, AKA ML-style.

Scala Jeopardy

Press F11 for full-screen mode

Edit | Download | Share

Correct Response      Continue