Skip to content

Conversation

@phoenixeliot
Copy link
Contributor

The order of arguments in the output was swapped compared to what's correct; that's all.

The order of arguments in the output was swapped compared to what's correct; that's all.
@phoenixeliot
Copy link
Contributor Author

Sharing my sanity checking just in case it helps anyone else sanity check:
https://rescript-lang.org/try

let addCoordinates = (~x, ~y) => {
  j`${Belt.Int.toString(x)}, ${Belt.Int.toString(y)}`
}

Js.log(addCoordinates(~x=5, ~y=6))
Js.log(addCoordinates(~y=6, ~x=5))

produces

function addCoordinates(x, y) {
  return String(x) + ", " + String(y);
}

console.log(addCoordinates(5, 6));
console.log(addCoordinates(5, 6));

exports.addCoordinates = addCoordinates;

@bobzhang bobzhang merged commit 3b49dab into rescript-lang:master Jan 13, 2021
@bobzhang
Copy link
Member

@phoenixeliot thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants