Implement the first few functions and test via ScalaCheck