Skip to content

Latest commit

 

History

History
40 lines (29 loc) · 640 Bytes

language_module.mdx

File metadata and controls

40 lines (29 loc) · 640 Bytes
idkeywordsnamesummarycategory
module
module
module
This is the `module` keyword.
languageconstructs

module is used to define a scoped block of code that may contain types, let bindings, nested modules, etc.

Example

<CodeTab labels={["ReScript", "JS Output"]}>

modulePoint3D= { typepoint= (float, float, float) letmake= (x, y, z) => (x, y, z) } letorigin=Point3D.make(0.0, 0.0, 0.0)
functionmake(x,y,z){return[x,y,z];}varPoint3D={make: make,};varorigin=[0.0,0.0,0.0];

References

close