Skip to content

Commit

Permalink
Assorted structural changes
Browse files Browse the repository at this point in the history
- Reorder content
- Update copyright
- Minor tweaks to formatting, titles
  • Loading branch information
noelwelsh committed Jan 22, 2024
1 parent f8ed59e commit 9095cc1
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 21 deletions.
40 changes: 28 additions & 12 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -40,25 +40,18 @@ lazy val pages = List(
"intro/index.md",
"intro/three-levels.md",
"intro/what-is-fp.md",
// Part 1: Foundations
"parts/part1.md",
"adt/index.md",
// ADTs
"adt/scala.md",
"adt/structural-recursion.md",
"adt/structural-corecursion.md",
"adt/applications.md",
"adt/algebra.md",
"adt/conclusions.md",
"adt-interpreters/index.md",
"adt-interpreters/regexp.md",
"adt-interpreters/reification.md",
"adt-interpreters/tail-recursion.md",
"adt-interpreters/conclusions.md",
"adt-optimization/index.md",
"adt-optimization/algebra.md",
"adt-optimization/stack-reify.md",
"adt-optimization/stack-machine.md",
// "adt-optimization/effects.md",
"adt-optimization/conclusions.md",
// Objects as Codata
// Contextual Abstraction
"type-classes/index.md",
"type-classes/anatomy.md",
"type-classes/implicits.md",
Expand All @@ -67,16 +60,21 @@ lazy val pages = List(
"type-classes/equal.md",
"type-classes/instance-selection.md",
"type-classes/summary.md",
// Part 2: Type Classes
"parts/part2.md",
// Monoid
"monoids/index.md",
"monoids/cats.md",
"monoids/applications.md",
"monoids/summary.md",
// Functor
"functors/index.md",
"functors/cats.md",
"functors/contravariant-invariant.md",
"functors/contravariant-invariant-cats.md",
"functors/partial-unification.md",
"functors/summary.md",
// Monad
"monads/index.md",
"monads/cats.md",
"monads/id.md",
Expand All @@ -90,18 +88,36 @@ lazy val pages = List(
"monads/summary.md",
"monad-transformers/index.md",
"monad-transformers/summary.md",
// Applicative
"applicatives/index.md",
"applicatives/semigroupal.md",
"applicatives/examples.md",
"applicatives/parallel.md",
"applicatives/applicative.md",
"applicatives/summary.md",
// Parallel
// Traverse
"foldable-traverse/index.md",
"foldable-traverse/foldable.md",
"foldable-traverse/foldable-cats.md",
"foldable-traverse/traverse.md",
"foldable-traverse/traverse-cats.md",
"foldable-traverse/summary.md",
// Part 3: Interpreters
"parts/part3.md",
"adt-interpreters/index.md",
"adt-interpreters/regexp.md",
"adt-interpreters/reification.md",
"adt-interpreters/tail-recursion.md",
"adt-interpreters/conclusions.md",
"adt-optimization/index.md",
"adt-optimization/algebra.md",
"adt-optimization/stack-reify.md",
"adt-optimization/stack-machine.md",
// "adt-optimization/effects.md",
"adt-optimization/conclusions.md",
// Part 4: Craft
// Part 5: Case Studies
"parts/part2.md",
"case-studies/testing/index.md",
"case-studies/map-reduce/index.md",
Expand All @@ -124,7 +140,7 @@ lazy val pages = List(
// "case-studies/parser/transforms.md",
// "case-studies/parser/applicative.md",

"parts/part3.md",
"parts/solutions.md",
"solutions.md",
"links.md",
"parts/part4.md"
Expand Down
8 changes: 4 additions & 4 deletions src/meta/metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
title: "Scala with Cats"
author: "Noel Welsh with Dave Gurnell"
date: "June 2023"
title: "Functional Programming Strategies in Scala with Cats"
author: "Noel Welsh"
date: "Jan 2024"
tocDepth: 3
copyright: "2014-23"
copyright: "2014-24"
figPrefixTemplate: "$$i$$"
eqnPrefixTemplate: "$$i$$"
tblPrefixTemplate: "$$i$$"
Expand Down
2 changes: 1 addition & 1 deletion src/pages/intro/index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Introduction
# Thinking About Thinking About Code

This is a book on strategies to create code in a functional programming (FP) style, seen through a Scala lens. If you understand most of the mechanics of Scala, but feel there is something missing in your understanding of how to use the language effectively, this book might be for you. If you don't know so much Scala, but are prepared to learn it as part of learning about functional programming, this book might also work. It covers the usual functional programming abstractions like monads and monoids, but more than that it tries to teach you how to think and program like a functional programmer. It's a book as much about process as it is about the code that results from process, and in particular it focuses on what I can metacognitive programming strategies.

Expand Down
2 changes: 1 addition & 1 deletion src/pages/parts/part1.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
\partimage[width=.5\linewidth]{src/pages/parts/part1.png}
\part{Theory}
\part{Foundations}
2 changes: 1 addition & 1 deletion src/pages/parts/part2.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
\partimage[width=.5\linewidth]{src/pages/parts/part2.png}
\part{Case Studies}
\part{Type Classes}
2 changes: 1 addition & 1 deletion src/pages/parts/part3.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
\partimage[width=.5\linewidth]{src/pages/parts/part3.png}
\part{Solutions to Exercises}
\part{Interpreters}
2 changes: 2 additions & 0 deletions src/pages/parts/solutions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
\partimage[width=.5\linewidth]{src/pages/parts/part3.png}
\part{Solutions to Exercises}
8 changes: 8 additions & 0 deletions src/pages/preface/preface.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Preface {-}

## Functional Programming Strategies {-}

This book builds on the bones of an earlier book, *Scala with Cats*.
This preface will be completed when this book near completion.


## Scala with Cats {-}

The aims of this book are two-fold:
to introduce monads, functors, and other functional programming patterns
as a way to structure program design,
Expand Down
2 changes: 1 addition & 1 deletion src/templates/template.tex
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@

$if(blackandwhiteprintable)$
$else$
\includepdf[pages={1},noautoscale]{src/covers/pdf-cover.pdf}
\includepdf[pages={1},noautoscale]{src/covers/pdf-cover-2nd-ed.pdf}
\clearpage
$endif$

Expand Down

0 comments on commit 9095cc1

Please sign in to comment.