mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 03:05:28 -05:00
cleanup: remove stubs for code always present on 4.08
This commit is contained in:
parent
61887100ae
commit
492484a9a2
2 changed files with 5 additions and 20 deletions
|
|
@ -2,24 +2,18 @@
|
||||||
|
|
||||||
(** {1 Basic Functions} *)
|
(** {1 Basic Functions} *)
|
||||||
|
|
||||||
[@@@ocaml.warning "-32"]
|
|
||||||
|
|
||||||
let opaque_identity x = x
|
|
||||||
|
|
||||||
[@@@ocaml.warning "+32"]
|
|
||||||
|
|
||||||
(* import standard implementations, if any *)
|
(* import standard implementations, if any *)
|
||||||
|
|
||||||
include Sys
|
include Sys
|
||||||
include Stdlib
|
include Stdlib
|
||||||
include Fun
|
include Fun
|
||||||
|
|
||||||
let compose f g x = g (f x)
|
let[@inline] compose f g x = g (f x)
|
||||||
let compose_binop f g x y = g (f x) (f y)
|
let[@inline] compose_binop f g x y = g (f x) (f y)
|
||||||
let curry f x y = f (x, y)
|
let[@inline] curry f x y = f (x, y)
|
||||||
let uncurry f (x, y) = f x y
|
let[@inline] uncurry f (x, y) = f x y
|
||||||
|
|
||||||
let tap f x =
|
let[@inline] tap f x =
|
||||||
ignore (f x);
|
ignore (f x);
|
||||||
x
|
x
|
||||||
|
|
||||||
|
|
@ -67,8 +61,6 @@ let rec iterate n f x =
|
||||||
|
|
||||||
module Infix = struct
|
module Infix = struct
|
||||||
(* default implem for some operators *)
|
(* default implem for some operators *)
|
||||||
let ( |> ) = Stdlib.( |> )
|
|
||||||
let ( @@ ) = Stdlib.( @@ )
|
|
||||||
let ( %> ) = compose
|
let ( %> ) = compose
|
||||||
let[@inline] ( % ) f g x = f (g x)
|
let[@inline] ( % ) f g x = f (g x)
|
||||||
let ( let@ ) = ( @@ )
|
let ( let@ ) = ( @@ )
|
||||||
|
|
|
||||||
|
|
@ -71,13 +71,6 @@ val iterate : int -> ('a -> 'a) -> 'a -> 'a
|
||||||
Infix operators. *)
|
Infix operators. *)
|
||||||
|
|
||||||
module Infix : sig
|
module Infix : sig
|
||||||
val ( |> ) : 'a -> ('a -> 'b) -> 'b
|
|
||||||
(** [x |> f] is the same as [f x]. A 'pipe' operator. *)
|
|
||||||
|
|
||||||
val ( @@ ) : ('a -> 'b) -> 'a -> 'b
|
|
||||||
(** [f @@ x] is the same as [f x], but right-associative.
|
|
||||||
@since 0.5 *)
|
|
||||||
|
|
||||||
val ( %> ) : ('a -> 'b) -> ('b -> 'c) -> 'a -> 'c
|
val ( %> ) : ('a -> 'b) -> ('b -> 'c) -> 'a -> 'c
|
||||||
(** [(f %> g) x] or [(%>) f g x] is [g (f x)]. Alias to [compose]. *)
|
(** [(f %> g) x] or [(%>) f g x] is [g (f x)]. Alias to [compose]. *)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue