Edits to make example work properly

The example (test) now works, apart from showing the conditions. I need
to have a think about how to implement this properly - the conditions
should have a name associated with them, but internally they should
only refer to indexes (ints).