Question: I have to do a refactoring in an advanced search method with 500 lines. I split this method using closures in small parts, and now I have a lot of closures but I want to invoke them dynamically. 

For example:

```
def listCriteria={ ... }
def textCriteria={ ... }
def booleanCriteria={ ... }

criteria.listDistinct {
    criteries.eachWithIndex { crit, i->
        def criteriaType="${crit.type}Criteria"
        ...
    }
}

```

How can I do that?

Answer: 
According to [this instruction set reference](http://www.phy.davidson.edu/fachome/dmb/py310/EMAC_Primer/8085.InstructionSet.full.pdf), a conditional branch on the 8085 takes 9 T-states (2 M-cycles) if the branch isn't taken, and 18 T-states (5 M-cycles) if the branch is taken.

A T-state equals one clock cycle on the 8085 as far as I know. An M-cycle is made up of several (3 to 6) T-states. Examples of M-cycles are "Opcode Fetch" (which always is the first M-cycle of every instruction); "Memory Read" and "Memory Write".  
You can read more about the 8085's states and cycles [in this document](http://www.newagepublishers.com/samplechapter/000495.pdf).
Let's take ' JNZ 16-bit address ' instruction as example. 
And following code for understanding :

```
INR B           // B=03 H 
JNZ C200 H 

```

Here the condition will be true because register B is not zero. Hence 10 t-states. 

If register B =00 H then the JNZ condition will be false as it is zero. Hence 7 t- states. 

True: OF + MR + MR = 4 +3+3= 10 t states   

False: OF + MR = 4+3 =7 t states