diff --git a/src/FSharpAux.Core/String.fs b/src/FSharpAux.Core/String.fs index 1d33d4f..d8c987c 100644 --- a/src/FSharpAux.Core/String.fs +++ b/src/FSharpAux.Core/String.fs @@ -121,11 +121,9 @@ module String = | Lower _ when not takeUpper -> consume from takeUpper (i + 1) | Upper _ when takeUpper -> consume from takeUpper (i + 1) | _ -> - let r1 = struct (from, i) - let r2 = restart i seq { - yield r1 - yield! r2 } + yield struct (from, i) + yield! restart i } // Split string into segments and turn them to PascalCase seq { for i1, i2 in restart 0 do