anchor.diff:          | _ -> false
   
   [<JavaScript>]
  +let private isPermutation (xs: seq<'T>) (ys: seq<'T>) =
  +    let xs = Array.ofSeq xs
  +    ys |> Seq.forall (fun y ->
  +        match xs |> Array.tryFindIndex (fun x -> x = y) with
  +        | None -> false
  +        | Some i -> xs.JS.Splice(i, 1) |> ignore; true
  +    ) && Array.isEmpty xs
  +
  +[<JavaScript>]
   let Tests =
   
       TestCategory "Seq" {
  
positive.code:         Test "Seq.sort" {
              equal (Seq.sort [| 1; 8; -5; 2 |] |> Seq.toArray)
                  [| -5; 1; 2; 8 |]
          }
  
          Test "Seq.sortBy" {
              let s = Seq.sortBy (fun x -> 10 - x) [6;7;8;9;10]
              equal (Seq.toArray s) [|10;9;8;7;6|]
          }
  
          Test "Seq.sum" {
  
negative.code:             equal (Seq.scanBack (+) { 1 .. 10 } 9 |> Array.ofSeq) [| 64; 63; 61; 58; 54; 49; 43; 36; 28; 19; 9 |]
          }
  
          Test "Seq.sortWith" {
              let cmp a b = compare (a % 3) (b % 3)
              property (fun x -> Do {
                  let s = Seq.sortWith cmp x
                  isTrueMsg (isPermutation s x) "Result is a permutation of original"
                  isTrueMsg (s |> Seq.pairwise |> Seq.forall (fun (x, y) -> cmp x y <= 0)) "Result is sorted"
              })
          }
  
          #endif
  