Quick actions

cmd+k|ctrl+k

Navigation

Languages

Seq With Escaping Exceptions

Snippet info

Language

Fsharp

Visibility

public

Author

mjg.py3

Created

2018-09-29T02:31:26Z

Updated

2018-09-29T02:31:26Z

let getTheThings (): int seq =
  try
    Seq.map (fun _ -> failwith "bad stuff") [42]
  with
    | _ ->
      Seq.singleton 99

printfn "%A" (getTheThings () |> Seq.head)
INFO