2016 Update
This commit is contained in:
parent
948b86eafa
commit
dcf5d15da3
7965 changed files with 139854 additions and 31002 deletions
6
Task/Reverse-a-string/OCaml/reverse-a-string-4.ocaml
Normal file
6
Task/Reverse-a-string/OCaml/reverse-a-string-4.ocaml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
let string_rev s =
|
||||
let len = String.length s in
|
||||
String.init len (fun i -> s.[len - 1 - i])
|
||||
|
||||
let () =
|
||||
print_endline (string_rev "Hello world!")
|
||||
Loading…
Add table
Add a link
Reference in a new issue