Search⌘ K

Exercise: The Calculator Object

Understand how to create a closed calculator object in ReasonML with public functions for basic arithmetic operations on floats. This exercise reinforces object creation, function implementation, and working with float parameters to strengthen your grasp of ReasonML's object concepts.

Problem Statement

In this exercise, you have to implement the calculator type and create the cal object from it. Your calculator will perform four basic tasks:

  • Addition

  • Subtraction ...