Skip to content

Commit

Permalink
update re syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
jchavarri committed Dec 9, 2023
1 parent 82f0751 commit ead7745
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/communicate-with-javascript.md
Original file line number Diff line number Diff line change
Expand Up @@ -1664,7 +1664,7 @@ let () = draw ~x:10 ~y:20 ~border:true ()
let () = draw ~x:10 ~y:20 ()
```
```reasonml
[@module "MyGame"]
[@mel.module "MyGame"]
external draw: (~x: int, ~y: int, ~border: bool=?, unit) => unit = "draw";
let () = draw(~x=10, ~y=20, ~border=true, ());
Expand Down Expand Up @@ -1700,7 +1700,7 @@ let () = draw ~x:10 ~y:20 ()
let () = draw ~y:20 ~x:10 ()
```
```reasonml
[@module "MyGame"]
[@mel.module "MyGame"]
external draw: (~x: int, ~y: int, ~border: bool=?, unit) => unit = "draw";
let () = draw(~x=10, ~y=20, ());
let () = draw(~y=20, ~x=10, ());
Expand Down Expand Up @@ -2771,7 +2771,7 @@ type pet = {name: string};
let pets = [|{name: "Brutus"}, {name: "Mochi"}|];
let () = pets->(Belt.Array.map(name))->(Js.Array2.joinWith("&"))->Js.log;
let () = pets->(Belt.Array.map(name))->(Js.Array.join(~sep="&"))->Js.log;
```

Melange will generate a function for each field defined in the record. In this
Expand Down

0 comments on commit ead7745

Please sign in to comment.