By the way, which is better — Java way with None and Some declared as one class (Optional), or Scala way with sealed class (actually, three classes instead of one)?
I have single-class Either implementation, bit it has extra flag which says whether it is left or right.