~/talk

Lovely for-comprehensions: Scala's most useful syntactic tool

Talkat Scala.IO 2014 · 2014-10-23..10-24· [developer-experience]
slides:none on file

Explains that for-comprehensions desugar to map and flatMap and filter, shows how a one-line for becomes map, nested lines become flatMap chains, and demonstrates concrete fixes like Option.toList and Future.traverse/sequence to flip List[Future] into Future[List]. Recommends avoiding pattern-matching on Option in favor of combinators, using inline vals inside comprehensions to break complex expressions, and lifting pure functions into Functor contexts so code stays concise, testable, and easier to read.

AI-written summary · about

  1. 0:00Start
  2. 14:54void "complexity-braces"
  3. 22:54equence
  4. 34:45Summary
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.