Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
1
Task/Copy-a-string/OCaml/copy-a-string-1.ocaml
Normal file
1
Task/Copy-a-string/OCaml/copy-a-string-1.ocaml
Normal file
|
|
@ -0,0 +1 @@
|
|||
let src = "foobar"
|
||||
1
Task/Copy-a-string/OCaml/copy-a-string-2.ocaml
Normal file
1
Task/Copy-a-string/OCaml/copy-a-string-2.ocaml
Normal file
|
|
@ -0,0 +1 @@
|
|||
let dst = String.copy src
|
||||
4
Task/Copy-a-string/OCaml/copy-a-string-3.ocaml
Normal file
4
Task/Copy-a-string/OCaml/copy-a-string-3.ocaml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
(* Transition-period synonymy between types, explicit type annotations are just for emphasis *)
|
||||
let dst1 : string = Bytes.copy (src : bytes)
|
||||
let dst2 : bytes = Bytes.copy (src : string)
|
||||
(* fails to compile with -safe-string *)
|
||||
1
Task/Copy-a-string/OCaml/copy-a-string-4.ocaml
Normal file
1
Task/Copy-a-string/OCaml/copy-a-string-4.ocaml
Normal file
|
|
@ -0,0 +1 @@
|
|||
let dst = src
|
||||
Loading…
Add table
Add a link
Reference in a new issue