code: public <T1,T2> Optional<T2> transformSome
              (final Optional<T1> optional,
               final Transformer<T1,T2> transformer)
          {
          final OptionalVisitor<Optional<T2>,T1> visitor =
                  new OptionalVisitor<Optional<T2>,T1> ()
              {
              public Optional<T2> visitNone
                      (final None<T1> none)
                  {
                  return new NoneImpl<T2> ();
                  }
  
              public Optional<T2> visitSome
                      (final Some<T1> some)
                  {
                  final T1 original = some.object ();
                  final T2 transformed = transformer.transform (original);
                  
                  return new SomeImpl<T2> (transformed);
                  }
              };
  
          return optional.accept (visitor);
          }
docs: {@inheritDoc}