Skip to content

Instantly share code, notes, and snippets.



Created Mar 31, 2016
What would you like to do?
#![cfg_attr(test, feature(plugin))]
#![cfg_attr(test, plugin(quickcheck_macros))]
extern crate quickcheck;
fn reverse<T: Clone>(xs: &[T]) -> Vec<T> {
let mut rev = vec!();
for x in xs {
rev.insert(0, x.clone())
mod tests {
fn double_reversal_is_identity(xs: Vec<isize>) -> bool {
xs == super::reverse(&super::reverse(&xs))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.