pub fn add(&mut self, element: T) {
        self.size += 1;
        match self.data.entry(element) {
            Entry::Vacant(count) => { count.insert(1); },
            Entry::Occupied(mut count) => { *count.get_mut() += 1; },
        }
    }
/// Add a sample to the frequency table.
///
/// # Examples
///
/// ```rust
/// use countrs::Counter;
///
/// let mut counter = Counter::new(5);
///
/// counter.add('a');
/// ```
Add a sample to the frequency table.
Add a sample to the frequency table .
pub fn add(&mut self, element: T) {
        self.size += 1;
        match self.data.entry(element) {
            Entry::Vacant(count) => { count.insert(1); },
            Entry::Occupied(mut count) => { *count.get_mut() += 1; },
        }
    }
pub fn add ( & mut self , element : T ) { self . size += 1 ; match self . data . entry ( element ) { Entry :: Vacant ( count ) => { count . insert ( 1 ) ; } , Entry :: Occupied ( mut count ) => { * count . get_mut ( ) += 1 ; } , } }
Add a sample to the frequency table.
Add a sample to the frequency table .
&mut self
element
T
&mut self
element
T
examples
```rust
use countrs::Counter.

let mut counter = Counter::new(5).


` ` ` rust use countrs :: Counter . let mut counter = Counter :: new ( 5 ) .