Learn You a Bend

Learn You a Bend

A little functional programming. A little parallel magic. A lot of runnable examples.

An approachable, interactive guide to Bend 2, inspired by Learn You a Haskell. No Haskell experience required. Edit the code as you read and run it right in your browser.

Start reading → · Read it all on one page

PDF · EPUB

Contents

Getting started

  1. 0. Pack your compiler

Functional foundations

  1. 1. Values, not a shopping list of commands
  2. 2. Functions and the suspicious little plus
  3. 3. Shapes in tiny labelled boxes
  4. 4. Lists: one biscuit and the rest of the tin
  5. 5. Functions in your backpack

Resources, effects, and proofs

  1. 6. Quantities: the librarian is counting
  2. 7. Effects, without pretending printing is pure
  3. 8. Two elves, two independent jobs
  4. 9. Laws: bring a proof, not just good intentions
  5. 10. Bonus: a mutable array with one owner

Next steps

  1. Where to wander next