public static function groupBy($array, $groupBy = "id")
	{
		return static::reduce($array, function($arr, $item) use($groupBy) {

			// get value of attribute
			if( is_closure($groupBy) )
			{
				// execute closure
				$value = $groupBy($item);
			} 
			else
			{
				// get attribute of object
				$value = pisc\upperscore\def($item, $groupBy);
			}

			// build new array with value as keys
			if( isset($arr[$value]) )
			{
				$arr[$value][] = $item;
			}
			else
			{
				$arr[$value] = [ $item ];
			}

			return $arr;

		}, []);
	}