tag:blogger.com,1999:blog-11200164.post4261005533582558812..comments2023-09-19T05:02:58.359-04:00Comments on Nirav's Contemplations: Tackling nulls the functional wayNirav Thakerhttp://www.blogger.com/profile/07204297663478577248noreply@blogger.comBlogger1125tag:blogger.com,1999:blog-11200164.post-53044066494516562762010-12-20T05:43:03.796-05:002010-12-20T05:43:03.796-05:00In practice deep option types are not a big proble...In practice deep option types are not a big problem.<br /><br />In your example, the type Option[List[Option[String]]], is the type of maybe a list that contains maybe strings.<br /><br />The type is redundant in most models, as the type List[Option[String]] in itself contains the case of an empty list. And you may even consider this type redundant compared to List[String], because if the value is None in most models it will just not be in the list.<br /><br />It is trivial to reduce these forms by flatMap'ping the identity function.Runenoreply@blogger.com