DEV Community

Discussion on: The basic Elm example that I wish I'd had

Collapse
 
1hko profile image
1hko

Nice model. It even avoids a problem found in some real-life doors: 1. open the the door, 2. toggle the deadbolt lock, 3. close the door, 4. "error: cannot close locked door"

Collapse
 
nimmo profile image
Nimmo

Ha, yes! That's a perfect example of a state that our application could get into if we hadn't thought about the potential transitions up-front.