A 16-step list you check from the top, holding the first pattern that matches.
Check the dealt 5 cards against the list from the top and hold the first pattern that matches. Example: 4 to a royal is second on the list, so it applies before a made straight or flush. In 9/6 Jacks or Better its house edge is 0.54%, 0.08% above optimal.