15 lines
208 B
Text
15 lines
208 B
Text
|
|
open Base
|
||
|
|
open Expect_test_helpers_base
|
||
|
|
|
||
|
|
let () =
|
||
|
|
let z = 3 in
|
||
|
|
let local_ f x y = x + y + z in
|
||
|
|
let r = Option.map2 (Some 3) (Some 4) ~f in
|
||
|
|
print_s [%sexp (r : int option)]
|
||
|
|
;;
|
||
|
|
|
||
|
|
[%%expect
|
||
|
|
{|
|
||
|
|
(10)
|
||
|
|
|}]
|