I have a side-effective operation
securities |> Seq.map (fun x -> request.Append("securities",x))
What is the most idiomatic way to have the code perform ?
I wrote a Seq.Doit, but it itches
module Seq =
let Doit sa = sa |> Seq.toArray |> ignore
Deferred sequences are used when you create sequences using
Seq.delayor sequence expression seq{}. Any function on sequence returning any datatype other thanseqcan force computation.Alternatively, you can use
forloop instead ofSeq.iter:If you want to hide side effects and return
requestfor later use,Seq.foldis a good choice: