In case I have to disassemble a data type as its variable size, can I still use the “match and with, and if the answer is yes you could help me figure out how (I’m a beginner with this language), or do I or use other methods.
the type defined is this :
type 'state formula =
| And of 'state formula list
| Or of 'state formula list
| Literal of bool
| Variable of 'state
from the examples I’ve seen the “match and with” is used when the structure of the static type was, in my case as I do?
So here’s an example which uses
matchto work with your formula type: