concept sequence in category idris
appears as: sequence, sequences, sequence

This is an excerpt from Manning's book Type-Driven Development with Idris.
IO String is the type of a program that describes a sequence of input and output operations that result in a String.
By defining DoorCmd in this way, with the input and output states explicit in the type, you’ve defined what it means for a sequence of door operations to be valid. And by writing doorProg incrementally, with a sequence of steps and a hole for the rest of the definition, you can see the state of the door at each stage by looking at the type of the hole.