I propose we make this consistent:
let f = Seq.head
let a = f { 1..6 }
let b = f { 1; 2 } // error FS0740: Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq { ... }'
Now we don't have to allocate entire lists or arrays just to make sets.
let a = set { 1..6 }
let b = set { 1; 2 } // error FS0740: Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq { ... }'
The existing way of approaching this problem in F# is
let a = set { 1..6 }
let b = set (seq { 1; 2 })
Pros and Cons
The advantages of making this adjustment to F# are
- Consistency
- Convenience
- Less allocation
The disadvantage of making this adjustment to F# is that this may cause confusion as set here isn't a computation expression. However, syntax can be quickly learnt.
Extra information
Estimated cost (XS, S, M, L, XL, XXL): S
Related suggestions: (put links to related suggestions here)
Affidavit (please submit!)
Please tick this by placing a cross in the box:
Please tick all that apply:
For Readers
If you would like to see this issue implemented, please click the 👍 emoji on this issue. These counts are used to generally order the suggestions by engagement.
I propose we make this consistent:
Now we don't have to allocate entire lists or arrays just to make sets.
The existing way of approaching this problem in F# is
Pros and Cons
The advantages of making this adjustment to F# are
The disadvantage of making this adjustment to F# is that this may cause confusion as
sethere isn't a computation expression. However, syntax can be quickly learnt.Extra information
Estimated cost (XS, S, M, L, XL, XXL): S
Related suggestions: (put links to related suggestions here)
Affidavit (please submit!)
Please tick this by placing a cross in the box:
Please tick all that apply:
For Readers
If you would like to see this issue implemented, please click the 👍 emoji on this issue. These counts are used to generally order the suggestions by engagement.