Reading diagrams / Topic 17 of 42

What types promise

The rule

A type can promise things the code cannot break. A definition generic over a type can only pass values of that type along. It has no way to look inside them. The structure lens marks such definitions as generic.

The opposite case is a choice made by comparing a plain String or Int. No type ties the value to the cases it picks between, so a misspelled case still compiles. The lens lists these choices.

A small copy of a Redux todo app.

Loading the structure picture.

The Koa program’s choices by plain String.

Loading the structure picture.

Loading the worked examples and practice.