# Data & function encoding

**URL:** <https://forum.anoma.net/t/data-function-encoding/719>\
**Category:** Protocol Design\
**Created:** [July 30, 2024, 12:14pm UTC](https://forum.anoma.net/t/data-function-encoding/719 "2024-07-30T12:14:58Z")\
**Posts on this page:** 1\
**Showing post:** 15

<div class="post-metadata">

**Author:** ![degregat](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.anoma.net/degregat/32/449_2.png) [@degregat](https://forum.anoma.net/u/degregat)\
**Post date:** [August 22, 2024, 1:36pm UTC](https://forum.anoma.net/t/data-function-encoding/719/15 "2024-08-22T13:36:32Z")

</div>

@cwgoes Do I understand correctly that we would build an option type as follows?

```auto
type SomeOptionT := CoproductT [SomeType, Nothing]

```

If we want to have option types, we probably want to include `Nothing`. For general ones, `Just` would also be useful.

Or do we have “|” s.t. we can just define further types, in the same sense that the basic definitions are introduced? If so, we should make that explicit.

---

_[View the full topic](https://forum.anoma.net/t/data-function-encoding/719)._
