Skip to content
Snippets Groups Projects
Commit fb697230 authored by Thorsten Wißmann's avatar Thorsten Wißmann
Browse files

Add TArray.to_string helper

parent a817ee25
No related branches found
No related tags found
No related merge requests found
......@@ -15,6 +15,7 @@ module TArray = struct
let elem (x: 'a) (arr: 'a array) =
any (fun y -> x == y) arr
let included sub sup = all (fun x -> elem x sup) sub
let to_string ts arr = "[| " ^ (Array.fold_right (fun i str -> (ts i) ^" "^ str) arr "|]")
end
let disjointAgents sort a b =
......
......@@ -11,6 +11,7 @@ module TArray : sig
val any : ('a -> bool) -> 'a array -> bool
val elem : 'a -> 'a array -> bool
val included : 'a array -> 'a array -> bool
val to_string : ('a -> string) -> 'a array -> string
end
val disjointAgents : sort -> localFormula -> localFormula -> bool
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment