``` sealed class Option<out A> { fun h(): ...
# arrow
r
Copy code
sealed class Option<out A> {
  fun h(): Option<Int> {
    val x : Kind<ForOption, Int> = None
    val y = x
    return y
  }

  fun <B> map(f: (A) -> B): Option<B> =
    when (this) {
      is None -> None
      is Some -> Some(f(a))
    }
}