Advertisement
Guest User

Untitled

a guest
Apr 28th, 2016
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
F# 0.31 KB | None | 0 0
  1. let confirm n =
  2.  List.forall(fun elem -> List.length(elem) = List.length(n))n
  3. let remove n =
  4.  match n with
  5.  |[] -> []
  6.  | x::xs -> xs
  7. let submatrix n = remove(List.fold(fun acc elem -> acc@[{remove elem)][]n)
  8. let rec trace n =
  9.  match n with
  10.  |[] -> 0
  11.  |[[]] -> 0
  12.  |(x::xs)::tail -> x + trace (submatrix n)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement