Ross Mellgren <dri...@gmail.com> writes:

> In your case, asLong is:
>
> def asLong(s: String): Box[Long]
>
> So if you used map:
>
> Full("1234").map(asLong) // result is Full(Full(1234)), because the  
> result of asLong went into the Full that map creates
>
> Conversely, flatMap removes a level of structure:
>
> Full("1234").flatMap(asLong) // result is Full(1234)
>
> Hope that helps,

It does, thanks!
-- 
                                Jim Wise
                                jw...@draga.com

Attachment: pgpob1HvlWv3g.pgp
Description: PGP signature

Reply via email to