As in ES6's arrow functions I believe functions can be declared w/o the fun keyword:
let increment = fun (x) => x + 1;
/* should allowed to be written as */
let increment = (x) => x + 1;
@iddan you could always use this syntax:
let increment x => x + 1;
AWESOME!!! Is it in the docs? Couldn't find it.
@iddan yes it can be found here: https://facebook.github.io/reason/mlCompared.html#reason-and-ocaml-functions
@chenglou I think this is good to close.
There's not really a big need to document these features, as the user will learn about it about a single refmt! =)
@iddan try to refmt these two snippets too:
let foo = [%bs.obj {a: 1, b: "hello"}]
div foo::1 children::[] ()[@JSX]
@chenglou I don't think this is the right attitude. There should be a description of possibilities in the static docs in the site.
@iddan sorry if that came out wrong! But reducing the initial learning overhead and explicitly and lazily teach whatever the user needs through refmt is an actual goal of ours. Also because it's unclear to lots of people that refmt is "just" a formatter, but one that can freely change between equivalent syntaxes
Most helpful comment
@iddan sorry if that came out wrong! But reducing the initial learning overhead and explicitly and lazily teach whatever the user needs through refmt is an actual goal of ours. Also because it's unclear to lots of people that refmt is "just" a formatter, but one that can freely change between equivalent syntaxes