Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
8
Task/Named-parameters/OCaml/named-parameters.ocaml
Normal file
8
Task/Named-parameters/OCaml/named-parameters.ocaml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
# let foo ~arg1 ~arg2 = arg1 + arg2;;
|
||||
val foo : arg1:int -> arg2:int -> int = <fun>
|
||||
|
||||
# let foo ~arg1:x ~arg2:y = x + y;; (* you can also use different variable names internally if you want *)
|
||||
val foo : arg1:int -> arg2:int -> int = <fun>
|
||||
|
||||
# foo ~arg2:17 ~arg1:42;;
|
||||
- : int = 59
|
||||
Loading…
Add table
Add a link
Reference in a new issue