@glutinum/cli 0.13.0 → 0.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -1
- package/dist/Glutinum.Converter/Abbreviations.js +246 -0
- package/dist/Glutinum.Converter/FsharpAST.js +87 -28
- package/dist/Glutinum.Converter/Generate.js +55 -8
- package/dist/Glutinum.Converter/GlueAST.js +333 -34
- package/dist/Glutinum.Converter/Log.js +7 -8
- package/dist/Glutinum.Converter/Merge.js +683 -31
- package/dist/Glutinum.Converter/Packages.js +308 -0
- package/dist/Glutinum.Converter/Printer.js +323 -186
- package/dist/Glutinum.Converter/Read.js +279 -6
- package/dist/Glutinum.Converter/Reader/ClassDeclaration.js +13 -7
- package/dist/Glutinum.Converter/Reader/Declaration.js +102 -17
- package/dist/Glutinum.Converter/Reader/Documentation.js +168 -73
- package/dist/Glutinum.Converter/Reader/EnumDeclaration.js +7 -51
- package/dist/Glutinum.Converter/Reader/ExportAssignment.js +64 -15
- package/dist/Glutinum.Converter/Reader/ExportDeclaration.js +165 -0
- package/dist/Glutinum.Converter/Reader/FunctionDeclaration.js +30 -5
- package/dist/Glutinum.Converter/Reader/IndexedAccessType.js +122 -4
- package/dist/Glutinum.Converter/Reader/InterfaceDeclaration.js +83 -7
- package/dist/Glutinum.Converter/Reader/MappedTypeNode.js +8 -8
- package/dist/Glutinum.Converter/Reader/ModuleDeclaration.js +11 -9
- package/dist/Glutinum.Converter/Reader/NamedTupleMember.js +3 -2
- package/dist/Glutinum.Converter/Reader/Node.js +24 -10
- package/dist/Glutinum.Converter/Reader/Parameters.js +110 -7
- package/dist/Glutinum.Converter/Reader/Report.js +31 -12
- package/dist/Glutinum.Converter/Reader/TypeAliasDeclaration.js +4 -3
- package/dist/Glutinum.Converter/Reader/TypeNode.js +1524 -253
- package/dist/Glutinum.Converter/Reader/TypeOperatorNode.js +75 -20
- package/dist/Glutinum.Converter/Reader/TypeParameters.js +8 -5
- package/dist/Glutinum.Converter/Reader/TypeQueryNode.js +184 -50
- package/dist/Glutinum.Converter/Reader/TypeScriptReader.js +32 -13
- package/dist/Glutinum.Converter/Reader/Types.js +180 -0
- package/dist/Glutinum.Converter/Reader/UnionTypeNode.js +99 -43
- package/dist/Glutinum.Converter/Reader/Utils.js +1143 -55
- package/dist/Glutinum.Converter/Reader/VariableStatement.js +59 -14
- package/dist/Glutinum.Converter/Transform.js +8292 -1119
- package/dist/Glutinum.Converter/TypeScript.Extensions.js +3 -3
- package/dist/Glutinum.Converter/TypeScript.js +3 -3
- package/dist/Glutinum.Converter/Utils/Keywords.js +6 -6
- package/dist/Glutinum.Converter/Utils/List.js +3 -3
- package/dist/Glutinum.Converter/Utils/Naming.js +61 -12
- package/dist/Glutinum.Converter/Utils/String.js +7 -3
- package/dist/Program.js +230 -72
- package/dist/fable_modules/Fable.Promise.3.2.1/AsyncIterable.fs +89 -0
- package/dist/fable_modules/{Fable.Promise.3.2.0 → Fable.Promise.3.2.1}/AsyncIterable.fs.js +29 -29
- package/dist/fable_modules/Fable.Promise.3.2.1/Fable.Promise.fableproj +25 -0
- package/dist/fable_modules/{Fable.Promise.3.2.0 → Fable.Promise.3.2.1}/Promise.fs +842 -766
- package/dist/fable_modules/{Fable.Promise.3.2.0 → Fable.Promise.3.2.1}/Promise.fs.js +26 -12
- package/dist/fable_modules/{Fable.Promise.3.2.0 → Fable.Promise.3.2.1}/PromiseImpl.fs +31 -31
- package/dist/fable_modules/{Fable.Promise.3.2.0 → Fable.Promise.3.2.1}/PromiseImpl.fs.js +5 -5
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/Array.fs +235 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/Array.fs.js +384 -0
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AssemblyInfo.fs +4 -4
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/Async.fs +89 -9
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/Async.fs.js +13 -12
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncOption.fs +50 -4
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncOptionCE.fs +30 -39
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncOptionCE.fs.js +10 -10
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncResult.fs +52 -8
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncResultCE.fs +26 -42
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncResultCE.fs.js +3 -3
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncResultOption.fs +17 -5
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/AsyncResultOption.fs.js +26 -0
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncResultOptionCE.fs +31 -33
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncResultOptionCE.fs.js +3 -3
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncValidation.fs +1 -6
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncValidationCE.fs +10 -18
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncValidationCE.fs.js +3 -3
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/FsToolkit.ErrorHandling.fableproj +69 -0
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/List.fs +68 -10
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/List.fs.js +47 -41
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/Nullness.fs +81 -0
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/Option.fs +133 -2
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/OptionCE.fs +139 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/OptionCE.fs.js +48 -0
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/OptionOp.fs +3 -3
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/ParallelAsyncResult.fs +88 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/ParallelAsyncResult.fs.js +30 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/ParallelAsyncResultCE.fs +200 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/ParallelAsyncResultCE.fs.js +18 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/ParallelAsyncValidation.fs +34 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/ParallelAsyncValidationCE.fs +244 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/ParallelAsyncValidationCE.fs.js +18 -0
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/Result.fs +87 -0
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/Result.fs.js +8 -8
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/ResultCE.fs +8 -23
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/ResultCE.fs.js +5 -5
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/ResultOption.fs +1 -1
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/ResultOption.fs.js +10 -10
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/ResultOptionCE.fs +7 -18
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/ResultOptionCE.fs.js +3 -3
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/Seq.fs +503 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/Seq.fs.js +295 -0
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/Validation.fs +0 -5
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/ValidationCE.fs +7 -13
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/ValidationCE.fs.js +3 -3
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/ValueOption.fs +1 -4
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/ValueTaskValueOption.fs +102 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/ValueTaskValueOptionCE.fs +587 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/ValueTaskValueOptionOp.fs +10 -0
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/obj/Debug/netstandard2.1/FsToolkit.ErrorHandling.AssemblyInfo.fs +3 -3
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/obj/Release/net9.0/.NETCoreApp,Version=v9.0.AssemblyAttributes.fs +3 -0
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0/obj/Release/netstandard2.1 → FsToolkit.ErrorHandling.5.2.0/obj/Release/net9.0}/FsToolkit.ErrorHandling.AssemblyInfo.fs +4 -4
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/obj/Release/netstandard2.0/FsToolkit.ErrorHandling.AssemblyInfo.fs +4 -4
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/obj/Release/netstandard2.1/FsToolkit.ErrorHandling.AssemblyInfo.fs +20 -0
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Array.js +192 -86
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Async.js +58 -53
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/AsyncBuilder.js +29 -8
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/BigInt.js +71 -46
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/BitConverter.js +2 -2
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Boolean.js +4 -3
- package/dist/fable_modules/fable-library-js.5.17.2/CHANGELOG.md +348 -0
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Char.js +64 -31
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Choice.js +2 -2
- package/dist/fable_modules/fable-library-js.5.17.2/CollectionUtil.js +182 -0
- package/dist/fable_modules/fable-library-js.5.17.2/ConditionalWeakTable.js +21 -0
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Date.js +197 -112
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/DateOffset.js +46 -62
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/DateOnly.js +6 -6
- package/dist/fable_modules/fable-library-js.5.17.2/DateOnlyTemporal.js +146 -0
- package/dist/fable_modules/fable-library-js.5.17.2/DateTimeFormat.js +523 -0
- package/dist/fable_modules/fable-library-js.5.17.2/DateTimeOffsetTemporal.js +283 -0
- package/dist/fable_modules/fable-library-js.5.17.2/DateTimeTemporal.js +243 -0
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Decimal.js +39 -13
- package/dist/fable_modules/fable-library-js.5.17.2/Directory.js +11 -0
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Double.js +10 -3
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Encoding.js +20 -8
- package/dist/fable_modules/fable-library-js.5.17.2/Environment.js +3 -0
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Event.js +10 -1
- package/dist/fable_modules/fable-library-js.5.17.2/FSharp.Collections.js +45 -0
- package/dist/fable_modules/fable-library-js.5.17.2/FSharp.Core.js +156 -0
- package/dist/fable_modules/fable-library-js.5.17.2/File.js +27 -0
- package/dist/fable_modules/fable-library-js.5.17.2/Global.js +29 -0
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Guid.js +33 -12
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Int32.js +17 -17
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/List.js +170 -106
- package/dist/fable_modules/fable-library-js.5.17.2/Long.js +38 -0
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/MailboxProcessor.js +13 -6
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Map.js +65 -61
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/MapUtil.js +22 -4
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/MutableMap.js +28 -16
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/MutableSet.js +7 -7
- package/dist/fable_modules/fable-library-js.5.17.2/Native.js +14 -0
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Numeric.js +44 -3
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Observable.js +5 -3
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Option.js +11 -20
- package/dist/fable_modules/fable-library-js.5.17.2/Path.js +31 -0
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Random.js +22 -20
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Range.js +12 -12
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Reflection.js +50 -22
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/RegExp.js +68 -30
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Result.js +6 -6
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Seq.js +229 -104
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Seq2.js +1 -1
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Set.js +153 -113
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/String.js +238 -50
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/System.Collections.Generic.js +30 -14
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/System.Text.js +69 -31
- package/dist/fable_modules/fable-library-js.5.17.2/System.js +289 -0
- package/dist/fable_modules/fable-library-js.5.17.2/Task.js +27 -0
- package/dist/fable_modules/fable-library-js.5.17.2/TaskBuilder.js +72 -0
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/TimeOnly.js +6 -6
- package/dist/fable_modules/fable-library-js.5.17.2/TimeOnlyTemporal.js +142 -0
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/TimeSpan.js +18 -15
- package/dist/fable_modules/fable-library-js.5.17.2/TimeSpanTemporal.js +259 -0
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Types.js +14 -24
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Uri.js +44 -21
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Util.js +49 -12
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/lib/big.js +14 -11
- package/dist/fable_modules/fable-library-js.5.17.2/package.json +24 -0
- package/dist/fable_modules/fable-library-js.5.17.2/quotation.js +682 -0
- package/package.json +4 -4
- package/src/Glutinum.Converter/js/bootstrap.js +109 -2
- package/src/Glutinum.Converter/js/host.js +144 -0
- package/src/Glutinum.Converter/js/npm.js +137 -0
- package/src/Glutinum.Converter/js/resolve.js +402 -0
- package/dist/Glutinum.Converter/FsharpAST.js.map +0 -1
- package/dist/Glutinum.Converter/Generate.js.map +0 -1
- package/dist/Glutinum.Converter/GlueAST.js.map +0 -1
- package/dist/Glutinum.Converter/Log.js.map +0 -1
- package/dist/Glutinum.Converter/Merge.js.map +0 -1
- package/dist/Glutinum.Converter/Printer.js.map +0 -1
- package/dist/Glutinum.Converter/Read.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/ClassDeclaration.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/Declaration.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/Documentation.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/EnumDeclaration.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/ExportAssignment.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/FunctionDeclaration.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/IndexedAccessType.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/InterfaceDeclaration.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/MappedTypeNode.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/ModuleDeclaration.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/NamedTupleMember.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/Node.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/Parameters.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/Report.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/TypeAliasDeclaration.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/TypeNode.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/TypeOperatorNode.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/TypeParameters.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/TypeQueryNode.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/TypeScriptReader.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/UnionTypeNode.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/Utils.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/VariableStatement.js.map +0 -1
- package/dist/Glutinum.Converter/Transform.js.map +0 -1
- package/dist/Glutinum.Converter/TypeScript.Extensions.js.map +0 -1
- package/dist/Glutinum.Converter/TypeScript.js.map +0 -1
- package/dist/Glutinum.Converter/Utils/Keywords.js.map +0 -1
- package/dist/Glutinum.Converter/Utils/List.js.map +0 -1
- package/dist/Glutinum.Converter/Utils/Naming.js.map +0 -1
- package/dist/Glutinum.Converter/Utils/String.js.map +0 -1
- package/dist/Program.js.map +0 -1
- package/dist/fable_modules/Fable.Promise.3.2.0/AsyncIterable.fs +0 -57
- package/dist/fable_modules/Fable.Promise.3.2.0/AsyncIterable.fs.js.map +0 -1
- package/dist/fable_modules/Fable.Promise.3.2.0/Fable.Promise.fableproj +0 -20
- package/dist/fable_modules/Fable.Promise.3.2.0/Promise.fs.js.map +0 -1
- package/dist/fable_modules/Fable.Promise.3.2.0/PromiseImpl.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Async.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncOptionCE.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultCE.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOption.fs.js +0 -26
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOption.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOptionCE.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncValidationCE.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/FsToolkit.ErrorHandling.fableproj +0 -51
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/List.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/OptionCE.fs +0 -186
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/OptionCE.fs.js +0 -18
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/OptionCE.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Result.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultCE.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOption.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOptionCE.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Seq.fs +0 -19
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Seq.fs.js +0 -31
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Seq.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Shims.fs +0 -22
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Shims.fs.js +0 -18
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Shims.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValidationCE.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValueOptionCE.fs +0 -165
- package/dist/fable_modules/fable-library-js.4.14.0/Array.d.ts +0 -123
- package/dist/fable_modules/fable-library-js.4.14.0/Async.d.ts +0 -32
- package/dist/fable_modules/fable-library-js.4.14.0/AsyncBuilder.d.ts +0 -59
- package/dist/fable_modules/fable-library-js.4.14.0/BigInt.d.ts +0 -115
- package/dist/fable_modules/fable-library-js.4.14.0/BitConverter.d.ts +0 -27
- package/dist/fable_modules/fable-library-js.4.14.0/Boolean.d.ts +0 -3
- package/dist/fable_modules/fable-library-js.4.14.0/CHANGELOG.md +0 -37
- package/dist/fable_modules/fable-library-js.4.14.0/Char.d.ts +0 -65
- package/dist/fable_modules/fable-library-js.4.14.0/Choice.d.ts +0 -121
- package/dist/fable_modules/fable-library-js.4.14.0/Date.d.ts +0 -70
- package/dist/fable_modules/fable-library-js.4.14.0/DateOffset.d.ts +0 -63
- package/dist/fable_modules/fable-library-js.4.14.0/DateOnly.d.ts +0 -18
- package/dist/fable_modules/fable-library-js.4.14.0/Decimal.d.ts +0 -45
- package/dist/fable_modules/fable-library-js.4.14.0/Double.d.ts +0 -11
- package/dist/fable_modules/fable-library-js.4.14.0/Encoding.d.ts +0 -12
- package/dist/fable_modules/fable-library-js.4.14.0/Event.d.ts +0 -31
- package/dist/fable_modules/fable-library-js.4.14.0/FSharp.Collections.d.ts +0 -7
- package/dist/fable_modules/fable-library-js.4.14.0/FSharp.Collections.js +0 -27
- package/dist/fable_modules/fable-library-js.4.14.0/FSharp.Core.CompilerServices.d.ts +0 -12
- package/dist/fable_modules/fable-library-js.4.14.0/FSharp.Core.d.ts +0 -17
- package/dist/fable_modules/fable-library-js.4.14.0/FSharp.Core.js +0 -69
- package/dist/fable_modules/fable-library-js.4.14.0/Global.d.ts +0 -24
- package/dist/fable_modules/fable-library-js.4.14.0/Global.js +0 -8
- package/dist/fable_modules/fable-library-js.4.14.0/Guid.d.ts +0 -10
- package/dist/fable_modules/fable-library-js.4.14.0/Int32.d.ts +0 -28
- package/dist/fable_modules/fable-library-js.4.14.0/List.d.ts +0 -143
- package/dist/fable_modules/fable-library-js.4.14.0/Long.d.ts +0 -3
- package/dist/fable_modules/fable-library-js.4.14.0/Long.js +0 -46
- package/dist/fable_modules/fable-library-js.4.14.0/MailboxProcessor.d.ts +0 -25
- package/dist/fable_modules/fable-library-js.4.14.0/Map.d.ts +0 -178
- package/dist/fable_modules/fable-library-js.4.14.0/MapUtil.d.ts +0 -10
- package/dist/fable_modules/fable-library-js.4.14.0/MutableMap.d.ts +0 -52
- package/dist/fable_modules/fable-library-js.4.14.0/MutableSet.d.ts +0 -39
- package/dist/fable_modules/fable-library-js.4.14.0/Native.d.ts +0 -2
- package/dist/fable_modules/fable-library-js.4.14.0/Native.js +0 -8
- package/dist/fable_modules/fable-library-js.4.14.0/Numeric.d.ts +0 -19
- package/dist/fable_modules/fable-library-js.4.14.0/Observable.d.ts +0 -32
- package/dist/fable_modules/fable-library-js.4.14.0/Option.d.ts +0 -28
- package/dist/fable_modules/fable-library-js.4.14.0/Random.d.ts +0 -37
- package/dist/fable_modules/fable-library-js.4.14.0/Range.d.ts +0 -12
- package/dist/fable_modules/fable-library-js.4.14.0/Reflection.d.ts +0 -119
- package/dist/fable_modules/fable-library-js.4.14.0/RegExp.d.ts +0 -10
- package/dist/fable_modules/fable-library-js.4.14.0/Result.d.ts +0 -37
- package/dist/fable_modules/fable-library-js.4.14.0/Seq.d.ts +0 -165
- package/dist/fable_modules/fable-library-js.4.14.0/Seq2.d.ts +0 -18
- package/dist/fable_modules/fable-library-js.4.14.0/Set.d.ts +0 -190
- package/dist/fable_modules/fable-library-js.4.14.0/String.d.ts +0 -50
- package/dist/fable_modules/fable-library-js.4.14.0/System.Collections.Generic.d.ts +0 -79
- package/dist/fable_modules/fable-library-js.4.14.0/System.Text.d.ts +0 -38
- package/dist/fable_modules/fable-library-js.4.14.0/SystemException.d.ts +0 -5
- package/dist/fable_modules/fable-library-js.4.14.0/SystemException.js +0 -5
- package/dist/fable_modules/fable-library-js.4.14.0/TimeOnly.d.ts +0 -15
- package/dist/fable_modules/fable-library-js.4.14.0/TimeSpan.d.ts +0 -34
- package/dist/fable_modules/fable-library-js.4.14.0/Timer.d.ts +0 -19
- package/dist/fable_modules/fable-library-js.4.14.0/Types.d.ts +0 -58
- package/dist/fable_modules/fable-library-js.4.14.0/Unicode.13.0.0.d.ts +0 -2
- package/dist/fable_modules/fable-library-js.4.14.0/Uri.d.ts +0 -29
- package/dist/fable_modules/fable-library-js.4.14.0/Util.d.ts +0 -207
- package/dist/fable_modules/fable-library-js.4.14.0/lib/big.d.ts +0 -5
- package/dist/fable_modules/fable-library-js.4.14.0/package.json +0 -24
- package/dist/fable_modules/project_cracked.json +0 -1
- /package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncOptionOp.fs +0 -0
- /package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncResultOp.fs +0 -0
- /package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncResultOptionOp.fs +0 -0
- /package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncValidationOp.fs +0 -0
- /package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/ResultOp.fs +0 -0
- /package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/ResultOptionOp.fs +0 -0
- /package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/ValidationOp.fs +0 -0
- /package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/obj/Debug/netstandard2.1/.NETStandard,Version=v2.1.AssemblyAttributes.fs +0 -0
- /package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/obj/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +0 -0
- /package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/obj/Release/netstandard2.1/.NETStandard,Version=v2.1.AssemblyAttributes.fs +0 -0
- /package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/FSharp.Core.CompilerServices.js +0 -0
- /package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/README.md +0 -0
- /package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Timer.js +0 -0
- /package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Unicode.13.0.0.js +0 -0
- /package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/big.d.ts +0 -0
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { isArrayLike, Exception, defaultOf, toIterator, compare, structuralHash, equals, disposeSafe, getEnumerator } from "./Util.js";
|
|
2
|
+
import { Record, toString } from "./Types.js";
|
|
2
3
|
import { defaultArg, some, value as value_1 } from "./Option.js";
|
|
3
|
-
import { disposeSafe, isArrayLike, defaultOf, toIterator, getEnumerator, compare, structuralHash, equals } from "./Util.js";
|
|
4
|
-
import { Record } from "./Types.js";
|
|
5
4
|
import { class_type, record_type, option_type } from "./Reflection.js";
|
|
6
5
|
import { SR_inputSequenceTooLong, SR_inputSequenceEmpty, SR_inputMustBeNonNegative, SR_notEnoughElements, SR_differentLengths, SR_keyNotFoundAlt, SR_indexOutOfBounds, SR_inputWasEmpty } from "./Global.js";
|
|
7
|
-
import {
|
|
6
|
+
import { KeyNotFoundException_$ctor_Z721C83C5 } from "./System.Collections.Generic.js";
|
|
7
|
+
import { randomSampleBy as randomSampleBy_1, randomChoicesBy as randomChoicesBy_1, randomChoiceBy as randomChoiceBy_1, randomShuffleInPlaceBy, transpose as transpose_1, splitInto as splitInto_1, windowed as windowed_1, pairwise as pairwise_1, chunkBySize as chunkBySize_1, map as map_1, permute as permute_1, tryFindIndexBack as tryFindIndexBack_1, tryFindBack as tryFindBack_1, scanBack as scanBack_1, item as item_1, foldBack2 as foldBack2_1, foldBack as foldBack_1, setItem, fill } from "./Array.js";
|
|
8
|
+
import { nonSeeded } from "./Random.js";
|
|
8
9
|
export class FSharpList extends Record {
|
|
9
10
|
constructor(head, tail) {
|
|
10
11
|
super();
|
|
@@ -13,14 +14,29 @@ export class FSharpList extends Record {
|
|
|
13
14
|
}
|
|
14
15
|
toString() {
|
|
15
16
|
const xs = this;
|
|
16
|
-
|
|
17
|
+
let result = "[";
|
|
18
|
+
let first = true;
|
|
19
|
+
const enumerator = getEnumerator(xs);
|
|
20
|
+
try {
|
|
21
|
+
while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
|
|
22
|
+
let x = undefined, matchValue = undefined, s = undefined;
|
|
23
|
+
const x_1 = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
|
|
24
|
+
result = ((first ? result : (result + "; ")) + ((x = x_1, (matchValue = x, (typeof matchValue === "string") ? ((s = matchValue, ("\"" + s) + "\"")) : toString(x)))));
|
|
25
|
+
first = false;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
finally {
|
|
29
|
+
disposeSafe(enumerator);
|
|
30
|
+
}
|
|
31
|
+
return result + "]";
|
|
17
32
|
}
|
|
18
33
|
Equals(other) {
|
|
19
34
|
const xs = this;
|
|
20
35
|
if (xs === other) {
|
|
21
36
|
return true;
|
|
22
37
|
}
|
|
23
|
-
else {
|
|
38
|
+
else if (other instanceof FSharpList) {
|
|
39
|
+
const ys = other;
|
|
24
40
|
const loop = (xs_1_mut, ys_1_mut) => {
|
|
25
41
|
loop: while (true) {
|
|
26
42
|
const xs_1 = xs_1_mut, ys_1 = ys_1_mut;
|
|
@@ -52,7 +68,10 @@ export class FSharpList extends Record {
|
|
|
52
68
|
break;
|
|
53
69
|
}
|
|
54
70
|
};
|
|
55
|
-
return loop(xs,
|
|
71
|
+
return loop(xs, ys);
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
return false;
|
|
56
75
|
}
|
|
57
76
|
}
|
|
58
77
|
GetHashCode() {
|
|
@@ -87,39 +106,45 @@ export class FSharpList extends Record {
|
|
|
87
106
|
}
|
|
88
107
|
CompareTo(other) {
|
|
89
108
|
const xs = this;
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
109
|
+
if (other instanceof FSharpList) {
|
|
110
|
+
const ys = other;
|
|
111
|
+
const loop = (xs_1_mut, ys_1_mut) => {
|
|
112
|
+
loop: while (true) {
|
|
113
|
+
const xs_1 = xs_1_mut, ys_1 = ys_1_mut;
|
|
114
|
+
const matchValue = xs_1.tail;
|
|
115
|
+
const matchValue_1 = ys_1.tail;
|
|
116
|
+
if (matchValue != null) {
|
|
117
|
+
if (matchValue_1 != null) {
|
|
118
|
+
const xt = value_1(matchValue);
|
|
119
|
+
const yt = value_1(matchValue_1);
|
|
120
|
+
const c = compare(xs_1.head, ys_1.head) | 0;
|
|
121
|
+
if (c === 0) {
|
|
122
|
+
xs_1_mut = xt;
|
|
123
|
+
ys_1_mut = yt;
|
|
124
|
+
continue loop;
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
return c | 0;
|
|
128
|
+
}
|
|
104
129
|
}
|
|
105
130
|
else {
|
|
106
|
-
return
|
|
131
|
+
return 1;
|
|
107
132
|
}
|
|
108
133
|
}
|
|
134
|
+
else if (matchValue_1 != null) {
|
|
135
|
+
return -1;
|
|
136
|
+
}
|
|
109
137
|
else {
|
|
110
|
-
return
|
|
138
|
+
return 0;
|
|
111
139
|
}
|
|
140
|
+
break;
|
|
112
141
|
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
break;
|
|
120
|
-
}
|
|
121
|
-
};
|
|
122
|
-
return loop(xs, other) | 0;
|
|
142
|
+
};
|
|
143
|
+
return loop(xs, ys) | 0;
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
return 1;
|
|
147
|
+
}
|
|
123
148
|
}
|
|
124
149
|
GetEnumerator() {
|
|
125
150
|
const xs = this;
|
|
@@ -178,7 +203,7 @@ export function ListEnumerator$1_$ctor_3002E699(xs) {
|
|
|
178
203
|
return new ListEnumerator$1(xs);
|
|
179
204
|
}
|
|
180
205
|
export function FSharpList_get_Empty() {
|
|
181
|
-
return new FSharpList(defaultOf(),
|
|
206
|
+
return new FSharpList(defaultOf(), undefined);
|
|
182
207
|
}
|
|
183
208
|
export function FSharpList_Cons_305B8EAC(x, xs) {
|
|
184
209
|
return new FSharpList(x, xs);
|
|
@@ -210,7 +235,7 @@ export function FSharpList__get_Head(xs) {
|
|
|
210
235
|
return xs.head;
|
|
211
236
|
}
|
|
212
237
|
else {
|
|
213
|
-
throw new
|
|
238
|
+
throw new Exception(SR_inputWasEmpty + " (Parameter \'list\')");
|
|
214
239
|
}
|
|
215
240
|
}
|
|
216
241
|
export function FSharpList__get_Tail(xs) {
|
|
@@ -219,7 +244,7 @@ export function FSharpList__get_Tail(xs) {
|
|
|
219
244
|
return value_1(matchValue);
|
|
220
245
|
}
|
|
221
246
|
else {
|
|
222
|
-
throw new
|
|
247
|
+
throw new Exception(SR_inputWasEmpty + " (Parameter \'list\')");
|
|
223
248
|
}
|
|
224
249
|
}
|
|
225
250
|
export function FSharpList__get_Item_Z524259A4(xs, index) {
|
|
@@ -228,17 +253,18 @@ export function FSharpList__get_Item_Z524259A4(xs, index) {
|
|
|
228
253
|
const i = i_mut, xs_1 = xs_1_mut;
|
|
229
254
|
const matchValue = xs_1.tail;
|
|
230
255
|
if (matchValue != null) {
|
|
256
|
+
const t = value_1(matchValue);
|
|
231
257
|
if (i === index) {
|
|
232
258
|
return xs_1.head;
|
|
233
259
|
}
|
|
234
260
|
else {
|
|
235
261
|
i_mut = (i + 1);
|
|
236
|
-
xs_1_mut =
|
|
262
|
+
xs_1_mut = t;
|
|
237
263
|
continue loop;
|
|
238
264
|
}
|
|
239
265
|
}
|
|
240
266
|
else {
|
|
241
|
-
throw new
|
|
267
|
+
throw new Exception(SR_indexOutOfBounds + " (Parameter \'index\')");
|
|
242
268
|
}
|
|
243
269
|
break;
|
|
244
270
|
}
|
|
@@ -246,7 +272,7 @@ export function FSharpList__get_Item_Z524259A4(xs, index) {
|
|
|
246
272
|
return loop(0, xs);
|
|
247
273
|
}
|
|
248
274
|
export function indexNotFound() {
|
|
249
|
-
throw
|
|
275
|
+
throw KeyNotFoundException_$ctor_Z721C83C5(SR_keyNotFoundAlt);
|
|
250
276
|
}
|
|
251
277
|
export function empty() {
|
|
252
278
|
return FSharpList_get_Empty();
|
|
@@ -261,14 +287,14 @@ export function isEmpty(xs) {
|
|
|
261
287
|
return FSharpList__get_IsEmpty(xs);
|
|
262
288
|
}
|
|
263
289
|
export function length(xs) {
|
|
264
|
-
return FSharpList__get_Length(xs);
|
|
290
|
+
return FSharpList__get_Length(xs) | 0;
|
|
265
291
|
}
|
|
266
292
|
export function head(xs) {
|
|
267
293
|
return FSharpList__get_Head(xs);
|
|
268
294
|
}
|
|
269
295
|
export function tryHead(xs) {
|
|
270
296
|
if (FSharpList__get_IsEmpty(xs)) {
|
|
271
|
-
return
|
|
297
|
+
return undefined;
|
|
272
298
|
}
|
|
273
299
|
else {
|
|
274
300
|
return some(FSharpList__get_Head(xs));
|
|
@@ -281,7 +307,7 @@ export function tryLast(xs_mut) {
|
|
|
281
307
|
tryLast: while (true) {
|
|
282
308
|
const xs = xs_mut;
|
|
283
309
|
if (FSharpList__get_IsEmpty(xs)) {
|
|
284
|
-
return
|
|
310
|
+
return undefined;
|
|
285
311
|
}
|
|
286
312
|
else {
|
|
287
313
|
const t = FSharpList__get_Tail(xs);
|
|
@@ -299,7 +325,7 @@ export function tryLast(xs_mut) {
|
|
|
299
325
|
export function last(xs) {
|
|
300
326
|
const matchValue = tryLast(xs);
|
|
301
327
|
if (matchValue == null) {
|
|
302
|
-
throw new
|
|
328
|
+
throw new Exception(SR_inputWasEmpty);
|
|
303
329
|
}
|
|
304
330
|
else {
|
|
305
331
|
return value_1(matchValue);
|
|
@@ -403,15 +429,15 @@ export function fold2(folder, state, xs, ys) {
|
|
|
403
429
|
export function foldBack2(folder, xs, ys, state) {
|
|
404
430
|
return foldBack2_1(folder, toArray(xs), toArray(ys), state);
|
|
405
431
|
}
|
|
406
|
-
export function unfold(
|
|
432
|
+
export function unfold(generator, state) {
|
|
407
433
|
const loop = (acc_mut, node_mut) => {
|
|
408
|
-
let t;
|
|
409
434
|
loop: while (true) {
|
|
410
435
|
const acc = acc_mut, node = node_mut;
|
|
411
|
-
|
|
436
|
+
let t = undefined;
|
|
437
|
+
const matchValue = generator(acc);
|
|
412
438
|
if (matchValue != null) {
|
|
413
439
|
acc_mut = value_1(matchValue)[1];
|
|
414
|
-
node_mut = ((t = (new FSharpList(value_1(matchValue)[0],
|
|
440
|
+
node_mut = ((t = (new FSharpList(value_1(matchValue)[0], undefined)), (node.tail = t, t)));
|
|
415
441
|
continue loop;
|
|
416
442
|
}
|
|
417
443
|
else {
|
|
@@ -429,12 +455,12 @@ export function unfold(gen, state) {
|
|
|
429
455
|
export function iterate(action, xs) {
|
|
430
456
|
fold((unitVar, x) => {
|
|
431
457
|
action(x);
|
|
432
|
-
},
|
|
458
|
+
}, undefined, xs);
|
|
433
459
|
}
|
|
434
460
|
export function iterate2(action, xs, ys) {
|
|
435
461
|
fold2((unitVar, x, y) => {
|
|
436
462
|
action(x, y);
|
|
437
|
-
},
|
|
463
|
+
}, undefined, xs, ys);
|
|
438
464
|
}
|
|
439
465
|
export function iterateIndexed(action, xs) {
|
|
440
466
|
fold((i, x) => {
|
|
@@ -462,7 +488,6 @@ export function ofArray(xs) {
|
|
|
462
488
|
return ofArrayWithTail(xs, FSharpList_get_Empty());
|
|
463
489
|
}
|
|
464
490
|
export function ofSeq(xs) {
|
|
465
|
-
let xs_3, t;
|
|
466
491
|
if (isArrayLike(xs)) {
|
|
467
492
|
return ofArray(xs);
|
|
468
493
|
}
|
|
@@ -475,8 +500,9 @@ export function ofSeq(xs) {
|
|
|
475
500
|
const enumerator = getEnumerator(xs);
|
|
476
501
|
try {
|
|
477
502
|
while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
|
|
503
|
+
let xs_3 = undefined, t = undefined;
|
|
478
504
|
const x = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
|
|
479
|
-
node = ((xs_3 = node, (t = (new FSharpList(x,
|
|
505
|
+
node = ((xs_3 = node, (t = (new FSharpList(x, undefined)), (xs_3.tail = t, t))));
|
|
480
506
|
}
|
|
481
507
|
}
|
|
482
508
|
finally {
|
|
@@ -493,7 +519,7 @@ export function concat(lists) {
|
|
|
493
519
|
let node = root;
|
|
494
520
|
const action = (xs) => {
|
|
495
521
|
node = fold((acc, x) => {
|
|
496
|
-
const t = new FSharpList(x,
|
|
522
|
+
const t = new FSharpList(x, undefined);
|
|
497
523
|
acc.tail = t;
|
|
498
524
|
return t;
|
|
499
525
|
}, node, xs);
|
|
@@ -522,17 +548,17 @@ export function concat(lists) {
|
|
|
522
548
|
return FSharpList__get_Tail(root);
|
|
523
549
|
}
|
|
524
550
|
export function scan(folder, state, xs) {
|
|
525
|
-
let xs_4, t_2;
|
|
526
551
|
const root = FSharpList_get_Empty();
|
|
527
552
|
let node;
|
|
528
|
-
const t = new FSharpList(state,
|
|
553
|
+
const t = new FSharpList(state, undefined);
|
|
529
554
|
root.tail = t;
|
|
530
555
|
node = t;
|
|
531
556
|
let acc = state;
|
|
532
557
|
let xs_3 = xs;
|
|
533
558
|
while (!FSharpList__get_IsEmpty(xs_3)) {
|
|
559
|
+
let xs_4 = undefined, t_2 = undefined;
|
|
534
560
|
acc = folder(acc, FSharpList__get_Head(xs_3));
|
|
535
|
-
node = ((xs_4 = node, (t_2 = (new FSharpList(acc,
|
|
561
|
+
node = ((xs_4 = node, (t_2 = (new FSharpList(acc, undefined)), (xs_4.tail = t_2, t_2))));
|
|
536
562
|
xs_3 = FSharpList__get_Tail(xs_3);
|
|
537
563
|
}
|
|
538
564
|
const xs_6 = node;
|
|
@@ -547,14 +573,14 @@ export function append(xs, ys) {
|
|
|
547
573
|
return fold((acc, x) => FSharpList_Cons_305B8EAC(x, acc), ys, reverse(xs));
|
|
548
574
|
}
|
|
549
575
|
export function collect(mapping, xs) {
|
|
550
|
-
let xs_1, t;
|
|
551
576
|
const root = FSharpList_get_Empty();
|
|
552
577
|
let node = root;
|
|
553
578
|
let ys = xs;
|
|
554
579
|
while (!FSharpList__get_IsEmpty(ys)) {
|
|
555
580
|
let zs = mapping(FSharpList__get_Head(ys));
|
|
556
581
|
while (!FSharpList__get_IsEmpty(zs)) {
|
|
557
|
-
|
|
582
|
+
let xs_1 = undefined, t = undefined;
|
|
583
|
+
node = ((xs_1 = node, (t = (new FSharpList(FSharpList__get_Head(zs), undefined)), (xs_1.tail = t, t))));
|
|
558
584
|
zs = FSharpList__get_Tail(zs);
|
|
559
585
|
}
|
|
560
586
|
ys = FSharpList__get_Tail(ys);
|
|
@@ -567,7 +593,7 @@ export function collect(mapping, xs) {
|
|
|
567
593
|
export function mapIndexed(mapping, xs) {
|
|
568
594
|
const root = FSharpList_get_Empty();
|
|
569
595
|
const node = foldIndexed((i, acc, x) => {
|
|
570
|
-
const t = new FSharpList(mapping(i, x),
|
|
596
|
+
const t = new FSharpList(mapping(i, x), undefined);
|
|
571
597
|
acc.tail = t;
|
|
572
598
|
return t;
|
|
573
599
|
}, root, xs);
|
|
@@ -578,7 +604,7 @@ export function mapIndexed(mapping, xs) {
|
|
|
578
604
|
export function map(mapping, xs) {
|
|
579
605
|
const root = FSharpList_get_Empty();
|
|
580
606
|
const node = fold((acc, x) => {
|
|
581
|
-
const t = new FSharpList(mapping(x),
|
|
607
|
+
const t = new FSharpList(mapping(x), undefined);
|
|
582
608
|
acc.tail = t;
|
|
583
609
|
return t;
|
|
584
610
|
}, root, xs);
|
|
@@ -592,7 +618,7 @@ export function indexed(xs) {
|
|
|
592
618
|
export function map2(mapping, xs, ys) {
|
|
593
619
|
const root = FSharpList_get_Empty();
|
|
594
620
|
const node = fold2((acc, x, y) => {
|
|
595
|
-
const t = new FSharpList(mapping(x, y),
|
|
621
|
+
const t = new FSharpList(mapping(x, y), undefined);
|
|
596
622
|
acc.tail = t;
|
|
597
623
|
return t;
|
|
598
624
|
}, root, xs, ys);
|
|
@@ -602,15 +628,15 @@ export function map2(mapping, xs, ys) {
|
|
|
602
628
|
}
|
|
603
629
|
export function mapIndexed2(mapping, xs, ys) {
|
|
604
630
|
const loop = (i_mut, acc_mut, xs_1_mut, ys_1_mut) => {
|
|
605
|
-
let t;
|
|
606
631
|
loop: while (true) {
|
|
607
632
|
const i = i_mut, acc = acc_mut, xs_1 = xs_1_mut, ys_1 = ys_1_mut;
|
|
633
|
+
let t = undefined;
|
|
608
634
|
if (FSharpList__get_IsEmpty(xs_1) ? true : FSharpList__get_IsEmpty(ys_1)) {
|
|
609
635
|
return acc;
|
|
610
636
|
}
|
|
611
637
|
else {
|
|
612
638
|
i_mut = (i + 1);
|
|
613
|
-
acc_mut = ((t = (new FSharpList(mapping(i, FSharpList__get_Head(xs_1), FSharpList__get_Head(ys_1)),
|
|
639
|
+
acc_mut = ((t = (new FSharpList(mapping(i, FSharpList__get_Head(xs_1), FSharpList__get_Head(ys_1)), undefined)), (acc.tail = t, t)));
|
|
614
640
|
xs_1_mut = FSharpList__get_Tail(xs_1);
|
|
615
641
|
ys_1_mut = FSharpList__get_Tail(ys_1);
|
|
616
642
|
continue loop;
|
|
@@ -626,14 +652,14 @@ export function mapIndexed2(mapping, xs, ys) {
|
|
|
626
652
|
}
|
|
627
653
|
export function map3(mapping, xs, ys, zs) {
|
|
628
654
|
const loop = (acc_mut, xs_1_mut, ys_1_mut, zs_1_mut) => {
|
|
629
|
-
let t;
|
|
630
655
|
loop: while (true) {
|
|
631
656
|
const acc = acc_mut, xs_1 = xs_1_mut, ys_1 = ys_1_mut, zs_1 = zs_1_mut;
|
|
657
|
+
let t = undefined;
|
|
632
658
|
if ((FSharpList__get_IsEmpty(xs_1) ? true : FSharpList__get_IsEmpty(ys_1)) ? true : FSharpList__get_IsEmpty(zs_1)) {
|
|
633
659
|
return acc;
|
|
634
660
|
}
|
|
635
661
|
else {
|
|
636
|
-
acc_mut = ((t = (new FSharpList(mapping(FSharpList__get_Head(xs_1), FSharpList__get_Head(ys_1), FSharpList__get_Head(zs_1)),
|
|
662
|
+
acc_mut = ((t = (new FSharpList(mapping(FSharpList__get_Head(xs_1), FSharpList__get_Head(ys_1), FSharpList__get_Head(zs_1)), undefined)), (acc.tail = t, t)));
|
|
637
663
|
xs_1_mut = FSharpList__get_Tail(xs_1);
|
|
638
664
|
ys_1_mut = FSharpList__get_Tail(ys_1);
|
|
639
665
|
zs_1_mut = FSharpList__get_Tail(zs_1);
|
|
@@ -651,9 +677,9 @@ export function map3(mapping, xs, ys, zs) {
|
|
|
651
677
|
export function mapFold(mapping, state, xs) {
|
|
652
678
|
const root = FSharpList_get_Empty();
|
|
653
679
|
const patternInput_1 = fold((tupledArg, x) => {
|
|
654
|
-
let t;
|
|
680
|
+
let t = undefined;
|
|
655
681
|
const patternInput = mapping(tupledArg[1], x);
|
|
656
|
-
return [(t = (new FSharpList(patternInput[0],
|
|
682
|
+
return [(t = (new FSharpList(patternInput[0], undefined)), (tupledArg[0].tail = t, t)), patternInput[1]];
|
|
657
683
|
}, [root, state], xs);
|
|
658
684
|
const t_2 = FSharpList_get_Empty();
|
|
659
685
|
patternInput_1[0].tail = t_2;
|
|
@@ -667,7 +693,7 @@ export function tryPick(f, xs) {
|
|
|
667
693
|
loop: while (true) {
|
|
668
694
|
const xs_1 = xs_1_mut;
|
|
669
695
|
if (FSharpList__get_IsEmpty(xs_1)) {
|
|
670
|
-
return
|
|
696
|
+
return undefined;
|
|
671
697
|
}
|
|
672
698
|
else {
|
|
673
699
|
const matchValue = f(FSharpList__get_Head(xs_1));
|
|
@@ -694,7 +720,7 @@ export function pick(f, xs) {
|
|
|
694
720
|
}
|
|
695
721
|
}
|
|
696
722
|
export function tryFind(f, xs) {
|
|
697
|
-
return tryPick((x) => (f(x) ? some(x) :
|
|
723
|
+
return tryPick((x) => (f(x) ? some(x) : undefined), xs);
|
|
698
724
|
}
|
|
699
725
|
export function find(f, xs) {
|
|
700
726
|
const matchValue = tryFind(f, xs);
|
|
@@ -722,7 +748,7 @@ export function tryFindIndex(f, xs) {
|
|
|
722
748
|
loop: while (true) {
|
|
723
749
|
const i = i_mut, xs_1 = xs_1_mut;
|
|
724
750
|
if (FSharpList__get_IsEmpty(xs_1)) {
|
|
725
|
-
return
|
|
751
|
+
return undefined;
|
|
726
752
|
}
|
|
727
753
|
else if (f(FSharpList__get_Head(xs_1))) {
|
|
728
754
|
return i;
|
|
@@ -765,7 +791,7 @@ export function tryItem(n, xs) {
|
|
|
765
791
|
loop: while (true) {
|
|
766
792
|
const i = i_mut, xs_1 = xs_1_mut;
|
|
767
793
|
if (FSharpList__get_IsEmpty(xs_1)) {
|
|
768
|
-
return
|
|
794
|
+
return undefined;
|
|
769
795
|
}
|
|
770
796
|
else if (i === n) {
|
|
771
797
|
return some(FSharpList__get_Head(xs_1));
|
|
@@ -787,7 +813,7 @@ export function filter(f, xs) {
|
|
|
787
813
|
const root = FSharpList_get_Empty();
|
|
788
814
|
const node = fold((acc, x) => {
|
|
789
815
|
if (f(x)) {
|
|
790
|
-
const t = new FSharpList(x,
|
|
816
|
+
const t = new FSharpList(x, undefined);
|
|
791
817
|
acc.tail = t;
|
|
792
818
|
return t;
|
|
793
819
|
}
|
|
@@ -804,14 +830,14 @@ export function partition(f, xs) {
|
|
|
804
830
|
const root2 = FSharpList_get_Empty();
|
|
805
831
|
const root1 = matchValue;
|
|
806
832
|
const patternInput_1 = fold((tupledArg, x) => {
|
|
807
|
-
let t, t_2;
|
|
833
|
+
let t = undefined, t_2 = undefined;
|
|
808
834
|
const lacc = tupledArg[0];
|
|
809
835
|
const racc = tupledArg[1];
|
|
810
836
|
if (f(x)) {
|
|
811
|
-
return [(t = (new FSharpList(x,
|
|
837
|
+
return [(t = (new FSharpList(x, undefined)), (lacc.tail = t, t)), racc];
|
|
812
838
|
}
|
|
813
839
|
else {
|
|
814
|
-
return [lacc, (t_2 = (new FSharpList(x,
|
|
840
|
+
return [lacc, (t_2 = (new FSharpList(x, undefined)), (racc.tail = t_2, t_2))];
|
|
815
841
|
}
|
|
816
842
|
}, [root1, root2], xs);
|
|
817
843
|
const t_4 = FSharpList_get_Empty();
|
|
@@ -828,7 +854,7 @@ export function choose(f, xs) {
|
|
|
828
854
|
return acc;
|
|
829
855
|
}
|
|
830
856
|
else {
|
|
831
|
-
const t = new FSharpList(value_1(matchValue),
|
|
857
|
+
const t = new FSharpList(value_1(matchValue), undefined);
|
|
832
858
|
acc.tail = t;
|
|
833
859
|
return t;
|
|
834
860
|
}
|
|
@@ -841,11 +867,11 @@ export function contains(value, xs, eq) {
|
|
|
841
867
|
return tryFindIndex((v) => eq.Equals(value, v), xs) != null;
|
|
842
868
|
}
|
|
843
869
|
export function initialize(n, f) {
|
|
844
|
-
let xs, t;
|
|
845
870
|
const root = FSharpList_get_Empty();
|
|
846
871
|
let node = root;
|
|
847
872
|
for (let i = 0; i <= (n - 1); i++) {
|
|
848
|
-
|
|
873
|
+
let xs = undefined, t = undefined;
|
|
874
|
+
node = ((xs = node, (t = (new FSharpList(f(i), undefined)), (xs.tail = t, t))));
|
|
849
875
|
}
|
|
850
876
|
const xs_2 = node;
|
|
851
877
|
const t_2 = FSharpList_get_Empty();
|
|
@@ -857,7 +883,7 @@ export function replicate(n, x) {
|
|
|
857
883
|
}
|
|
858
884
|
export function reduce(f, xs) {
|
|
859
885
|
if (FSharpList__get_IsEmpty(xs)) {
|
|
860
|
-
throw new
|
|
886
|
+
throw new Exception(SR_inputWasEmpty);
|
|
861
887
|
}
|
|
862
888
|
else {
|
|
863
889
|
return fold(f, head(xs), tail(xs));
|
|
@@ -865,7 +891,7 @@ export function reduce(f, xs) {
|
|
|
865
891
|
}
|
|
866
892
|
export function reduceBack(f, xs) {
|
|
867
893
|
if (FSharpList__get_IsEmpty(xs)) {
|
|
868
|
-
throw new
|
|
894
|
+
throw new Exception(SR_inputWasEmpty);
|
|
869
895
|
}
|
|
870
896
|
else {
|
|
871
897
|
return foldBack(f, tail(xs), head(xs));
|
|
@@ -885,7 +911,7 @@ export function exists2(f_mut, xs_mut, ys_mut) {
|
|
|
885
911
|
const f = f_mut, xs = xs_mut, ys = ys_mut;
|
|
886
912
|
const matchValue = FSharpList__get_IsEmpty(xs);
|
|
887
913
|
const matchValue_1 = FSharpList__get_IsEmpty(ys);
|
|
888
|
-
let matchResult;
|
|
914
|
+
let matchResult = undefined;
|
|
889
915
|
if (matchValue) {
|
|
890
916
|
if (matchValue_1) {
|
|
891
917
|
matchResult = 0;
|
|
@@ -914,7 +940,7 @@ export function exists2(f_mut, xs_mut, ys_mut) {
|
|
|
914
940
|
continue exists2;
|
|
915
941
|
}
|
|
916
942
|
default:
|
|
917
|
-
throw new
|
|
943
|
+
throw new Exception(SR_differentLengths + " (Parameter \'list2\')");
|
|
918
944
|
}
|
|
919
945
|
break;
|
|
920
946
|
}
|
|
@@ -937,16 +963,16 @@ export function sortWith(comparer, xs) {
|
|
|
937
963
|
return ofArray(arr);
|
|
938
964
|
}
|
|
939
965
|
export function sort(xs, comparer) {
|
|
940
|
-
return sortWith((x, y) => comparer.Compare(x, y), xs);
|
|
966
|
+
return sortWith((x, y) => (comparer.Compare(x, y) | 0), xs);
|
|
941
967
|
}
|
|
942
968
|
export function sortBy(projection, xs, comparer) {
|
|
943
|
-
return sortWith((x, y) => comparer.Compare(projection(x), projection(y)), xs);
|
|
969
|
+
return sortWith((x, y) => (comparer.Compare(projection(x), projection(y)) | 0), xs);
|
|
944
970
|
}
|
|
945
971
|
export function sortDescending(xs, comparer) {
|
|
946
|
-
return sortWith((x, y) => (comparer.Compare(x, y) * -1), xs);
|
|
972
|
+
return sortWith((x, y) => ((comparer.Compare(x, y) * -1) | 0), xs);
|
|
947
973
|
}
|
|
948
974
|
export function sortByDescending(projection, xs, comparer) {
|
|
949
|
-
return sortWith((x, y) => (comparer.Compare(projection(x), projection(y)) * -1), xs);
|
|
975
|
+
return sortWith((x, y) => ((comparer.Compare(projection(x), projection(y)) * -1) | 0), xs);
|
|
950
976
|
}
|
|
951
977
|
export function sum(xs, adder) {
|
|
952
978
|
return fold((acc, x) => adder.Add(acc, x), adder.GetZero(), xs);
|
|
@@ -993,8 +1019,8 @@ export function allPairs(xs, ys) {
|
|
|
993
1019
|
let node = root;
|
|
994
1020
|
iterate((x) => {
|
|
995
1021
|
iterate((y) => {
|
|
996
|
-
let xs_1, t;
|
|
997
|
-
node = ((xs_1 = node, (t = (new FSharpList([x, y],
|
|
1022
|
+
let xs_1 = undefined, t = undefined;
|
|
1023
|
+
node = ((xs_1 = node, (t = (new FSharpList([x, y], undefined)), (xs_1.tail = t, t))));
|
|
998
1024
|
}, ys);
|
|
999
1025
|
}, xs);
|
|
1000
1026
|
const xs_3 = node;
|
|
@@ -1009,7 +1035,7 @@ export function skip(count_mut, xs_mut) {
|
|
|
1009
1035
|
return xs;
|
|
1010
1036
|
}
|
|
1011
1037
|
else if (FSharpList__get_IsEmpty(xs)) {
|
|
1012
|
-
throw new
|
|
1038
|
+
throw new Exception(SR_notEnoughElements + " (Parameter \'list\')");
|
|
1013
1039
|
}
|
|
1014
1040
|
else {
|
|
1015
1041
|
count_mut = (count - 1);
|
|
@@ -1038,21 +1064,21 @@ export function skipWhile(predicate_mut, xs_mut) {
|
|
|
1038
1064
|
}
|
|
1039
1065
|
export function take(count, xs) {
|
|
1040
1066
|
if (count < 0) {
|
|
1041
|
-
throw new
|
|
1067
|
+
throw new Exception(SR_inputMustBeNonNegative + " (Parameter \'count\')");
|
|
1042
1068
|
}
|
|
1043
1069
|
const loop = (i_mut, acc_mut, xs_1_mut) => {
|
|
1044
|
-
let t;
|
|
1045
1070
|
loop: while (true) {
|
|
1046
1071
|
const i = i_mut, acc = acc_mut, xs_1 = xs_1_mut;
|
|
1072
|
+
let t = undefined;
|
|
1047
1073
|
if (i <= 0) {
|
|
1048
1074
|
return acc;
|
|
1049
1075
|
}
|
|
1050
1076
|
else if (FSharpList__get_IsEmpty(xs_1)) {
|
|
1051
|
-
throw new
|
|
1077
|
+
throw new Exception(SR_notEnoughElements + " (Parameter \'list\')");
|
|
1052
1078
|
}
|
|
1053
1079
|
else {
|
|
1054
1080
|
i_mut = (i - 1);
|
|
1055
|
-
acc_mut = ((t = (new FSharpList(FSharpList__get_Head(xs_1),
|
|
1081
|
+
acc_mut = ((t = (new FSharpList(FSharpList__get_Head(xs_1), undefined)), (acc.tail = t, t)));
|
|
1056
1082
|
xs_1_mut = FSharpList__get_Tail(xs_1);
|
|
1057
1083
|
continue loop;
|
|
1058
1084
|
}
|
|
@@ -1067,9 +1093,9 @@ export function take(count, xs) {
|
|
|
1067
1093
|
}
|
|
1068
1094
|
export function takeWhile(predicate, xs) {
|
|
1069
1095
|
const loop = (acc_mut, xs_1_mut) => {
|
|
1070
|
-
let t;
|
|
1071
1096
|
loop: while (true) {
|
|
1072
1097
|
const acc = acc_mut, xs_1 = xs_1_mut;
|
|
1098
|
+
let t = undefined;
|
|
1073
1099
|
if (FSharpList__get_IsEmpty(xs_1)) {
|
|
1074
1100
|
return acc;
|
|
1075
1101
|
}
|
|
@@ -1077,7 +1103,7 @@ export function takeWhile(predicate, xs) {
|
|
|
1077
1103
|
return acc;
|
|
1078
1104
|
}
|
|
1079
1105
|
else {
|
|
1080
|
-
acc_mut = ((t = (new FSharpList(FSharpList__get_Head(xs_1),
|
|
1106
|
+
acc_mut = ((t = (new FSharpList(FSharpList__get_Head(xs_1), undefined)), (acc.tail = t, t)));
|
|
1081
1107
|
xs_1_mut = FSharpList__get_Tail(xs_1);
|
|
1082
1108
|
continue loop;
|
|
1083
1109
|
}
|
|
@@ -1092,9 +1118,9 @@ export function takeWhile(predicate, xs) {
|
|
|
1092
1118
|
}
|
|
1093
1119
|
export function truncate(count, xs) {
|
|
1094
1120
|
const loop = (i_mut, acc_mut, xs_1_mut) => {
|
|
1095
|
-
let t;
|
|
1096
1121
|
loop: while (true) {
|
|
1097
1122
|
const i = i_mut, acc = acc_mut, xs_1 = xs_1_mut;
|
|
1123
|
+
let t = undefined;
|
|
1098
1124
|
if (i <= 0) {
|
|
1099
1125
|
return acc;
|
|
1100
1126
|
}
|
|
@@ -1103,7 +1129,7 @@ export function truncate(count, xs) {
|
|
|
1103
1129
|
}
|
|
1104
1130
|
else {
|
|
1105
1131
|
i_mut = (i - 1);
|
|
1106
|
-
acc_mut = ((t = (new FSharpList(FSharpList__get_Head(xs_1),
|
|
1132
|
+
acc_mut = ((t = (new FSharpList(FSharpList__get_Head(xs_1), undefined)), (acc.tail = t, t)));
|
|
1107
1133
|
xs_1_mut = FSharpList__get_Tail(xs_1);
|
|
1108
1134
|
continue loop;
|
|
1109
1135
|
}
|
|
@@ -1133,22 +1159,22 @@ export function getSlice(startIndex, endIndex, xs) {
|
|
|
1133
1159
|
}
|
|
1134
1160
|
export function splitAt(index, xs) {
|
|
1135
1161
|
if (index < 0) {
|
|
1136
|
-
throw new
|
|
1162
|
+
throw new Exception(SR_inputMustBeNonNegative + " (Parameter \'index\')");
|
|
1137
1163
|
}
|
|
1138
1164
|
if (index > FSharpList__get_Length(xs)) {
|
|
1139
|
-
throw new
|
|
1165
|
+
throw new Exception(SR_notEnoughElements + " (Parameter \'index\')");
|
|
1140
1166
|
}
|
|
1141
1167
|
return [take(index, xs), skip(index, xs)];
|
|
1142
1168
|
}
|
|
1143
1169
|
export function exactlyOne(xs) {
|
|
1144
1170
|
if (FSharpList__get_IsEmpty(xs)) {
|
|
1145
|
-
throw new
|
|
1171
|
+
throw new Exception(SR_inputSequenceEmpty + " (Parameter \'list\')");
|
|
1146
1172
|
}
|
|
1147
1173
|
else if (FSharpList__get_IsEmpty(FSharpList__get_Tail(xs))) {
|
|
1148
1174
|
return FSharpList__get_Head(xs);
|
|
1149
1175
|
}
|
|
1150
1176
|
else {
|
|
1151
|
-
throw new
|
|
1177
|
+
throw new Exception(SR_inputSequenceTooLong + " (Parameter \'list\')");
|
|
1152
1178
|
}
|
|
1153
1179
|
}
|
|
1154
1180
|
export function tryExactlyOne(xs) {
|
|
@@ -1156,7 +1182,7 @@ export function tryExactlyOne(xs) {
|
|
|
1156
1182
|
return some(FSharpList__get_Head(xs));
|
|
1157
1183
|
}
|
|
1158
1184
|
else {
|
|
1159
|
-
return
|
|
1185
|
+
return undefined;
|
|
1160
1186
|
}
|
|
1161
1187
|
}
|
|
1162
1188
|
export function where(predicate, xs) {
|
|
@@ -1188,7 +1214,7 @@ export function insertAt(index, y, xs) {
|
|
|
1188
1214
|
}
|
|
1189
1215
|
}, FSharpList_get_Empty(), xs);
|
|
1190
1216
|
return reverse(isDone ? result : (((i + 1) === index) ? FSharpList_Cons_305B8EAC(y, result) : (() => {
|
|
1191
|
-
throw new
|
|
1217
|
+
throw new Exception(SR_indexOutOfBounds + " (Parameter \'index\')");
|
|
1192
1218
|
})()));
|
|
1193
1219
|
}
|
|
1194
1220
|
export function insertManyAt(index, ys, xs) {
|
|
@@ -1206,7 +1232,7 @@ export function insertManyAt(index, ys, xs) {
|
|
|
1206
1232
|
}
|
|
1207
1233
|
}, FSharpList_get_Empty(), xs);
|
|
1208
1234
|
return reverse(isDone ? result : (((i + 1) === index) ? append(ys_1, result) : (() => {
|
|
1209
|
-
throw new
|
|
1235
|
+
throw new Exception(SR_indexOutOfBounds + " (Parameter \'index\')");
|
|
1210
1236
|
})()));
|
|
1211
1237
|
}
|
|
1212
1238
|
export function removeAt(index, xs) {
|
|
@@ -1223,7 +1249,7 @@ export function removeAt(index, xs) {
|
|
|
1223
1249
|
}
|
|
1224
1250
|
}, xs);
|
|
1225
1251
|
if (!isDone) {
|
|
1226
|
-
throw new
|
|
1252
|
+
throw new Exception(SR_indexOutOfBounds + " (Parameter \'index\')");
|
|
1227
1253
|
}
|
|
1228
1254
|
return ys;
|
|
1229
1255
|
}
|
|
@@ -1251,7 +1277,7 @@ export function removeManyAt(index, count, xs) {
|
|
|
1251
1277
|
}, xs);
|
|
1252
1278
|
const status_1 = (((status === 0) && ((i + 1) === (index + count))) ? 1 : status) | 0;
|
|
1253
1279
|
if (status_1 < 1) {
|
|
1254
|
-
throw new
|
|
1280
|
+
throw new Exception(SR_indexOutOfBounds + ((" (Parameter \'" + ((status_1 < 0) ? "index" : "count")) + "\')"));
|
|
1255
1281
|
}
|
|
1256
1282
|
return ys;
|
|
1257
1283
|
}
|
|
@@ -1267,7 +1293,45 @@ export function updateAt(index, y, xs) {
|
|
|
1267
1293
|
}
|
|
1268
1294
|
}, xs);
|
|
1269
1295
|
if (!isDone) {
|
|
1270
|
-
throw new
|
|
1296
|
+
throw new Exception(SR_indexOutOfBounds + " (Parameter \'index\')");
|
|
1271
1297
|
}
|
|
1272
1298
|
return ys;
|
|
1273
1299
|
}
|
|
1300
|
+
export function randomShuffleBy(randomizer, xs) {
|
|
1301
|
+
const arr = toArray(xs);
|
|
1302
|
+
randomShuffleInPlaceBy(randomizer, arr);
|
|
1303
|
+
return ofArray(arr);
|
|
1304
|
+
}
|
|
1305
|
+
export function randomShuffleWith(random, xs) {
|
|
1306
|
+
return randomShuffleBy(() => random.NextDouble(), xs);
|
|
1307
|
+
}
|
|
1308
|
+
export function randomShuffle(xs) {
|
|
1309
|
+
return randomShuffleWith(nonSeeded(), xs);
|
|
1310
|
+
}
|
|
1311
|
+
export function randomChoiceBy(randomizer, xs) {
|
|
1312
|
+
return randomChoiceBy_1(randomizer, toArray(xs));
|
|
1313
|
+
}
|
|
1314
|
+
export function randomChoiceWith(random, xs) {
|
|
1315
|
+
return randomChoiceBy(() => random.NextDouble(), xs);
|
|
1316
|
+
}
|
|
1317
|
+
export function randomChoice(xs) {
|
|
1318
|
+
return randomChoiceWith(nonSeeded(), xs);
|
|
1319
|
+
}
|
|
1320
|
+
export function randomChoicesBy(randomizer, count, xs) {
|
|
1321
|
+
return ofArray(randomChoicesBy_1(randomizer, count, toArray(xs)));
|
|
1322
|
+
}
|
|
1323
|
+
export function randomChoicesWith(random, count, xs) {
|
|
1324
|
+
return randomChoicesBy(() => random.NextDouble(), count, xs);
|
|
1325
|
+
}
|
|
1326
|
+
export function randomChoices(count, xs) {
|
|
1327
|
+
return randomChoicesWith(nonSeeded(), count, xs);
|
|
1328
|
+
}
|
|
1329
|
+
export function randomSampleBy(randomizer, count, xs) {
|
|
1330
|
+
return ofArray(randomSampleBy_1(randomizer, count, toArray(xs)));
|
|
1331
|
+
}
|
|
1332
|
+
export function randomSampleWith(random, count, xs) {
|
|
1333
|
+
return randomSampleBy(() => random.NextDouble(), count, xs);
|
|
1334
|
+
}
|
|
1335
|
+
export function randomSample(count, xs) {
|
|
1336
|
+
return randomSampleWith(nonSeeded(), count, xs);
|
|
1337
|
+
}
|