# List/dictionary of a type within a type? Or alternative?

**URL:** <https://forum.dfinity.org/t/list-dictionary-of-a-type-within-a-type-or-alternative/703>\
**Category:** Language Support\
**Tags:** Motoko, Education\
**Created:** [May 27, 2020, 8:12am UTC](https://forum.dfinity.org/t/list-dictionary-of-a-type-within-a-type-or-alternative/703 "2020-05-27T08:12:30Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![cryptoschindler](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/cryptoschindler/32/26_2.png) [@cryptoschindler](https://forum.dfinity.org/u/cryptoschindler)\
**Post date:** [May 27, 2020, 9:12am UTC](https://forum.dfinity.org/t/list-dictionary-of-a-type-within-a-type-or-alternative/703/3 "2020-05-27T09:12:57Z")

</div>

It is a bit weird though, as I think I remember this has worked before. Looking at this old post Enzo’s and my examples seem to do the same thing:

> [@How to declare a variable variant type and compare variants?](https://forum.dfinity.org/t/how-to-declare-a-variable-variant-type-and-compare-variants/517):
>
> I declared the following types: type cell = { #dead; #alive}; type universe = { width : Nat; height : Nat; cells : [var cell] }; var universe1 : universe ={ width = 4; height = 4; cells = [var #dead, #alive, #alive, #dead, #dead, #alive, #alive, #alive, #dead, #dead, #dead, #dead, #alive, #alive, #alive ,#dead]; var universe2 : universe ={ width = …

[EDIT]: I updated the above example, what I oversaw was the `var` keyword when initalizing an object!

---

_[View the full topic](https://forum.dfinity.org/t/list-dictionary-of-a-type-within-a-type-or-alternative/703)._
