F#: “Unexpected InFix” and “Incomplete value”

Dear Future Jamie:

If you are doing some pipe forwards like this:

  1. let createConcatRandomList = List.init 9 (fun _ -> randomNumberGenerator.Next(0,9))
  2.     |> Seq.map string
  3.     |> String.concat ""

 

and you are getting this:

image

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:

  1. let createConcatRandomList = List.init 9 (fun _ -> randomNumberGenerator.Next(0,9))
  2.                                 |> Seq.map string
  3.                                 |> String.concat ""

 

Love,

Current Jamie

 

PS: you really should exercise more…

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: