---
layout: ../../../layouts/DocsLayout.astro
title: Magic methods
---
import Code from "../../../components/Code.astro"

# Magic methods

Don't get special treatment.

<Code thpcode={`

class Cat
{
    pub fun __sleep() -> Array[String]
    {
        // logic
    }
}

`} />


<Code thpcode={`
val option = Some("GAAA")
val Some(value) = option

val colors = Array("red", "green", "blue")
val Array()
`} />
