Project

General

Profile

Statistics
| Branch: | Revision:

cool / src / lib / CoolUtils.mli @ 7c4d2eb4

History | View | Annotate | Download (907 Bytes)

1 e2dc68f7 Thorsten Wißmann
2
(* Some basic utilities as they are known from haskell prelude and so on... *)
3
4
module TArray : sig
5
    val all : ('a -> bool) -> 'a array -> bool
6
    val any : ('a -> bool) -> 'a array -> bool
7
    val elem : 'a -> 'a array -> bool
8
    val included : 'a array -> 'a array -> bool
9
    val to_string : ('a -> string) -> 'a array -> string
10 cae4b8d1 Thorsten Wißmann
    val uniq : 'a array -> 'a array (* delete consecutive duplicates *)
11 e2dc68f7 Thorsten Wißmann
end
12
13 de854a5a Thorsten Wißmann
module TList : sig
14
    val zip : ('a list) -> ('b list) -> ('a * 'b) list
15 7993e0bf Thorsten Wißmann
    val powerset : ('a list) -> ('a list list)
16 b59059c4 Thorsten Wißmann
    val prod : ('a list) -> ('b list) -> (('a * 'b) list)
17 53e9b267 Thorsten Wißmann
    val empty : ('a list) -> bool
18 de854a5a Thorsten Wißmann
end
19
20 e2dc68f7 Thorsten Wißmann
val cl_get_agents : unit -> int array
21
val cl_set_agents : int array -> unit
22
23 3068712a Thorsten Wißmann
val intlist_of_string : string -> int list
24
25 ad63163e Thorsten Wißmann
val compose : ('b -> 'c) -> ('a -> 'b) -> ('a -> 'c)
26
val flip : ('a -> 'b -> 'c) -> ('b -> 'a -> 'c)
27 58c30aee Thorsten Wißmann
val eval : 'a -> ('a -> 'b) -> 'b
28
val id : 'a -> 'a