
!function(root, underscore){
  'use strict';
  var _ = underscore;

  _.fillArray = function(value, len) {
        var arr = [],
            i;
        for (i=0; i < len; i++) {
            arr.push(value);
        };
        return arr;
    }


  _.Counter = function(arraryData){
        var self = {},
            i, // for loop index
            length, // for loop length
            value // fetch the array value by index
            ;

        self._dict = {};

        for(i=0, length=arraryData.length; i < length; i++){
            value = arraryData[i];
            if(value in self._dict){
                self._dict[value]++ ;
            }else{
                self._dict[value] = 1;
            }
        }


        _.each(self._dict, function(v, k){
            self[k] = v;
        });

        // typef is a function which is used to cast value type
        self.elements = function(typef){
            var array = [];
            _.each(self._dict, function(v, k){
                array = array.concat(_.fillArray(k, v));
            })
            if(typef){
                return _.map(array, typef);
            }
            return array;
        }

        self.most_common = function(n, typef){
            // user orderdictionary 
        }

        self.subtract = function(anotherCounter){
            _.each(anotherCounter._dict, function(v, k){
                if(k in self._dict){
                    self[k] -= v;
                }else{
                    self[k] = -v;
                }

            })
        }

        self.update = function(arraryData){

        }

        self._get_counter = function(key){
            return self._dict[key] || 0;
        }


        return self;
  }// 

  _.Set = function(arraryData){
        var self = {};


        function init(){
            _.each(arraryData, function(v, i){
                self.add(v);
            })
        }

        self.add = function(v){
            if(! self.has(v)){
                self[v] = null;
            }
            return self;
        }

        self.remove = self.discard = function(v){
            delete self[v]
        }

        self.clear = function(){
            _.each(self, function(v, k){
                if(self.has(k)){
                    self.remove(k)
                }
            })
        }

        self.has = function(v){
            return self[v] === null;
        }

        init();

        return self;
  }






}(this, require("underscore"));
@@ -1067,32 +1067,67 @@
      if(typef)%7B%0A
+                console.log(array)%0A
                 
@@ -2487,16 +2487,915 @@
 f;%0A  %7D%0A%0A
+  _.Dequeue = function()%7B%0A    var self = %7B%7D;%0A    var array = %5B%5D;%0A%0A    // Add x to the right side of the deque%0A    self.append = array.push;%0A%0A    // Add x to the left side of the deque.%0A    self.append = array.unshift;%0A%0A%0A    // Remove all elements from the deque leaving it with length 0%0A    self.clear = function()%7B%0A        array = %5B%5D;%0A        return self;%0A    %7D%0A%0A    // Count the number of deque elements equal to x.%0A    self.count = function(x)%7B%0A        return _.countBy(array, function(n)%7B%0A                    return n == x;%0A                %7D)%5Btrue%5D;%0A    %7D%0A%0A    // Extend the right side of the deque by appending %0A    // elements from the iterable argument.%0A    self.extend = function(anotherArrary)%7B%0A        array = array.concat(anotherArrary);%0A        return self;%0A    %7D%0A%0A    // self.extendleft = null%0A%0A    //Reverse the elements of the deque in-place %0A    self.reverse = array.reverse;%0A%0A%0A  %7D%0A%0A
 %0A%0A%0A%0A%0A%7D(t

add dequeue type