how to unwrap union value in list in f#
discriminated-union, f#
Solution
The best way would be to use a function combined with `List.map` like so
let processFooList (foolist:Foo list ) = foolist |> List.map (function |Foo(t1,t2)->t1,t2)
Problem
You know that to unwrap a value of a single union type you have to do this: ``` type Foo = Foo of int*string let processFoo foo = let (Foo (t1,t2)) = foo printfn "%A %A" t1 t2 ``` but my question is: if there a way to do that for lists ?: ``` let processFooList (foolist:Foo list ) = let ??? = foolist // how to get a int*string list ... ``` thanks.