F#: “Unexpected InFix” and “Incomplete value”
September 24, 2013 1 Comment
Dear Future Jamie:
If you are doing some pipe forwards like this:
- let createConcatRandomList = List.init 9 (fun _ -> randomNumberGenerator.Next(0,9))
- |> Seq.map string
- |> String.concat ""
and you are getting this:
with the RSLA on the let saying:
Incomplete value or function definition. If this is in an expression, the body of the expression must be indented to the same column as the ‘let’ keyword.
and the RSLA on the |> saying:
Unexpected infix operator in binding. Expected incomplete structured construct at or before this point or other token.
Then your pipe is in the wrong place. Tab it over to inside the List like this:
- let createConcatRandomList = List.init 9 (fun _ -> randomNumberGenerator.Next(0,9))
- |> Seq.map string
- |> String.concat ""
Love,
Current Jamie
PS: you really should exercise more…
thanks man!