This commit is contained in:
swrup 2025-11-11 02:07:51 +01:00
parent aa2ff7b2f0
commit 2f3113f55d
11742 changed files with 1223940 additions and 0 deletions

View file

@ -0,0 +1,10 @@
open! Import
open! Fn
(* enforce that we're testing [Fn.(|>)] and not ppx_pipebang. *)
let (_ : 'a -> ('a -> 'b) -> 'b) = ( |> )
let%test _ = 1 |> fun x -> x = 1
let%test _ = 1 |> fun x -> x + 1 |> fun y -> y = 2
let%test _ = 0 = apply_n_times ~n:0 (fun _ -> assert false) 0
let%test _ = 0 = apply_n_times ~n:(-3) (fun _ -> assert false) 0
let%test _ = 10 = apply_n_times ~n:10 (( + ) 1) 0