Define a class & create an instance


#1

Somehow this is a totally basic question … nonetheless I couldnt find any docs on it. in Ocaml you’d do something like this

class istack = object
     method pop = 1
 end ;;

 let s = new istack;;

How can I do this in ReasonML


#2
class istack = {
  as _;
  pub pop = 1;
};

let s = new istack;

you can use https://reasonml.github.io/en/try.html to convert between OCaml and ReasonML syntax