Added some example uses of flatmap for option and list types
Added Java versions of example flatmap usages and refined other examples