code: function groupBy(expression) {
  
          //Check arguments
          if (!expression)
              throw new Error("Expression is invalid");
  
          //Define output maps
          var maps = [];
  
          //For each element on array
          for (var i = 0; i < this.items.length; i++) {
  
              //Get group key of current element
              var groupKey = expression(this.items[i]);
  
              //Check if another element with the same key is on maps
              var existingMap = null;
  
              //For each existing element on maps
              for (var n = 0; n < maps.length; n++) {
  			
                  //If we have element with the same key
  				if (equals(maps[n].key, groupKey)){
  
                      //Set on external variable and break
                      existingMap = maps[n];
                      break;
                  }
              }
  
              //If not existing elements were found, create
              if (!existingMap) {
  
                  //Create with base values
                  existingMap = {
                      key: groupKey,
                      count: 0, 
  					elements: []
                  };
  
                  //Add element to map array
                  maps.push(existingMap);
              }
  
              //Increment the counter
              existingMap.count++;
  			
  			//Push current element to "elements" property
  			existingMap.elements.push(this.items[i]);
          }
  
          //Return for chaining
          return new jslinq(maps);
      }
docs: #region groupBy Group items inside array for given function