F#: Destructuring bind with a discriminated union
问题 open System let x = (1, 2) let (p, q) = x printfn "A %A" x printfn "B %A %A" p q let y = Some(1, 2) try let None = y () with | ex -> printfn "C %A" ex let Some(r, s) = y printfn "D %A" y // printfn "E %A %A" r s http://ideone.com/cS9bK0 When I uncomment the last line, the compiler rejects the code complaining /home/rRiy1O/prog.fs(16,19): error FS0039: The value or constructor 'r' is not defined /home/rRiy1O/prog.fs(16,21): error FS0039: The value or constructor 's' is not defined Is it not