This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule MyModule do | |
@behaviour Access | |
defstruct x: 0, y: 1 | |
## Delegate Access callbacks to Map module | |
defdelegate fetch(a, b), to: Map | |
defdelegate get(a, b, c), to: Map | |
defdelegate get_and_update(a, b, c), to: Map | |
defdelegate pop(a, b), to: Map |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::cmp::Ordering; | |
use std::fmt::Debug; | |
extern crate scoped_pool; | |
use scoped_pool::Pool; | |
/// An insertion sort for small slices | |
#[inline] | |
fn insertion_sort<T>(arr: &mut [T], left: usize, right: usize) where T: Ord { |