You can add this yourself fairly easily by adding the following anywhere in your code:
let map = Map.ofList
and then your first code sample works
3 votesplanned · Adminfsharporg-lang (F# Software Foundation Language Group, F# Software Foundation) responded
This is approved for inclusion in a future release of F# subject to completion of an RFC and implementation.
An RFC can be submitted to https://github.com/fsharp/FSharpLangDesign/tree/master/RFCs
A pull request to implement this feature will be necessary and we encourage contributors to submit one with adequate design detail and testing to http://github.com/Microsoft/visualfsharp.
Discussion of the particular version for this to be included in can be made once an implementation is available.
Posted an issue on the fsharp/FSharp.Compiler.Service repository over on GitHub here:
Don Syme suggested either moving it to the Microsoft/VisualFSharp repository as a bug or posting it as a feature request here, and seeing as it's already mentioned here, I'll tag along for the ride.
Adding my +3 for the time-being :)
@Sergey I agree that alternative looks a bit clunky, but it can be rearranged enough that I'm happy with it:
let f : int -> int -> int =
fun x y -> x * y
It feels a little odd not adding a full indentation level, but the second line only needs one extra space (or tab, if you're one of those) beyond the indentation for the signature line; with just one space it still feels like the fun line is still part of the function header, without requiring the body of the code to gain another indentation level.amazingant shared this idea ·