i simplify following block of code rid of let
expression
let jsonfeed = feed |> fbjson.parse jsonfeed.data |> seq.head |> ispromotion triggerinterval |> getdecision
instead pipe way through right feed
. how specify data
member passed seq.head
?
this done lambda-expression:
feed |> fbjson.parse |> (fun f -> f.data) |> seq.head |> ispromotion triggerinterval |> getdecision
that said, don't understand desire rid of let
. if you're worried polluting namespace, can hide within nested block:
let decision = let feeddata = feed |> fbjson.parse feeddata.data |> seq.head |> ispromotion triggerinterval |> getdecision
Comments
Post a Comment