Skip to Main Content
Introducing ReScript: Functional Programming for Web Applications
book

Introducing ReScript: Functional Programming for Web Applications

by Danny Yang
December 2022
Intermediate to advanced content levelIntermediate to advanced
281 pages
3h 36m
English
Apress
Content preview from Introducing ReScript: Functional Programming for Web Applications
© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2023
D. YangIntroducing ReScripthttps://doi.org/10.1007/978-1-4842-8888-7_7

7. Modules

Danny Yang1  
(1)
Mountain View, CA, USA
 

Modules are groupings of functions and type definitions that allow us to organize and reuse code in complex programs. Every file in ReScript is its own module, but we can also define our own modules inside of files.

Modules and module signatures are very important for writing software in ReScript, because they serve several key purposes:
  • Namespacing – Modules allow the programmer to differentiate between functions/bindings with the same name declared in different places (e.g., Belt.Array.map, Js.Array2.map, Js.Array.map). This allows the ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Web Development with Clojure, 3rd Edition

Web Development with Clojure, 3rd Edition

Dmitri Sotnikov, Scot Brown
React Cookbook

React Cookbook

David Griffiths, Dawn Griffiths

Publisher Resources

ISBN: 9781484288887Purchase LinkPublisher Website