Module Util
Utility functions.
val flip : ('a -> 'b -> 'c) -> 'b -> 'a -> 'c
val id : 'a -> 'a
val const : 'a -> 'b -> 'a
val curry : (('a * 'b) -> 'c) -> 'a -> 'b -> 'c
val uncurry : ('a -> 'b -> 'c) -> ('a * 'b) -> 'c
val first : ('a -> 'b) -> ('a * 'c) -> 'b * 'c
val second : ('a -> 'b) -> ('c * 'a) -> 'c * 'b
second f (1, 2)
returns(1, f 2)
val (<.) : ('a -> 'b) -> ('c -> 'a) -> 'c -> 'b
val (<..) : ('a -> 'b) -> ('c -> 'd -> 'a) -> 'c -> 'd -> 'b
val (<...) : ('a -> 'b) -> ('c -> 'd -> 'e -> 'a) -> 'c -> 'd -> 'e -> 'b
val partition_map3 : ('a -> ('b, 'c, 'd) either3) -> 'a list -> 'b list * 'c list * 'd list
partition_map
forEither3
type
val (>>=) : 'a option -> ('a -> 'b option) -> 'b option
val let* : 'a option -> ('a -> 'b option) -> 'b option
val (<$>) : ('a -> 'b) -> 'a option -> 'b option
val let+ : 'a option -> ('a -> 'b) -> 'b option
val (<|>) : 'a option -> (unit -> 'a option) -> 'a option
val one_of : ('a -> 'b option) -> 'a list -> 'b option
val maybe : 'a -> 'a option -> 'a
val (<::>) : 'a -> 'a list option -> 'a list option
val foldM : ('a -> 'b -> 'a option) -> 'a -> 'b list -> 'a option
monadic
fold_left
val set_minus_q : 'a list -> 'a list -> 'a list
val sym_diff : 'a list -> 'a list -> 'a list
val partitionEithers : ('a, 'b) Stdlib.Either.t list -> 'a list * 'b list
Either 型の要素のリストを左右に振り分ける
val uncurried_safe_unzip : ('a list * 'b list) -> ('a * 'b) list option
uncurried monadic combine (possibly renamed as
safe_combine
)
val safe_unzip : 'a list -> 'b list -> ('a * 'b) list option
monadic combine (possibly renamed as
safe_combine
)
val insert : 'a -> 'b -> ('a * 'b) list -> ('a * 'b) list
更新不可なマップオブジェクト
- 同一のキーに対して,異なる値を挿入しようとしたら,例外
Bug: updating
を投げる
- 同一のキーに対して,異なる値を挿入しようとしたら,例外
val update : (unit -> 'a) -> ('a -> 'a) -> 'b -> ('b * 'a) list -> ('b * 'a) list
A helper function for
collect_indeg_arg
andcollect_indeg