Variant types cannot be recursive in Liquidity. That means that it is not possible to define custom types like list or tree.
For list one can use built-in lists, of course, but I find it in general quite useful to be able to define custom recursive data types.
One use case for such types is an AST for a simple embedded DSL.
Variant types cannot be recursive in Liquidity. That means that it is not possible to define custom types like
listortree.For
listone can use built-in lists, of course, but I find it in general quite useful to be able to define custom recursive data types.One use case for such types is an AST for a simple embedded DSL.