In this chapter, we’ll discuss two composite data types fundamental to ReScript: tuples and variants.
Tuples are sequences of multiple values, while variants represent a value that can be one of several possibilities. Tuples and variants belong to a class of data types called algebraic data types, which allows us to model and manipulate complex data cleanly and safely.
This chapter will also cover how exceptions work in ReScript – how to throw exceptions, how to handle exceptions, and how to define custom exceptions.
Finally, ...