Closed inputusernamehere closed 3 years ago
The tutorial in question: https://fslab.org/content/tutorials/002_clustering_kMeans.html
After downloading the notebook and running it locally, I get a compilation error in this code snippet:
clusteredIrisData |> Seq.take 10 |> Seq.map (fun (a,b,c) -> sprintf "%i, %A, %A" a b c) |> String.concat "\n" |> String.concat "<br>" |> fun x -> x + "<br> ... "
Error: input.fsx (5,4)-(5,24) typecheck error The type 'string' is not compatible with the type 'seq<string>'.
Error: input.fsx (5,4)-(5,24) typecheck error The type 'string' is not compatible with the type 'seq<string>'
I suspect the two String.concats in a row are to blame.
String.concat
You're right, it should be:
clusteredIrisData |> Seq.take 10 |> Seq.map (fun (a,b,c) -> sprintf "%i, %A, %A" a b c) |> String.concat "\n" |> fun x -> x + "\n... "
It'll be fixed in a moment
The tutorial in question: https://fslab.org/content/tutorials/002_clustering_kMeans.html
After downloading the notebook and running it locally, I get a compilation error in this code snippet:
Error: input.fsx (5,4)-(5,24) typecheck error The type 'string' is not compatible with the type 'seq<string>'
.I suspect the two
String.concat
s in a row are to blame.