Advertisement
Guest User

Untitled

a guest
Nov 3rd, 2014
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
F# 0.79 KB | None | 0 0
  1. let rec isConsistent :Prop list*Prop list -> bool = function
  2.     |[],auxlist              -> true //Base case
  3.     |Neg(A(p))::pp,auxlist   -> if List.exists(fun y -> y = A(p)) auxlist then
  4.                                                                             false
  5.                                                                           else
  6.                                                                             isConsistent(pp,A(p)::auxlist)
  7.     |A(p)::pp,auxlist        -> if List.exists(fun y -> y = A(p)) auxlist then
  8.                                                                             false
  9.                                                                           else
  10.                                                                             isConsistent(pp,A(p)::auxlist)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement