DEV Community

loading...

Discussion on: Optional chaining in Reason

Collapse
johnridesabike profile image
John Jackson Author • Edited

You are correct that either way would work. and is used for mutually recursive types. The only thing it does here is let us write our types in reverse order (so in this case, they’re not really mutually recursive).

reasonml.github.io/docs/en/more-on...

Being able use and to write nested type definitions “backwards” can look nice (IMO) when nesting a very large number of types.