2 people like it.

Option.concat

Everyone else has a concat, so why not Option.

1: 
2: 
3: 
4: 
5: 
6: 
7: 
module Option
    
    open FSharpx.Option

    /// Accepts an option of option and concatenates them.
    let inline concat x = 
        x >>= id
Multiple items
module Option

--------------------
module Option

from Microsoft.FSharp.Core
namespace FSharpx
module Option

from FSharpx
val concat : x:'a option option -> 'a option

Full name: Option.concat


 Accepts an option of option and concatenates them.
val x : 'a option option
val id : x:'T -> 'T

Full name: Microsoft.FSharp.Core.Operators.id
Raw view Test code New version

More information

Link:http://fssnip.net/iM
Posted:10 years ago
Author:Simon Cousins
Tags: option