Hi all
I have the following code snippet:
let reqSecurity = (config: Config.env) =>
Security.query
|> Js.Promise.then_((p: Security.pool) => {
let url: string =
config.url ++ "/sink/resources/users/" ++ p.subject ++ "/coins";
let httpHeader =
Axios.makeConfigWithUrl(
~url,
~_method="GET",
~headers={"Authorization": "Bearer " ++ p.token},
(),
);
Axios.request(httpHeader);
});
The inline function ((p: Security.pool) => {
, when I would omit the parentheses, then the compiler complains. Why?
What is the difference between with and without parentheses?
Thanks