diff --git a/docs/src/content/docs/book/maps.mdx b/docs/src/content/docs/book/maps.mdx index 4183465de..6823b034d 100644 --- a/docs/src/content/docs/book/maps.mdx +++ b/docs/src/content/docs/book/maps.mdx @@ -360,6 +360,21 @@ contract Example { } ``` +### Convert from a `Cell`, `.fromCell()` {#fromcell} + +

+ +To convert a [`Cell{:tact}`][cell] type back to a map, use the `.fromCell(){:tact}` [method](/book/functions#extension-function). + +```tact +// Suppose we have a Cell +let cell: Cell = ...; + +// And we want to initialize a map variable from it +let fizz: map = emptyMap(); +fizz.fromCell(cell); +``` + ### Traverse over entries {#traverse} To iterate over map entries there is a [`foreach{:tact}`](/book/statements#foreach-loop) loop statement: