contents

 

Front matter

preface

acknowledgments

about this book

about the author

Part 1.   The functional toolkit

  1   Learning functional programming

Perhaps you picked up this book because...

What do you need to know before we start?

What do functions look like?

Meet the function

When the code lies...

Imperative vs. declarative

Coffee break: Imperative vs. declarative

Coffee break explained: Imperative vs. declarative

How useful is learning functional programming?

Leaping into Scala

Practicing functions in Scala

Getting your tools ready

Getting to know the REPL

Writing your first functions!

How to use this book

  2   Pure functions

Why do we need pure functions?

Coding imperatively

Breaking the code

Passing copies of the data