Skip to content

ADT: variant to option_t

Would be equivalent to:

let output : option_t[T] = SOME(instance.VARIANT) when instance is VARIANT else NONE
  • the payload is instance.VARIANT
  • the tag is SOME when instance is VARIANT else NONE
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information