()
| 249 | } |
| 250 | |
| 251 | func ExampleOption_Map_none() { |
| 252 | none := None[int]() |
| 253 | result := none.Map(func(i int) (int, bool) { |
| 254 | return 1234, true |
| 255 | }) |
| 256 | |
| 257 | fmt.Println(result.IsPresent(), result.OrEmpty()) |
| 258 | // Output: false 0 |
| 259 | } |
| 260 | |
| 261 | func ExampleOption_MapNone_some() { |
| 262 | some := Some(42) |