From: Stefano Z. <za...@bo...> - 2003-02-27 13:52:36
|
On Wed, Feb 26, 2003 at 09:36:54PM -0500, Manos Renieris wrote: > That would help. Thanks. - val String.explode : string -> char list - val String.implode : char list -> string (* like perl's chomp function, remove trailing newline characters *) - val String.chomp : string -> string (* fold left on file lines (without trailing newline), I don't know in which module this functions should go, maybe Sys? *) - val fold_file : ('a -> string -> 'a) -> 'a -> string -> 'a (* iter on file lines *) - val iter_file : (string -> unit) -> string -> unit - val Dbm.fold_left - val Hashtbl.keys : ('a, 'b) Hashtbl.t -> 'a list - val Hashtbl.values : ('a, 'b) Hashtbl.t -> 'b list (* remove all bindings of a given keys *) - val Hashtbl.remove_all : ('a, 'b) Hashtbl.t -> 'a -> unit (* like Hashtbl.fold but working on ordered key list. Find a better name!, compare defaults to Pervasives.compare *) - val Hashtbl.sorted_fold: ?compare: ('a -> 'a -> int) -> ('a -> 'b -> 'c -> 'c) -> ('a, 'b) Hashtbl.t -> 'c -> 'c (* as above for iter *) - val Hashtbl.sorted_iter: ?compare: ('a -> 'a -> int) -> ('a -> 'b -> unit) -> ('a, 'b) Hashtbl.t -> unit (* return all bindings of a given key *) - val List.assoc_all: 'a -> ('a * 'b) list -> 'b list (* as above but use physical equality *) - val List.assq_all: 'a -> ('a * 'b) list -> 'b list - val Sys.copy: src:string -> dst:string -> unit (* add support for recursive directory creation for Unix.mkdir *) - support for "-p" to Unix.mkdir - Unix.is_directory : ?follow_sym_link: bool -> string -> bool - Unix.is_regular - Unix.is_symlink - ... (* predicates over filenames, optional argument defaults to false, if it is true predicate are over symlink target *) (* return size of a given file; maybe Sys.filesize? *) - Unix.filesize : string -> bool (* "/ls" command interface *) - Unix.ls : string -> string list - val Random.char: unit -> char - val Random.string: int -> char (* argument is string length *) (* predicate negation *) - val non: ('a -> bool) -> ('a -> bool) (* given a 'a option returns the 'a value if it's Some _ or raise an exception, find a better name! *) - val unsome : 'a option -> 'a Hope this helps, Cheers. -- Stefano Zacchiroli - Undergraduate Student of CS @ Uni. Bologna, Italy zack@{cs.unibo.it,debian.org,bononia.it} - http://www.bononia.it/zack/ " I know you believe you understood what you think I said, but I am not sure you realize that what you heard is not what I meant! " -- G.Romney |