{
(set:$sequence to (a:"a","man"))
(set:$conversion to
(dm:
"man","woman",
"woman","man") +
(dm:
"dream","love",
"love","hate",
"hate","write",
"write","shoot",
"shoot","read",
"read","talk",
"talk","dream"
)
)
(goto:"phrase")
}{
(set:$iterator to 0)
(for: each _item, ...$sequence)[
(set: $iterator to it + 1)
(display: _item)
]
}{
(set:$item to $sequence's ($selected))
(if:$item is "a")[(display:"a-selected")]
(else-if:$conversion contains $item)[
(set: $new_item to $conversion's $item)
(set: $sequence's ($selected) to $new_item)
]
(go-to:"phrase")
}{
(if:$iterator is 1)[(set:$letter to "A")](else:)[(set:$letter to "a")]
(print:"(link: '" + (text:$letter) + "')[(set:$selected to " + (text:$iterator) + ")(goto:'selected')]")
}{
(if:($sequence's length) is ($selected+1))[(display:"a-add-verb")]
(else-if:($sequence's length) is ($selected+2))[(display:"a-add-person")]
(else:)[(display:"a-reduce-array")]
}{
(set:$sequence to $sequence + (a:"a"))
(set:$sequence to $sequence + (a:(either: "man", "woman")))
}{
(set:$new_verb to (a:(either: "dream", "love", "hate", "write", "shoot", "read", "talk")))
(set:$sequence to $sequence + $new_verb)
}{
(set:$sequence to (subarray:$sequence,1,($selected+1)))
}{
(print:"(link: 'man')[(set:$selected to " + (text:$iterator) + ")(goto:'selected')]")
}{
(print:"(link: 'woman')[(set:$selected to " + (text:$iterator) + ")(goto:'selected')]")
}{
(if:$iterator > 3)[who]
(print:"(link: 'loves')[(set:$selected to " + (text:$iterator) + ")(goto:'selected')]")
}{
(if:$iterator > 3)[who]
(print:"(link: 'hates')[(set:$selected to " + (text:$iterator) + ")(goto:'selected')]")
}{
(if:$iterator > 3)[who]
(print:"(link: 'shoots')[(set:$selected to " + (text:$iterator) + ")(goto:'selected')]")
}{
(if:$iterator > 3)[who]
(print:"(link: 'dreams')[(set:$selected to " + (text:$iterator) + ")(goto:'selected')]")
(if:$sequence's length > $iterator)[of]
}{
(if:$iterator > 3)[who]
(print:"(link: 'writes')[(set:$selected to " + (text:$iterator) + ")(goto:'selected')]")
(if:$sequence's length > $iterator)[about]
}{
(if:$iterator > 3)[who]
(print:"(link: 'reads')[(set:$selected to " + (text:$iterator) + ")(goto:'selected')]")
(if:$sequence's length > $iterator)[about]
}{
(if:$iterator > 3)[who]
(print:"(link: 'talks')[(set:$selected to " + (text:$iterator) + ")(goto:'selected')]")
(if:$sequence's length > $iterator)[about]
}