DEV Community

Discussion on: Async await like syntax, without ppx in Rescript !!!

Collapse
 
praveenkumarrr profile image
Praveen • Edited

You can think of it like an assignment statement.
let a = await fetchAuthorById(1) // Js
~a=fetchAuthorById(1)
More importantly, the labels are used as keys in the object that is being passed into the next function. Next function can access previous result with arg["a"]. It helps to remind at which key the result is stored.