JuliaLang/julia — pull request #9446 by vchuravy (2014-12-23 22:27:16+00:00)
Title: [RFC] Map for Nullable

For me `Nullable` is very similar to the Option type used in functional languages. Most of the functional languages I encountered treat Option as a container with one array and define operations like map over it.

One possible way would be to define the iterator interface for `Nullable` thus allowing `for value in Nullable(value)` and all other method that depend on it. I personally see little to no value in that and thus only implemented the one operation that I find most useful: `map`

`map` over Nullables allows for using Nullable unaware function with Nullable values and codifies a common pattern.

This PR only implements `map` over a singular Nullable and for me the question is open whether a `map` for multiple Nullable has a well defined meaning and is useful.