Daniel

Texas

Apr
21
awarded Nice Answer
Apr
19
awarded Good Question
Mar
31
awarded Popular Question
Mar
21
awarded Good Answer
Mar
15
comment No parameterless constructor defined for this object error when using HttpPost in F# mvc 5
Adding the [<CLIMutable>] attribute to Product might do the trick.
Mar
3
comment Equivalent of Ruby's Enumerable#each_slice method in FSharp
Yes, it appears MSDN hasn't been updated for F# 4.0 (thus my link to the source code).
Mar
2
answered Equivalent of Ruby's Enumerable#each_slice method in FSharp
Mar
1
comment How to preserve value type in enum
Seems like a bug. You should file an issue on Github.
Feb
22
awarded Nice Question
Feb
16
comment How can I generate a dictionary from a list?
It creates a new function. dotnetfiddle.net/gbigsl
Feb
16
comment F# efficient way to convert Map into Dict (and vice versa)
It can be shortened to Seq.map (|KeyValue|) >> Map.ofSeq.
Feb
16
answered How can I generate a dictionary from a list?
Feb
11
comment Infer generic constraints with explicitly specified generic parameters
No, h still won't be generic, but removing g reveals the true behavior. I was just pointing out that the type parameter isn't being completely ignored.
Feb
11
answered Infer generic constraints with explicitly specified generic parameters
Feb
4
comment F#: Substitute to .Replace("oldValue","newValue")
If you combine this with FuleSnabel's isVowel function, it would be the best of both world's, IMO: String.collect (function c when isVowel c -> string c | c -> sprintf "%co%c" c c)
Jan
25
awarded Enlightened
Jan
20
comment F# code to check whether there are three same digits within a given number
It's not a compiler optimization. It's simply the behavior of IEnumerable<T>. It works the same in other .NET languages.
Jan
20
comment F# code to check whether there are three same digits within a given number
Once the first element passes filter, isEmpty will see it and return false. In the case isEmpty returns true, yes, the entire sequence will have been evaluated. But it would be no different with your snippet using exists.
Jan
20
comment F# code to check whether there are three same digits within a given number
@stt106: Actually, that isn't an improvement because sequences are evaluated lazily. That is, once an element makes it past Seq.filter and is evaluated by Seq.isEmpty, the expression returns.
Jan
13
comment F# - printfn Guid
Also, a third option: %O.
1 2 3 4 5