s.Split(' ') returns an array, let's call it a; |> pipes a to Seq.fold as its first argument Seq.fold takes an input collection, a folding function (in this case solve, its signature is on line 2), and an initial value for the accumulator (items), which is the empty array [] Seq.fold gets called with arguments: a solve [] Seq.fold returns the the accumulator, which is an array, and calling Head on it gets the first value, the number that results from applying the operation, because that's all we store in it. Just for people that might be struggling.
thank you, good sir, for this great introduction to f#. exciting times ahead!
s.Split(' ') returns an array, let's call it a;
|> pipes a to Seq.fold as its first argument
Seq.fold takes an input collection, a folding function (in this case solve, its signature is on line 2), and an initial value for the accumulator (items), which is the empty array []
Seq.fold gets called with arguments: a solve []
Seq.fold returns the the accumulator, which is an array, and calling Head on it gets the first value, the number that results from applying the operation, because that's all we store in it.
Just for people that might be struggling.
I am definitely going to start practice some F# seriously.
How did it go? A year had passed ;)
How did it go? Two years had passed ;)
How did it go? 4 years have passed ;)
guys leave the poor guy alone. :)
How did it go? 5 years had passed ;)
This is great.