In F# what are these collection-looking things?
f#
Solution
`[a, b, c, d]` is a list with a single 4-tuple as element.
`[a; b; c; d]` is a four-element list.
`(a, b, c, d)` is a 4-tuple.
`[|a, b, c, d|]` is an array with a single 4-tuple as element.
`[|a; b; c; d|]` is a four-element array.
`a, b, c, d` is a 4-tuple.
`{ aa = 3; bb = 4 }` is a value of a record type with two fields `aa` and `bb`.
Problem
In F# there are many different collection-looking syntaxes that compile into something. What are they all, and what do they mean? ``` let s1 = [a, b, c, d] let s2 = [a; b; c; d] let s3 = (a, b, c, d) let s4 = (a, b, c, d) let s5 = [|a, b, c, d|] let s6 = [|a; b; c; d|] let s7 = a, b, c, d let s8 = { aa = 3; bb = 4 } ```