public < R > Choice < R > transform ( final Function < ? super T , R > function ) { checkNotNull ( function ) ; final Choice < T > thisChoice = this ; return new Choice < R > ( ) { @ Override protected Iterator < R > iterator ( ) { return Iterators . transform ( thisChoice . iterator ( ) , function ) ; } } ; }
Maps the choices with the specified function .