From ead4492b06c39f5e4dcf6254dcfbaaa6041a6d24 Mon Sep 17 00:00:00 2001 From: "andrey.torsunov" Date: Thu, 28 May 2015 18:16:37 +0300 Subject: [PATCH] Add `split` and `join` for OCaml --- markup/ml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/markup/ml b/markup/ml index c5e9fc0..8ff07d0 100644 --- a/markup/ml +++ b/markup/ml @@ -413,9 +413,9 @@ Real.toString 3.14||7 + int_of_string "12" _ 73.9 + (read "0.037")::Double _ ##gray|//raises exception if string doesn't completely parse//##|| ||[[# join]][#join-note join] _ -@< >@|| || ||System.String.Join(" ", ["do"; "re"; "mi"])|| || +@< >@|| ||String.concat "_" ["a"; "b"; "c"; "d"]||System.String.Join(" ", ["do"; "re"; "mi"])|| || ||[[# split]][#split-note split] _ -@< >@|| || ||"do re mi".Split(' ')|| || +@< >@|| ||Str.split_delim (Str.regexp " ") "do re mi"||"do re mi".Split(' ')|| || ||[[# char-type]][#char-type-note character type] _ @< >@||char||char||char||Char|| ||[[# char-literal]][#char-literal-note character literal]||#"h"||'h'||'h'||'h'|| @@ -1971,4 +1971,4 @@ The OCaml top level provides [http://caml.inria.fr/pub/docs/manual-ocaml/manual0 + Haskell [http://www.haskell.org/onlinereport/haskell2010/ Haskell 2010 Language Report] -[http://www.haskell.org/ghc/docs/latest/html/libraries/index.html Haskell Hierarchical Libraries] \ No newline at end of file +[http://www.haskell.org/ghc/docs/latest/html/libraries/index.html Haskell Hierarchical Libraries]