Skip to content

Instantly share code, notes, and snippets.

@jdeisenberg
Last active January 18, 2018 17:16
Show Gist options
  • Save jdeisenberg/592b9934c28581376ae88e9b4b4534cc to your computer and use it in GitHub Desktop.
Save jdeisenberg/592b9934c28581376ae88e9b4b4534cc to your computer and use it in GitHub Desktop.
open Array;
let concatStringArray = (arr : array(string)) : string =>
fold_left( (acc, item) => acc ++ item, "", arr);
let s = "operation";
let d = None;
let parsingResult = "something I parsed";
Js.log(concatStringArray ([|
"s:" ++ s ++ ", resulted in ",
switch d {
| None => "no date"
| Some(r) => Js.Date.toISOString(r)
},
", from ",
parsingResult |])
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment