anchor.diff:          |> Arb.fromGen
   
   let registerGen = lazy (Arb.register<NonEmptyListGen>() |> ignore)
  +
  +[<Test>]
  +let ``functor laws``() =
  +    registerGen.Force()
  +    let n = sprintf "NonEmptyList : functor %s"
  +    let map = NonEmptyList.map
  +    fsCheck (n "preserves identity") <| 
  +        fun value -> map id value = value
  +    fsCheck (n "preserves composition") <|
  +        fun f g value -> map (f << g) value = (map f << map g) value
  +
  +[<Test>]
  +let ``monad laws``() =
  +    registerGen.Force()
  +    let ret (x: int) = NonEmptyList.singleton x
  +    let n = sprintf "NonEmptyList : monad %s"
  +    let inline (>>=) m f = NonEmptyList.collect f m
  +    fsCheck "left identity" <| 
  +        fun f a -> ret a >>= f = f a
  +    fsCheck "right identity" <| 
  +        fun x -> x >>= ret = x
  +    fsCheck "associativity" <| 
  +        fun f g v ->
  +            let a = (v >>= f) >>= g
  +            let b = v >>= (fun x -> f x >>= g)
  +            a = b
   
   let fsCheck t = fsCheck "" t
   
  
positive.code: [<Test>]
  let ``toArray is same length as non-empty list`` () =
      fsCheck (fun nel -> NonEmptyList.toArray nel |> Array.length = nel.Length)
  
  [<Test>]
  let ``functor laws``() =
      let map = NonEmptyList.map
      fsCheck (fun nel -> map id nel = nel)
      fsCheck (fun f g nel -> map (f << g) nel = (map f << map g) nel)
  
  [<Test>]
  let ``reverse . reverse = id`` () =
  
negative.code:         let actual = NonEmptyList.reduce (+) nel
          let expected = nel |> NonEmptyList.toList |> List.sum
          expected = actual
  