Skip to content

Latest commit

 

History

History
34 lines (23 loc) · 391 Bytes

README.md

File metadata and controls

34 lines (23 loc) · 391 Bytes

EarlyReturnKata

Step:

  1. Add return
     Return<type> r;
  1. Move value into return
r.set(value);
return r.value;
  1. Add if clause
if (r.isSet) {
    return r.value;
} else {

}
  1. move up a level
    a. if you are in a loop, duplicate outside and add a break;
  2. expand else to everything in left in current block
  3. invert if
  4. repeat