We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3a91ebc commit 3744f53Copy full SHA for 3744f53
src/fsharp/FSharp.Core/string.fs
@@ -48,16 +48,17 @@ namespace Microsoft.FSharp.Core
48
String.Empty
49
else
50
let result = str.ToCharArray()
51
- let f = OptimizedClosures.FSharpFunc<_,_,_>.Adapt mapping
+ let f = OptimizedClosures.FSharpFunc<_,_,_>.Adapt(mapping)
52
53
// x2 unrolled loop gives 10-20% boost, overall 2.5x SB perf
54
let mutable i = 0
55
while i < len - len % 2 do
56
result.[i] <- f.Invoke(i, result.[i])
57
- result.[i + 1] <- f.Invoke(i, result.[i + 1])
58
- i <- i + 2
+ i <- i + 1
+ result.[i] <- f.Invoke(i, result.[i])
59
60
- if i % 2 = 1 then
61
+ if len % 2 = 1 then
62
63
64
new String(result)
0 commit comments