docs: function Query( rules, /* internal use */ $op ){
  
          var op
              ,l
              ,rule
              ,first
              ,list
              ,fn
              ;
  
          if ( $op ){
              
              // parse operation choice
              if ( $op === '$or' || $op === '$and' ){
  
                  // expect a rules array
                  for ( op = 0, l = rules.length; op < l; ++op ){
                      
                      fn = Query( rules[ op ] );
                      // if first hasn't been set yet, set it and start the list there
                      // otherwise set the next node of the list
                      list = list ? list.next = fn : first = fn;
                  }
  
                  return ($op === '$or') ? $or( first ) : $and( first );
              } else if ( op = operations[ $op ] ){
  
                  return op( rules );
  
              } else {
                  // does not compute...
                  throw 'Unknown query operation: ' + $op;
              }
          }
  
          // loop through rules
          for ( op in rules ){
              rule = rules[ op ];
     
              if ( op[0] === '$' ){
                  // it's an operation rule
                  fn = Query( rule, op );
                  
              } else if ( Physics.util.isPlainObject( rule ) ) {
                  // it's an object so parse subrules
                  fn = wrapRule( Query( rule ), op );
              } else {
                  // simple equality rule
                  fn = $eq( rule, op );
              }
  
              // if first hasn't been set yet, set it and start the list there
              // otherwise set the next node of the list
              list = list ? list.next = fn : first = fn;
          }
  
          // return the rules test
          return $and( first || fnTrue );
      }