define(function() {

  'use strict';
  
  function RFALSE(){ return false; }
  
  function split(segment, entries, noRecurse) {
  
    var maybeHFS = segment.getBytes(512 * 2, 2).then(function(sigBytes) {
      var sig = String.fromCharCode(sigBytes[0], sigBytes[1]);
      if (sig === 'BD') {
        entries.add(segment.getSegment('volume/hfs'));
        return true;
      }
      if (sig === 'H+') {
        entries.add(segment.getSegment('volume/hfs-plus'));
        return true;
      }
      else if (sig === 'HX') {
        entries.add(segment.getSegment('volume/hfs-plus; variant=case-sensitive'));
        return false;
      }
      return false;
    }, RFALSE);
    
    var maybeFAT = segment.getBytes(0, 36).then(function(raw) {
      if (raw[0] !== 0xEB || raw[1] < 0x34 || raw[2] !== 0x90) {
        return false;
      }
      entries.add(segment.getSegment('volume/fat'));
      return true;
    }, RFALSE);
    
    var tries = Promise.all([maybeHFS, maybeFAT]);
    
    if (!noRecurse) {
      tries = tries.then(function(results) {
        if (results.filter(function(v){ return v; }).length !== 0) return;
        // if all else fails, try shifting 0x54 bytes (DiskCopy 4.2 header size) and trying again
        split(segment.getSegment(segment.type, 0x54), entries, true);
      });
    }
    
    return tries;
    
  }
  
  return {
    split: split,
  };

});

@@ -1059,65 +1059,65 @@
     
-if (results.filter(function(v)%7B return v; %7D).length !== 0
+for (var i = 0; i %3C results.length; i++) %7B if (results%5Bi%5D
 ) re
@@ -1121,16 +1121,18 @@
  return;
+ %7D
 %0A       

Use a for loop instead of array filter