Created
November 3, 2015 20:09
-
-
Save yupferris/1696f6b094a35da40c1a to your computer and use it in GitHub Desktop.
FunScript "clone & go" full output
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git clone [email protected]:ZachBray/FunScript.git | |
Cloning into 'FunScript'... | |
remote: Counting objects: 4780, done. | |
remote: Total 4780 (delta 0), reused 0 (delta 0), pack-reused 4779 | |
Receiving objects: 100% (4780/4780), 54.45 MiB | 4.53 MiB/s, done. | |
Resolving deltas: 100% (2620/2620), done. | |
Checking connectivity... done. | |
$ cd FunScript/ | |
$ chmod +x build.sh # See fix for this in pull request #194 | |
$ ./build.sh | |
No version specified. Downloading latest stable. | |
Starting download from https://github.com/fsprojects/Paket/releases/download/2.21.2/paket.exe | |
Done. | |
Paket version 2.21.2.0 | |
Downloading Reactive-Extensions/RxJS:7c0b4214cdc429f39693af7407536cc13d791dff dist/rx.all.js to /Users/yupferris/dev/projects/FunScript/paket-files/Reactive-Extensions/RxJS/dist/rx.all.js | |
5 seconds - ready. | |
Building project with version: LocalBuild | |
Shortened DependencyGraph for Target Release: | |
<== Release | |
<== Create-Package-Main | |
<== Build-Main | |
<== Clean-Main | |
<== Run-Test | |
<== Build-Test | |
<== Build-Rx | |
<== Build-TypeScript | |
<== Build-Data | |
<== Clean-Data | |
<== Clean-Rx | |
<== Clean-Test | |
<== Create-Package-Data | |
<== Create-Package-Rx | |
The resulting target order is: | |
- Clean-Main | |
- Build-Main | |
- Clean-Data | |
- Build-Data | |
- Build-TypeScript | |
- Clean-Rx | |
- Build-Rx | |
- Clean-Test | |
- Build-Test | |
- Run-Test | |
- Create-Package-Main | |
- Create-Package-Data | |
- Create-Package-Rx | |
- Release | |
Starting Target: Clean-Main | |
Creating /Users/yupferris/dev/projects/FunScript/build/main/bin/ | |
Creating /Users/yupferris/dev/projects/FunScript/build/main/deploy/ | |
Finished Target: Clean-Main | |
Starting Target: Build-Main (==> Clean-Main) | |
Created AssemblyInfo file "src/main/FunScript/AssemblyInfo.fs". | |
Created AssemblyInfo file "src/main/FunScript.Interop/AssemblyInfo.fs". | |
Build-Main-Projects: /Users/yupferris/dev/projects/FunScript/src/main/FunScript/FunScript.fsproj | |
Build-Main-Projects: /Users/yupferris/dev/projects/FunScript/src/main/FunScript.Interop/FunScript.Interop.fsproj | |
Building project: /Users/yupferris/dev/projects/FunScript/src/main/FunScript/FunScript.fsproj | |
xbuild /Users/yupferris/dev/projects/FunScript/src/main/FunScript/FunScript.fsproj /t:Build /p:RestorePackages="False" /p:OutputPath="/Users/yupferris/dev/projects/FunScript/build/main/bin" /p:Configuration="Release" /logger:Fake.MsBuildLogger+ErrorLogger,"/Users/yupferris/dev/projects/FunScript/packages/FAKE/tools/FakeLib.dll" | |
xbuild /Users/yupferris/dev/projects/FunScript/src/main/FunScript/FunScript.fsproj /t:Build /p:RestorePackages="False" /p:OutputPath="/Users/yupferris/dev/projects/FunScript/build/main/bin" /p:Configuration="Release" /logger:Fake.MsBuildLogger+ErrorLogger,"/Users/yupferris/dev/projects/FunScript/packages/FAKE/tools/FakeLib.dll" | |
XBuild Engine Version 12.0 | |
Mono, Version 4.0.3.0 | |
Copyright (C) 2005-2013 Various Mono authors | |
Build started 11/3/2015 11:58:55 AM. | |
__________________________________________________ | |
Project "/Users/yupferris/dev/projects/FunScript/src/main/FunScript/FunScript.fsproj" (Build target(s)): | |
Target PrepareForBuild: | |
Configuration: Release Platform: AnyCPU | |
Created directory "obj/Release/" | |
Created directory "bin/Release/" | |
Target ResolveProjectReferences: | |
Project "/Users/yupferris/dev/projects/FunScript/src/main/FunScript.Interop/FunScript.Interop.fsproj" (default target(s)): | |
Target PrepareForBuild: | |
Configuration: Release Platform: AnyCPU | |
Created directory "obj/Release/" | |
Created directory "bin/Release/" | |
Target CopyFilesMarkedCopyLocal: | |
Copying file from '/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/FSharp.Core.dll' to '/Users/yupferris/dev/projects/FunScript/build/main/bin/FSharp.Core.dll' | |
Target GenerateSatelliteAssemblies: | |
No input files were specified for target GenerateSatelliteAssemblies, skipping. | |
Target CoreCompile: | |
Tool /Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/fsc.exe execution started with arguments: -o:obj/Release/FunScript.Interop.dll --debug:pdbonly --noframework --define:TRACE --doc:bin/Release/FunScript.Interop.XML --optimize+ -r:/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/FSharp.Core.dll -r:/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/mscorlib.dll -r:/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/System.dll -r:/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/System.Numerics.dll -r:/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/System.Core.dll --target:library --warn:3 --warnaserror:76 --fullpaths --flaterrors --highentropyva- AssemblyInfo.fs Attributes.fs | |
F# Compiler for F# 3.1 (Open Source Edition) | |
Freely distributed under the Apache 2.0 Open Source License | |
Target DeployOutputFiles: | |
Copying file from '/Users/yupferris/dev/projects/FunScript/src/main/FunScript.Interop/obj/Release/FunScript.Interop.dll.mdb' to '/Users/yupferris/dev/projects/FunScript/build/main/bin/FunScript.Interop.dll.mdb' | |
Copying file from '/Users/yupferris/dev/projects/FunScript/src/main/FunScript.Interop/obj/Release/FunScript.Interop.dll' to '/Users/yupferris/dev/projects/FunScript/build/main/bin/FunScript.Interop.dll' | |
Done building project "/Users/yupferris/dev/projects/FunScript/src/main/FunScript.Interop/FunScript.Interop.fsproj". | |
Target GenerateSatelliteAssemblies: | |
No input files were specified for target GenerateSatelliteAssemblies, skipping. | |
Target CoreCompile: | |
Tool /Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/fsc.exe execution started with arguments: -o:obj/Release/FunScript.dll --debug:pdbonly --noframework --define:TRACE --doc:bin/Release/FunScript.XML --optimize+ --platform:anycpu -r:/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/FSharp.Core.dll -r:/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/mscorlib.dll -r:/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/System.dll -r:/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/System.Numerics.dll -r:/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/System.Web.dll -r:/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/System.Core.dll -r:/Users/yupferris/dev/projects/FunScript/build/main/bin//FunScript.Interop.dll --target:library --warn:3 --warnaserror:76 --fullpaths --flaterrors --highentropyva- AssemblyInfo.fs AttributeHelpers.fs ExprExtensions.fs Core/LanguagePrimitives.fs Core/GenericConstants.fs Core/Array.fs Core/ResizeArray.fs Core/list.fs Core/Option.fs Core/Seq.fs Core/Range.fs Core/Set.fs Core/Map.fs Core/String.fs Core/Regex.fs Core/Events.fs Core/Time.fs Core/Async.fs Core/Type.fs Core/StringWriter.fs Core/Dictionaries.fs Core/Web.fs JavaScriptNameMapper.fs AST.fs QuoteExtensions.fs InternalCompiler.fs ReturnStrategies.fs CompilerComponent.fs ExpressionReplacer.fs Reflection.fs PrimitiveTypes.fs Objects.fs ReflectedDefinitions.fs Comparison.fs Arithmetic.fs Logic.fs LetBindings.fs LambdaApplication.fs ControlFlow.fs Arrays.fs ResizeArrays.fs Dictionaries.fs Lists.fs Seqs.fs Options.fs Sets.fs Maps.fs CommonOperators.fs Strings.fs Regexs.fs Times.fs TypeConversion.fs OtherMappings.fs Asyncs.fs UnionTypes.fs RecordTypes.fs Tuples.fs Compiler.fs | |
F# Compiler for F# 3.1 (Open Source Edition) | |
Freely distributed under the Apache 2.0 Open Source License | |
Target DeployOutputFiles: | |
Copying file from '/Users/yupferris/dev/projects/FunScript/src/main/FunScript/obj/Release/FunScript.dll.mdb' to '/Users/yupferris/dev/projects/FunScript/build/main/bin/FunScript.dll.mdb' | |
Copying file from '/Users/yupferris/dev/projects/FunScript/src/main/FunScript/obj/Release/FunScript.dll' to '/Users/yupferris/dev/projects/FunScript/build/main/bin/FunScript.dll' | |
Done building project "/Users/yupferris/dev/projects/FunScript/src/main/FunScript/FunScript.fsproj". | |
Build succeeded. | |
0 Warning(s) | |
0 Error(s) | |
Time Elapsed 00:00:09.7437270 | |
Build-Main-Output: /Users/yupferris/dev/projects/FunScript/build/main/bin/FSharp.Core.dll | |
Build-Main-Output: /Users/yupferris/dev/projects/FunScript/build/main/bin/FunScript.Interop.dll | |
Build-Main-Output: /Users/yupferris/dev/projects/FunScript/build/main/bin/FunScript.Interop.dll.mdb | |
Build-Main-Output: /Users/yupferris/dev/projects/FunScript/build/main/bin/FunScript.dll | |
Build-Main-Output: /Users/yupferris/dev/projects/FunScript/build/main/bin/FunScript.dll.mdb | |
Finished Target: Build-Main | |
Starting Target: Clean-Data | |
Creating /Users/yupferris/dev/projects/FunScript/build/data/bin/ | |
Creating /Users/yupferris/dev/projects/FunScript/build/data/deploy/ | |
Finished Target: Clean-Data | |
Starting Target: Build-Data (==> Build-Main, Clean-Data) | |
Created AssemblyInfo file "src/data/FunScript.Data/AssemblyInfo.fs". | |
Build-Data-Projects: /Users/yupferris/dev/projects/FunScript/src/data/FunScript.Data/FunScript.Data.fsproj | |
Building project: /Users/yupferris/dev/projects/FunScript/src/data/FunScript.Data/FunScript.Data.fsproj | |
xbuild /Users/yupferris/dev/projects/FunScript/src/data/FunScript.Data/FunScript.Data.fsproj /t:Build /p:RestorePackages="False" /p:OutputPath="/Users/yupferris/dev/projects/FunScript/build/data/bin" /p:Configuration="Release" /logger:Fake.MsBuildLogger+ErrorLogger,"/Users/yupferris/dev/projects/FunScript/packages/FAKE/tools/FakeLib.dll" | |
xbuild /Users/yupferris/dev/projects/FunScript/src/data/FunScript.Data/FunScript.Data.fsproj /t:Build /p:RestorePackages="False" /p:OutputPath="/Users/yupferris/dev/projects/FunScript/build/data/bin" /p:Configuration="Release" /logger:Fake.MsBuildLogger+ErrorLogger,"/Users/yupferris/dev/projects/FunScript/packages/FAKE/tools/FakeLib.dll" | |
XBuild Engine Version 12.0 | |
Mono, Version 4.0.3.0 | |
Copyright (C) 2005-2013 Various Mono authors | |
Build started 11/3/2015 11:59:05 AM. | |
__________________________________________________ | |
Project "/Users/yupferris/dev/projects/FunScript/src/data/FunScript.Data/FunScript.Data.fsproj" (Build target(s)): | |
Target PrepareForBuild: | |
Configuration: Release Platform: AnyCPU | |
Created directory "obj/Release/" | |
Created directory "bin/Release/" | |
Target ResolveAssemblyReferences: | |
/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/Microsoft.Common.targets: warning : Reference 'FunScript' not resolved | |
For searchpath {CandidateAssemblyFiles} | |
Warning: {CandidateAssemblyFiles} not supported currently | |
For searchpath {HintPathFromItem} | |
Considered ../../main/FunScript/bin/Debug/FunScript.dll, but it does not exist. | |
For searchpath {TargetFrameworkDirectory} | |
Considered target framework dir /Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5, assembly named 'FunScript' not found. | |
Considered target framework dir /Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/Facades/, assembly named 'FunScript' not found. | |
For searchpath {PkgConfig} | |
Considered FunScript, but could not find in any pkg-config files. | |
For searchpath {GAC} | |
Considered FunScript, but could not find in the GAC. | |
For searchpath {RawFileName} | |
Considered '/Users/yupferris/dev/projects/FunScript/src/data/FunScript.Data/FunScript' as a file, but the file does not exist | |
For searchpath /Users/yupferris/dev/projects/FunScript/build/data/bin/ | |
Considered '/Users/yupferris/dev/projects/FunScript/build/data/bin/FunScript' as a file, but the file does not exist | |
Considered '/Users/yupferris/dev/projects/FunScript/build/data/bin/FunScript.exe' as a file, but the file does not exist | |
Considered '/Users/yupferris/dev/projects/FunScript/build/data/bin/FunScript.dll' as a file, but the file does not exist | |
/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/Microsoft.Common.targets: warning : Reference 'FunScript.Interop' not resolved | |
For searchpath {CandidateAssemblyFiles} | |
Warning: {CandidateAssemblyFiles} not supported currently | |
For searchpath {HintPathFromItem} | |
Considered ../../main/FunScript/bin/Debug/FunScript.Interop.dll, but it does not exist. | |
For searchpath {TargetFrameworkDirectory} | |
Considered target framework dir /Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5, assembly named 'FunScript.Interop' not found. | |
Considered target framework dir /Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/Facades/, assembly named 'FunScript.Interop' not found. | |
For searchpath {PkgConfig} | |
Considered FunScript.Interop, but could not find in any pkg-config files. | |
For searchpath {GAC} | |
Considered FunScript.Interop, but could not find in the GAC. | |
For searchpath {RawFileName} | |
Considered '/Users/yupferris/dev/projects/FunScript/src/data/FunScript.Data/FunScript.Interop' as a file, but the file does not exist | |
For searchpath /Users/yupferris/dev/projects/FunScript/build/data/bin/ | |
Considered '/Users/yupferris/dev/projects/FunScript/build/data/bin/FunScript.Interop' as a file, but the file does not exist | |
Considered '/Users/yupferris/dev/projects/FunScript/build/data/bin/FunScript.Interop.exe' as a file, but the file does not exist | |
Considered '/Users/yupferris/dev/projects/FunScript/build/data/bin/FunScript.Interop.dll' as a file, but the file does not exist | |
Target CopyFilesMarkedCopyLocal: | |
Copying file from '/Users/yupferris/dev/projects/FunScript/packages/ApiaryProvider/lib/net40/ApiaryProvider.dll' to '/Users/yupferris/dev/projects/FunScript/build/data/bin/ApiaryProvider.dll' | |
Copying file from '/Users/yupferris/dev/projects/FunScript/packages/FSharp.Data/lib/net40/FSharp.Data.dll' to '/Users/yupferris/dev/projects/FunScript/build/data/bin/FSharp.Data.dll' | |
Copying file from '/Users/yupferris/dev/projects/FunScript/build/main/bin/FunScript.dll' to '/Users/yupferris/dev/projects/FunScript/build/data/bin/FunScript.dll' | |
Copying file from '/Users/yupferris/dev/projects/FunScript/build/main/bin/FunScript.Interop.dll' to '/Users/yupferris/dev/projects/FunScript/build/data/bin/FunScript.Interop.dll' | |
Copying file from '/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/FSharp.Core.dll' to '/Users/yupferris/dev/projects/FunScript/build/data/bin/FSharp.Core.dll' | |
Target GenerateSatelliteAssemblies: | |
No input files were specified for target GenerateSatelliteAssemblies, skipping. | |
Target CoreCompile: | |
Tool /Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/fsc.exe execution started with arguments: -o:obj/Release/FunScript.Data.dll --debug:pdbonly --noframework --define:TRACE --doc:bin/Release/FunScript.Data.XML --optimize+ -r:../../../packages/ApiaryProvider/lib/net40/ApiaryProvider.dll -r:../../../packages/FSharp.Data/lib/net40/FSharp.Data.dll -r:../../../build/main/bin/FunScript.dll -r:../../../build/main/bin/FunScript.Interop.dll -r:/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/FSharp.Core.dll -r:/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/mscorlib.dll -r:/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/System.dll -r:/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/System.Numerics.dll -r:/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/System.Xml.Linq.dll -r:/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/System.Core.dll --target:library --warn:3 --warnaserror:76 --fullpaths --flaterrors --highentropyva- AssemblyInfo.fs Utils.fs JsonProvider.fs ApiaryProvider.fs WorldBankProvider.fs Components.fs | |
F# Compiler for F# 3.1 (Open Source Edition) | |
Freely distributed under the Apache 2.0 Open Source License | |
Target DeployOutputFiles: | |
Copying file from '/Users/yupferris/dev/projects/FunScript/src/data/FunScript.Data/obj/Release/FunScript.Data.dll.mdb' to '/Users/yupferris/dev/projects/FunScript/build/data/bin/FunScript.Data.dll.mdb' | |
Copying file from '/Users/yupferris/dev/projects/FunScript/src/data/FunScript.Data/obj/Release/FunScript.Data.dll' to '/Users/yupferris/dev/projects/FunScript/build/data/bin/FunScript.Data.dll' | |
Done building project "/Users/yupferris/dev/projects/FunScript/src/data/FunScript.Data/FunScript.Data.fsproj". | |
Build succeeded. | |
Warnings: | |
/Users/yupferris/dev/projects/FunScript/src/data/FunScript.Data/FunScript.Data.fsproj (Build) -> | |
/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/Microsoft.Common.targets (ResolveAssemblyReferences target) -> | |
/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/Microsoft.Common.targets: warning : Reference 'FunScript' not resolved | |
/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/Microsoft.Common.targets: warning : Reference 'FunScript.Interop' not resolved | |
2 Warning(s) | |
0 Error(s) | |
Time Elapsed 00:00:03.8510850 | |
Build-Data-Output: /Users/yupferris/dev/projects/FunScript/build/data/bin/ApiaryProvider.dll | |
Build-Data-Output: /Users/yupferris/dev/projects/FunScript/build/data/bin/FSharp.Core.dll | |
Build-Data-Output: /Users/yupferris/dev/projects/FunScript/build/data/bin/FSharp.Data.dll | |
Build-Data-Output: /Users/yupferris/dev/projects/FunScript/build/data/bin/FunScript.Data.dll | |
Build-Data-Output: /Users/yupferris/dev/projects/FunScript/build/data/bin/FunScript.Data.dll.mdb | |
Build-Data-Output: /Users/yupferris/dev/projects/FunScript/build/data/bin/FunScript.Interop.dll | |
Build-Data-Output: /Users/yupferris/dev/projects/FunScript/build/data/bin/FunScript.dll | |
Finished Target: Build-Data | |
Starting Target: Build-TypeScript (==> Build-Data) | |
Created AssemblyInfo file "src/extra/FunScript.TypeScript/AssemblyInfo.fs". | |
Build-TypeScript-Projects: /Users/yupferris/dev/projects/FunScript/src/extra/FunScript.TypeScript/FunScript.TypeScript.fsproj | |
Building project: /Users/yupferris/dev/projects/FunScript/src/extra/FunScript.TypeScript/FunScript.TypeScript.fsproj | |
xbuild /Users/yupferris/dev/projects/FunScript/src/extra/FunScript.TypeScript/FunScript.TypeScript.fsproj /t:Build /p:RestorePackages="False" /p:OutputPath="/Users/yupferris/dev/projects/FunScript/build/typescript/bin" /p:Configuration="Release" /logger:Fake.MsBuildLogger+ErrorLogger,"/Users/yupferris/dev/projects/FunScript/packages/FAKE/tools/FakeLib.dll" | |
xbuild /Users/yupferris/dev/projects/FunScript/src/extra/FunScript.TypeScript/FunScript.TypeScript.fsproj /t:Build /p:RestorePackages="False" /p:OutputPath="/Users/yupferris/dev/projects/FunScript/build/typescript/bin" /p:Configuration="Release" /logger:Fake.MsBuildLogger+ErrorLogger,"/Users/yupferris/dev/projects/FunScript/packages/FAKE/tools/FakeLib.dll" | |
XBuild Engine Version 12.0 | |
Mono, Version 4.0.3.0 | |
Copyright (C) 2005-2013 Various Mono authors | |
Build started 11/3/2015 11:59:09 AM. | |
__________________________________________________ | |
Project "/Users/yupferris/dev/projects/FunScript/src/extra/FunScript.TypeScript/FunScript.TypeScript.fsproj" (Build target(s)): | |
Target PrepareForBuild: | |
Configuration: Release Platform: AnyCPU | |
Created directory "/Users/yupferris/dev/projects/FunScript/build/typescript/bin/" | |
Created directory "obj/Release/" | |
Created directory "bin/Release/" | |
Target ResolveProjectReferences: | |
Project "/Users/yupferris/dev/projects/FunScript/src/main/FunScript.Interop/FunScript.Interop.fsproj" (default target(s)): | |
Target PrepareForBuild: | |
Configuration: Release Platform: AnyCPU | |
Target CopyFilesMarkedCopyLocal: | |
Copying file from '/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/FSharp.Core.dll' to '/Users/yupferris/dev/projects/FunScript/build/typescript/bin/FSharp.Core.dll' | |
Target GenerateSatelliteAssemblies: | |
No input files were specified for target GenerateSatelliteAssemblies, skipping. | |
Target CoreCompile: | |
Skipping target "CoreCompile" because its outputs are up-to-date. | |
Target DeployOutputFiles: | |
Copying file from '/Users/yupferris/dev/projects/FunScript/src/main/FunScript.Interop/obj/Release/FunScript.Interop.dll.mdb' to '/Users/yupferris/dev/projects/FunScript/build/typescript/bin/FunScript.Interop.dll.mdb' | |
Copying file from '/Users/yupferris/dev/projects/FunScript/src/main/FunScript.Interop/obj/Release/FunScript.Interop.dll' to '/Users/yupferris/dev/projects/FunScript/build/typescript/bin/FunScript.Interop.dll' | |
Done building project "/Users/yupferris/dev/projects/FunScript/src/main/FunScript.Interop/FunScript.Interop.fsproj". | |
Project "/Users/yupferris/dev/projects/FunScript/src/main/FunScript/FunScript.fsproj" (default target(s)): | |
Target PrepareForBuild: | |
Configuration: Release Platform: AnyCPU | |
Target GenerateSatelliteAssemblies: | |
No input files were specified for target GenerateSatelliteAssemblies, skipping. | |
Target CoreCompile: | |
Skipping target "CoreCompile" because its outputs are up-to-date. | |
Target DeployOutputFiles: | |
Copying file from '/Users/yupferris/dev/projects/FunScript/src/main/FunScript/obj/Release/FunScript.dll.mdb' to '/Users/yupferris/dev/projects/FunScript/build/typescript/bin/FunScript.dll.mdb' | |
Copying file from '/Users/yupferris/dev/projects/FunScript/src/main/FunScript/obj/Release/FunScript.dll' to '/Users/yupferris/dev/projects/FunScript/build/typescript/bin/FunScript.dll' | |
Done building project "/Users/yupferris/dev/projects/FunScript/src/main/FunScript/FunScript.fsproj". | |
Target CopyFilesMarkedCopyLocal: | |
Copying file from '/Users/yupferris/dev/projects/FunScript/packages/DotNetZip/lib/net20/Ionic.Zip.dll' to '/Users/yupferris/dev/projects/FunScript/build/typescript/bin/Ionic.Zip.dll' | |
Copying file from '/Users/yupferris/dev/projects/FunScript/packages/FParsec/lib/net40-client/FParsec.dll' to '/Users/yupferris/dev/projects/FunScript/build/typescript/bin/FParsec.dll' | |
Copying file from '/Users/yupferris/dev/projects/FunScript/packages/FParsec/lib/net40-client/FParsecCS.dll' to '/Users/yupferris/dev/projects/FunScript/build/typescript/bin/FParsecCS.dll' | |
Copying file from '/Users/yupferris/dev/projects/FunScript/packages/FSharp.Compiler.CodeDom/lib/net40/FSharp.Compiler.CodeDom.dll' to '/Users/yupferris/dev/projects/FunScript/build/typescript/bin/FSharp.Compiler.CodeDom.dll' | |
Copying file from '/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/gac/FSharp.Core/4.3.0.0__b03f5f7f11d50a3a/FSharp.Core.dll' to '/Users/yupferris/dev/projects/FunScript/build/typescript/bin/FSharp.Core.dll' | |
Target CopyNonResxEmbeddedResources: | |
Copying file from '/Users/yupferris/dev/projects/FunScript/src/extra/FunScript.TypeScript/lib.d.ts' to '/Users/yupferris/dev/projects/FunScript/src/extra/FunScript.TypeScript/obj/Release/lib.d.ts' | |
Copying file from '/Users/yupferris/dev/projects/FunScript/src/extra/FunScript.TypeScript/template.nuspec' to '/Users/yupferris/dev/projects/FunScript/src/extra/FunScript.TypeScript/obj/Release/template.nuspec' | |
Target GenerateSatelliteAssemblies: | |
No input files were specified for target GenerateSatelliteAssemblies, skipping. | |
Target CoreCompile: | |
Tool /Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/fsc.exe execution started with arguments: -o:obj/Release/FunScript.TypeScript.exe --debug:pdbonly --noframework --define:TRACE --doc:bin/Release/FunScript.TypeScript.XML --optimize+ --platform:anycpu --resource:obj/Release/lib.d.ts --resource:obj/Release/template.nuspec -r:../../../packages/DotNetZip/lib/net20/Ionic.Zip.dll -r:../../../packages/FParsec/lib/net40-client/FParsec.dll -r:../../../packages/FParsec/lib/net40-client/FParsecCS.dll -r:../../../packages/FSharp.Compiler.CodeDom/lib/net40/FSharp.Compiler.CodeDom.dll -r:/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/gac/FSharp.Core/4.3.0.0__b03f5f7f11d50a3a/FSharp.Core.dll -r:/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/System.dll -r:/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/System.Web.dll -r:/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/System.Net.dll -r:/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/System.Core.dll -r:/Users/yupferris/dev/projects/FunScript/build/typescript/bin//FunScript.Interop.dll -r:/Users/yupferris/dev/projects/FunScript/build/typescript/bin//FunScript.dll --target:exe --warn:3 --warnaserror:76 --fullpaths --flaterrors --highentropyva- AST.fs Parser.fs TypeGenerator.fs Program.fs | |
F# Compiler for F# 3.1 (Open Source Edition) | |
Freely distributed under the Apache 2.0 Open Source License | |
Target _CopyAppConfigFile: | |
Copying file from '/Users/yupferris/dev/projects/FunScript/src/extra/FunScript.TypeScript/App.config' to '/Users/yupferris/dev/projects/FunScript/build/typescript/bin/FunScript.TypeScript.exe.config' | |
Target DeployOutputFiles: | |
Copying file from '/Users/yupferris/dev/projects/FunScript/src/extra/FunScript.TypeScript/obj/Release/FunScript.TypeScript.exe.mdb' to '/Users/yupferris/dev/projects/FunScript/build/typescript/bin/FunScript.TypeScript.exe.mdb' | |
Copying file from '/Users/yupferris/dev/projects/FunScript/src/extra/FunScript.TypeScript/obj/Release/FunScript.TypeScript.exe' to '/Users/yupferris/dev/projects/FunScript/build/typescript/bin/FunScript.TypeScript.exe' | |
Done building project "/Users/yupferris/dev/projects/FunScript/src/extra/FunScript.TypeScript/FunScript.TypeScript.fsproj". | |
Build succeeded. | |
0 Warning(s) | |
0 Error(s) | |
Time Elapsed 00:00:05.0575360 | |
Build-TypeScript-Output: /Users/yupferris/dev/projects/FunScript/build/typescript/bin/FParsec.dll | |
Build-TypeScript-Output: /Users/yupferris/dev/projects/FunScript/build/typescript/bin/FParsecCS.dll | |
Build-TypeScript-Output: /Users/yupferris/dev/projects/FunScript/build/typescript/bin/FSharp.Compiler.CodeDom.dll | |
Build-TypeScript-Output: /Users/yupferris/dev/projects/FunScript/build/typescript/bin/FSharp.Core.dll | |
Build-TypeScript-Output: /Users/yupferris/dev/projects/FunScript/build/typescript/bin/FunScript.Interop.dll | |
Build-TypeScript-Output: /Users/yupferris/dev/projects/FunScript/build/typescript/bin/FunScript.Interop.dll.mdb | |
Build-TypeScript-Output: /Users/yupferris/dev/projects/FunScript/build/typescript/bin/FunScript.TypeScript.exe | |
Build-TypeScript-Output: /Users/yupferris/dev/projects/FunScript/build/typescript/bin/FunScript.TypeScript.exe.config | |
Build-TypeScript-Output: /Users/yupferris/dev/projects/FunScript/build/typescript/bin/FunScript.TypeScript.exe.mdb | |
Build-TypeScript-Output: /Users/yupferris/dev/projects/FunScript/build/typescript/bin/FunScript.dll | |
Build-TypeScript-Output: /Users/yupferris/dev/projects/FunScript/build/typescript/bin/FunScript.dll.mdb | |
Build-TypeScript-Output: /Users/yupferris/dev/projects/FunScript/build/typescript/bin/Ionic.Zip.dll | |
Finished Target: Build-TypeScript | |
Starting Target: Clean-Rx | |
Creating /Users/yupferris/dev/projects/FunScript/build/rx/bin/ | |
Creating /Users/yupferris/dev/projects/FunScript/build/rx/deploy/ | |
Finished Target: Clean-Rx | |
Starting Target: Build-Rx (==> Build-TypeScript, Clean-Rx) | |
Created AssemblyInfo file "src/extra/FunScript.Rx/AssemblyInfo.fs". | |
Build-Rx-Projects: /Users/yupferris/dev/projects/FunScript/src/extra/FunScript.Rx/FunScript.Rx.fsproj | |
Building project: /Users/yupferris/dev/projects/FunScript/src/extra/FunScript.Rx/FunScript.Rx.fsproj | |
xbuild /Users/yupferris/dev/projects/FunScript/src/extra/FunScript.Rx/FunScript.Rx.fsproj /t:Build /p:RestorePackages="False" /p:OutputPath="/Users/yupferris/dev/projects/FunScript/build/rx/bin" /p:Configuration="Release" /logger:Fake.MsBuildLogger+ErrorLogger,"/Users/yupferris/dev/projects/FunScript/packages/FAKE/tools/FakeLib.dll" | |
xbuild /Users/yupferris/dev/projects/FunScript/src/extra/FunScript.Rx/FunScript.Rx.fsproj /t:Build /p:RestorePackages="False" /p:OutputPath="/Users/yupferris/dev/projects/FunScript/build/rx/bin" /p:Configuration="Release" /logger:Fake.MsBuildLogger+ErrorLogger,"/Users/yupferris/dev/projects/FunScript/packages/FAKE/tools/FakeLib.dll" | |
XBuild Engine Version 12.0 | |
Mono, Version 4.0.3.0 | |
Copyright (C) 2005-2013 Various Mono authors | |
Build started 11/3/2015 11:59:15 AM. | |
__________________________________________________ | |
Project "/Users/yupferris/dev/projects/FunScript/src/extra/FunScript.Rx/FunScript.Rx.fsproj" (Build target(s)): | |
Target PrepareForBuild: | |
Configuration: Release Platform: AnyCPU | |
Created directory "obj/Release/" | |
Created directory "bin/Release/" | |
Target ResolveProjectReferences: | |
Project "/Users/yupferris/dev/projects/FunScript/src/main/FunScript.Interop/FunScript.Interop.fsproj" (default target(s)): | |
Target PrepareForBuild: | |
Configuration: Release Platform: AnyCPU | |
Target CopyFilesMarkedCopyLocal: | |
Copying file from '/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/FSharp.Core.dll' to '/Users/yupferris/dev/projects/FunScript/build/rx/bin/FSharp.Core.dll' | |
Target GenerateSatelliteAssemblies: | |
No input files were specified for target GenerateSatelliteAssemblies, skipping. | |
Target CoreCompile: | |
Skipping target "CoreCompile" because its outputs are up-to-date. | |
Target DeployOutputFiles: | |
Copying file from '/Users/yupferris/dev/projects/FunScript/src/main/FunScript.Interop/obj/Release/FunScript.Interop.dll.mdb' to '/Users/yupferris/dev/projects/FunScript/build/rx/bin/FunScript.Interop.dll.mdb' | |
Copying file from '/Users/yupferris/dev/projects/FunScript/src/main/FunScript.Interop/obj/Release/FunScript.Interop.dll' to '/Users/yupferris/dev/projects/FunScript/build/rx/bin/FunScript.Interop.dll' | |
Done building project "/Users/yupferris/dev/projects/FunScript/src/main/FunScript.Interop/FunScript.Interop.fsproj". | |
Project "/Users/yupferris/dev/projects/FunScript/src/main/FunScript/FunScript.fsproj" (default target(s)): | |
Target PrepareForBuild: | |
Configuration: Release Platform: AnyCPU | |
Target GenerateSatelliteAssemblies: | |
No input files were specified for target GenerateSatelliteAssemblies, skipping. | |
Target CoreCompile: | |
Skipping target "CoreCompile" because its outputs are up-to-date. | |
Target DeployOutputFiles: | |
Copying file from '/Users/yupferris/dev/projects/FunScript/src/main/FunScript/obj/Release/FunScript.dll.mdb' to '/Users/yupferris/dev/projects/FunScript/build/rx/bin/FunScript.dll.mdb' | |
Copying file from '/Users/yupferris/dev/projects/FunScript/src/main/FunScript/obj/Release/FunScript.dll' to '/Users/yupferris/dev/projects/FunScript/build/rx/bin/FunScript.dll' | |
Done building project "/Users/yupferris/dev/projects/FunScript/src/main/FunScript/FunScript.fsproj". | |
Target CopyFilesMarkedCopyLocal: | |
Copying file from '/Users/yupferris/dev/projects/FunScript/packages/FSharp.Control.Reactive/lib/net40/FSharp.Control.Reactive.dll' to '/Users/yupferris/dev/projects/FunScript/build/rx/bin/FSharp.Control.Reactive.dll' | |
Copying file from '/Users/yupferris/dev/projects/FunScript/packages/Rx-Core/lib/net45/System.Reactive.Core.dll' to '/Users/yupferris/dev/projects/FunScript/build/rx/bin/System.Reactive.Core.dll' | |
Copying file from '/Users/yupferris/dev/projects/FunScript/packages/Rx-Interfaces/lib/net45/System.Reactive.Interfaces.dll' to '/Users/yupferris/dev/projects/FunScript/build/rx/bin/System.Reactive.Interfaces.dll' | |
Copying file from '/Users/yupferris/dev/projects/FunScript/packages/Rx-Linq/lib/net45/System.Reactive.Linq.dll' to '/Users/yupferris/dev/projects/FunScript/build/rx/bin/System.Reactive.Linq.dll' | |
Target GenerateSatelliteAssemblies: | |
No input files were specified for target GenerateSatelliteAssemblies, skipping. | |
Target CoreCompile: | |
Tool /Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/fsc.exe execution started with arguments: -o:obj/Release/FunScript.Rx.dll --debug:pdbonly --noframework --define:TRACE --doc:bin/Release/FunScript.Rx.XML --optimize+ -r:../../../packages/FSharp.Control.Reactive/lib/net40/FSharp.Control.Reactive.dll -r:../../../packages/Rx-Core/lib/net45/System.Reactive.Core.dll -r:../../../packages/Rx-Interfaces/lib/net45/System.Reactive.Interfaces.dll -r:../../../packages/Rx-Linq/lib/net45/System.Reactive.Linq.dll -r:/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/mscorlib.dll -r:/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/FSharp.Core.dll -r:/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/System.dll -r:/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/System.Numerics.dll -r:/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/System.Core.dll -r:/Users/yupferris/dev/projects/FunScript/build/rx/bin//FunScript.Interop.dll -r:/Users/yupferris/dev/projects/FunScript/build/rx/bin//FunScript.dll --target:library --warn:3 --warnaserror:76 --fullpaths --flaterrors --highentropyva- AssemblyInfo.fs Observable.fs Events.fs Interop.fs | |
F# Compiler for F# 3.1 (Open Source Edition) | |
Freely distributed under the Apache 2.0 Open Source License | |
Target DeployOutputFiles: | |
Copying file from '/Users/yupferris/dev/projects/FunScript/src/extra/FunScript.Rx/obj/Release/FunScript.Rx.dll.mdb' to '/Users/yupferris/dev/projects/FunScript/build/rx/bin/FunScript.Rx.dll.mdb' | |
Copying file from '/Users/yupferris/dev/projects/FunScript/src/extra/FunScript.Rx/obj/Release/FunScript.Rx.dll' to '/Users/yupferris/dev/projects/FunScript/build/rx/bin/FunScript.Rx.dll' | |
Done building project "/Users/yupferris/dev/projects/FunScript/src/extra/FunScript.Rx/FunScript.Rx.fsproj". | |
Build succeeded. | |
0 Warning(s) | |
0 Error(s) | |
Time Elapsed 00:00:03.3935850 | |
Build-Rx-Output: /Users/yupferris/dev/projects/FunScript/build/rx/bin/FSharp.Control.Reactive.dll | |
Build-Rx-Output: /Users/yupferris/dev/projects/FunScript/build/rx/bin/FSharp.Core.dll | |
Build-Rx-Output: /Users/yupferris/dev/projects/FunScript/build/rx/bin/FunScript.Interop.dll | |
Build-Rx-Output: /Users/yupferris/dev/projects/FunScript/build/rx/bin/FunScript.Interop.dll.mdb | |
Build-Rx-Output: /Users/yupferris/dev/projects/FunScript/build/rx/bin/FunScript.Rx.dll | |
Build-Rx-Output: /Users/yupferris/dev/projects/FunScript/build/rx/bin/FunScript.Rx.dll.mdb | |
Build-Rx-Output: /Users/yupferris/dev/projects/FunScript/build/rx/bin/FunScript.dll | |
Build-Rx-Output: /Users/yupferris/dev/projects/FunScript/build/rx/bin/FunScript.dll.mdb | |
Build-Rx-Output: /Users/yupferris/dev/projects/FunScript/build/rx/bin/System.Reactive.Core.dll | |
Build-Rx-Output: /Users/yupferris/dev/projects/FunScript/build/rx/bin/System.Reactive.Interfaces.dll | |
Build-Rx-Output: /Users/yupferris/dev/projects/FunScript/build/rx/bin/System.Reactive.Linq.dll | |
Finished Target: Build-Rx | |
Starting Target: Clean-Test | |
Creating /Users/yupferris/dev/projects/FunScript/build/tests/ | |
Finished Target: Clean-Test | |
Starting Target: Build-Test (==> Build-Rx, Clean-Test) | |
Build-Test-Projects: /Users/yupferris/dev/projects/FunScript/tests/FunScript.Tests/FunScript.Tests.fsproj | |
Building project: /Users/yupferris/dev/projects/FunScript/tests/FunScript.Tests/FunScript.Tests.fsproj | |
xbuild /Users/yupferris/dev/projects/FunScript/tests/FunScript.Tests/FunScript.Tests.fsproj /t:Build /p:RestorePackages="False" /p:OutputPath="/Users/yupferris/dev/projects/FunScript/build/tests" /p:Configuration="Debug" /logger:Fake.MsBuildLogger+ErrorLogger,"/Users/yupferris/dev/projects/FunScript/packages/FAKE/tools/FakeLib.dll" | |
xbuild /Users/yupferris/dev/projects/FunScript/tests/FunScript.Tests/FunScript.Tests.fsproj /t:Build /p:RestorePackages="False" /p:OutputPath="/Users/yupferris/dev/projects/FunScript/build/tests" /p:Configuration="Debug" /logger:Fake.MsBuildLogger+ErrorLogger,"/Users/yupferris/dev/projects/FunScript/packages/FAKE/tools/FakeLib.dll" | |
XBuild Engine Version 12.0 | |
Mono, Version 4.0.3.0 | |
Copyright (C) 2005-2013 Various Mono authors | |
Build started 11/3/2015 11:59:18 AM. | |
__________________________________________________ | |
Project "/Users/yupferris/dev/projects/FunScript/tests/FunScript.Tests/FunScript.Tests.fsproj" (Build target(s)): | |
Target PrepareForBuild: | |
Configuration: Debug Platform: AnyCPU | |
Created directory "obj/Debug/" | |
Created directory "bin/Debug/" | |
Target ResolveProjectReferences: | |
Project "/Users/yupferris/dev/projects/FunScript/src/extra/FunScript.Rx/FunScript.Rx.fsproj" (default target(s)): | |
Target PrepareForBuild: | |
Configuration: Debug Platform: AnyCPU | |
Created directory "obj/Debug/" | |
Created directory "bin/Debug/" | |
Target ResolveProjectReferences: | |
Project "/Users/yupferris/dev/projects/FunScript/src/main/FunScript.Interop/FunScript.Interop.fsproj" (default target(s)): | |
Target PrepareForBuild: | |
Configuration: Debug Platform: AnyCPU | |
Created directory "obj/Debug/" | |
Created directory "bin/Debug/" | |
Target CopyFilesMarkedCopyLocal: | |
Copying file from '/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/FSharp.Core.dll' to '/Users/yupferris/dev/projects/FunScript/build/tests/FSharp.Core.dll' | |
Target GenerateSatelliteAssemblies: | |
No input files were specified for target GenerateSatelliteAssemblies, skipping. | |
Target CoreCompile: | |
Tool /Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/fsc.exe execution started with arguments: -o:obj/Debug/FunScript.Interop.dll -g --debug:full --noframework --define:DEBUG --define:TRACE --doc:bin/Debug/FunScript.Interop.XML --optimize- --tailcalls- -r:/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/FSharp.Core.dll -r:/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/mscorlib.dll -r:/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/System.dll -r:/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/System.Numerics.dll -r:/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/System.Core.dll --target:library --warn:3 --warnaserror:76 --fullpaths --flaterrors --highentropyva- AssemblyInfo.fs Attributes.fs | |
F# Compiler for F# 3.1 (Open Source Edition) | |
Freely distributed under the Apache 2.0 Open Source License | |
Target DeployOutputFiles: | |
Copying file from '/Users/yupferris/dev/projects/FunScript/src/main/FunScript.Interop/obj/Debug/FunScript.Interop.dll.mdb' to '/Users/yupferris/dev/projects/FunScript/build/tests/FunScript.Interop.dll.mdb' | |
Copying file from '/Users/yupferris/dev/projects/FunScript/src/main/FunScript.Interop/obj/Debug/FunScript.Interop.dll' to '/Users/yupferris/dev/projects/FunScript/build/tests/FunScript.Interop.dll' | |
Done building project "/Users/yupferris/dev/projects/FunScript/src/main/FunScript.Interop/FunScript.Interop.fsproj". | |
Project "/Users/yupferris/dev/projects/FunScript/src/main/FunScript/FunScript.fsproj" (default target(s)): | |
Target PrepareForBuild: | |
Configuration: Debug Platform: AnyCPU | |
Created directory "obj/Debug/" | |
Created directory "bin/Debug/" | |
Target GenerateSatelliteAssemblies: | |
No input files were specified for target GenerateSatelliteAssemblies, skipping. | |
Target CoreCompile: | |
Tool /Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/fsc.exe execution started with arguments: -o:obj/Debug/FunScript.dll -g --debug:full --noframework --define:DEBUG --define:TRACE --doc:bin/Debug/FunScript.XML --optimize- --tailcalls- --platform:anycpu -r:/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/FSharp.Core.dll -r:/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/mscorlib.dll -r:/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/System.dll -r:/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/System.Numerics.dll -r:/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/System.Web.dll -r:/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/System.Core.dll -r:/Users/yupferris/dev/projects/FunScript/build/tests//FunScript.Interop.dll --target:library --warn:3 --warnaserror:76 --fullpaths --flaterrors --highentropyva- AssemblyInfo.fs AttributeHelpers.fs ExprExtensions.fs Core/LanguagePrimitives.fs Core/GenericConstants.fs Core/Array.fs Core/ResizeArray.fs Core/list.fs Core/Option.fs Core/Seq.fs Core/Range.fs Core/Set.fs Core/Map.fs Core/String.fs Core/Regex.fs Core/Events.fs Core/Time.fs Core/Async.fs Core/Type.fs Core/StringWriter.fs Core/Dictionaries.fs Core/Web.fs JavaScriptNameMapper.fs AST.fs QuoteExtensions.fs InternalCompiler.fs ReturnStrategies.fs CompilerComponent.fs ExpressionReplacer.fs Reflection.fs PrimitiveTypes.fs Objects.fs ReflectedDefinitions.fs Comparison.fs Arithmetic.fs Logic.fs LetBindings.fs LambdaApplication.fs ControlFlow.fs Arrays.fs ResizeArrays.fs Dictionaries.fs Lists.fs Seqs.fs Options.fs Sets.fs Maps.fs CommonOperators.fs Strings.fs Regexs.fs Times.fs TypeConversion.fs OtherMappings.fs Asyncs.fs UnionTypes.fs RecordTypes.fs Tuples.fs Compiler.fs | |
F# Compiler for F# 3.1 (Open Source Edition) | |
Freely distributed under the Apache 2.0 Open Source License | |
Target DeployOutputFiles: | |
Copying file from '/Users/yupferris/dev/projects/FunScript/src/main/FunScript/obj/Debug/FunScript.dll.mdb' to '/Users/yupferris/dev/projects/FunScript/build/tests/FunScript.dll.mdb' | |
Copying file from '/Users/yupferris/dev/projects/FunScript/src/main/FunScript/obj/Debug/FunScript.dll' to '/Users/yupferris/dev/projects/FunScript/build/tests/FunScript.dll' | |
Done building project "/Users/yupferris/dev/projects/FunScript/src/main/FunScript/FunScript.fsproj". | |
Target CopyFilesMarkedCopyLocal: | |
Copying file from '/Users/yupferris/dev/projects/FunScript/packages/FSharp.Control.Reactive/lib/net40/FSharp.Control.Reactive.dll' to '/Users/yupferris/dev/projects/FunScript/build/tests/FSharp.Control.Reactive.dll' | |
Copying file from '/Users/yupferris/dev/projects/FunScript/packages/Rx-Core/lib/net45/System.Reactive.Core.dll' to '/Users/yupferris/dev/projects/FunScript/build/tests/System.Reactive.Core.dll' | |
Copying file from '/Users/yupferris/dev/projects/FunScript/packages/Rx-Interfaces/lib/net45/System.Reactive.Interfaces.dll' to '/Users/yupferris/dev/projects/FunScript/build/tests/System.Reactive.Interfaces.dll' | |
Copying file from '/Users/yupferris/dev/projects/FunScript/packages/Rx-Linq/lib/net45/System.Reactive.Linq.dll' to '/Users/yupferris/dev/projects/FunScript/build/tests/System.Reactive.Linq.dll' | |
Target GenerateSatelliteAssemblies: | |
No input files were specified for target GenerateSatelliteAssemblies, skipping. | |
Target CoreCompile: | |
Tool /Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/fsc.exe execution started with arguments: -o:obj/Debug/FunScript.Rx.dll -g --debug:full --noframework --define:DEBUG --define:TRACE --doc:bin/Debug/FunScript.Rx.XML --optimize- --tailcalls- -r:../../../packages/FSharp.Control.Reactive/lib/net40/FSharp.Control.Reactive.dll -r:../../../packages/Rx-Core/lib/net45/System.Reactive.Core.dll -r:../../../packages/Rx-Interfaces/lib/net45/System.Reactive.Interfaces.dll -r:../../../packages/Rx-Linq/lib/net45/System.Reactive.Linq.dll -r:/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/mscorlib.dll -r:/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/FSharp.Core.dll -r:/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/System.dll -r:/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/System.Numerics.dll -r:/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/System.Core.dll -r:/Users/yupferris/dev/projects/FunScript/build/tests//FunScript.Interop.dll -r:/Users/yupferris/dev/projects/FunScript/build/tests//FunScript.dll --target:library --warn:3 --warnaserror:76 --fullpaths --flaterrors --highentropyva- AssemblyInfo.fs Observable.fs Events.fs Interop.fs | |
F# Compiler for F# 3.1 (Open Source Edition) | |
Freely distributed under the Apache 2.0 Open Source License | |
Target DeployOutputFiles: | |
Copying file from '/Users/yupferris/dev/projects/FunScript/src/extra/FunScript.Rx/obj/Debug/FunScript.Rx.dll.mdb' to '/Users/yupferris/dev/projects/FunScript/build/tests/FunScript.Rx.dll.mdb' | |
Copying file from '/Users/yupferris/dev/projects/FunScript/src/extra/FunScript.Rx/obj/Debug/FunScript.Rx.dll' to '/Users/yupferris/dev/projects/FunScript/build/tests/FunScript.Rx.dll' | |
Done building project "/Users/yupferris/dev/projects/FunScript/src/extra/FunScript.Rx/FunScript.Rx.fsproj". | |
Target CopyFilesMarkedCopyLocal: | |
Copying file from '/Users/yupferris/dev/projects/FunScript/packages/Edge.js/lib/EdgeJs.dll' to '/Users/yupferris/dev/projects/FunScript/build/tests/EdgeJs.dll' | |
Copying file from '/Users/yupferris/dev/projects/FunScript/packages/NUnit/lib/nunit.framework.dll' to '/Users/yupferris/dev/projects/FunScript/build/tests/nunit.framework.dll' | |
Target GenerateSatelliteAssemblies: | |
No input files were specified for target GenerateSatelliteAssemblies, skipping. | |
Target CoreCompile: | |
Tool /Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/fsc.exe execution started with arguments: -o:obj/Debug/FunScript.Tests.dll -g --debug:full --noframework --define:DEBUG --define:TRACE --doc:bin/Debug/FunScript.Tests.XML --optimize- --tailcalls- -r:../../packages/Edge.js/lib/EdgeJs.dll -r:../../packages/FSharp.Control.Reactive/lib/net40/FSharp.Control.Reactive.dll -r:../../packages/Rx-Core/lib/net45/System.Reactive.Core.dll -r:../../packages/Rx-Interfaces/lib/net45/System.Reactive.Interfaces.dll -r:../../packages/Rx-Linq/lib/net45/System.Reactive.Linq.dll -r:/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/FSharp.Core.dll -r:/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/mscorlib.dll -r:/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/System.dll -r:/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/System.Numerics.dll -r:/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/System.Web.dll -r:../../packages/NUnit/lib/nunit.framework.dll -r:/Library/Frameworks/Mono.framework/Versions/4.0.3/lib/mono/4.5/System.Core.dll -r:/Users/yupferris/dev/projects/FunScript/build/tests//FunScript.Rx.dll -r:/Users/yupferris/dev/projects/FunScript/build/tests//FunScript.Interop.dll -r:/Users/yupferris/dev/projects/FunScript/build/tests//FunScript.dll --target:library --warn:3 --warnaserror:76 --fullpaths --flaterrors --highentropyva- PowerPack/Linq.fs CommonFixture.fs PrimitiveTypeTests.fs ComparisonTests.fs ArithmeticTests.fs LogicTests.fs LetBindingTests.fs LambdaApplicationTests.fs ControlFlowTests.fs TupleTypeTests.fs UnionTypeTests.fs RecordTypeTests.fs ReflectedDefinitionTests.fs CommonOperatorTests.fs ArrayTests.fs ResizeArrayTests.fs DictionaryTests.fs OptionTests.fs ListTests.fs SeqTests.fs SeqExpressionTests.fs SetTests.fs MapTests.fs StringTests.fs RegexTests.fs DateTimeTests.fs AsyncTests.fs ReflectionTests.fs StringWriterTests.fs EventTests.fs RxTests.fs GuidTests.fs | |
F# Compiler for F# 3.1 (Open Source Edition) | |
Freely distributed under the Apache 2.0 Open Source License | |
Target _CopyDeployFilesToOutputDirectoryPreserveNewest: | |
Creating directory '/Users/yupferris/dev/projects/FunScript/build/tests/edge/x86' | |
Copying file from '/Users/yupferris/dev/projects/FunScript/tests/FunScript.Tests/edge/x86/edge.node' to '/Users/yupferris/dev/projects/FunScript/build/tests/edge/x86/edge.node' | |
Copying file from '/Users/yupferris/dev/projects/FunScript/tests/FunScript.Tests/edge/x86/node.dll' to '/Users/yupferris/dev/projects/FunScript/build/tests/edge/x86/node.dll' | |
Creating directory '/Users/yupferris/dev/projects/FunScript/build/tests/edge/x64' | |
Copying file from '/Users/yupferris/dev/projects/FunScript/tests/FunScript.Tests/edge/x64/edge.node' to '/Users/yupferris/dev/projects/FunScript/build/tests/edge/x64/edge.node' | |
Copying file from '/Users/yupferris/dev/projects/FunScript/tests/FunScript.Tests/edge/x64/node.dll' to '/Users/yupferris/dev/projects/FunScript/build/tests/edge/x64/node.dll' | |
Copying file from '/Users/yupferris/dev/projects/FunScript/tests/FunScript.Tests/edge/edge.js' to '/Users/yupferris/dev/projects/FunScript/build/tests/edge/edge.js' | |
Copying file from '/Users/yupferris/dev/projects/FunScript/tests/FunScript.Tests/edge/double_edge.js' to '/Users/yupferris/dev/projects/FunScript/build/tests/edge/double_edge.js' | |
Target _CopyAppConfigFile: | |
Copying file from '/Users/yupferris/dev/projects/FunScript/tests/FunScript.Tests/app.config' to '/Users/yupferris/dev/projects/FunScript/build/tests/FunScript.Tests.dll.config' | |
Target DeployOutputFiles: | |
Copying file from '/Users/yupferris/dev/projects/FunScript/tests/FunScript.Tests/obj/Debug/FunScript.Tests.dll.mdb' to '/Users/yupferris/dev/projects/FunScript/build/tests/FunScript.Tests.dll.mdb' | |
Copying file from '/Users/yupferris/dev/projects/FunScript/tests/FunScript.Tests/obj/Debug/FunScript.Tests.dll' to '/Users/yupferris/dev/projects/FunScript/build/tests/FunScript.Tests.dll' | |
Done building project "/Users/yupferris/dev/projects/FunScript/tests/FunScript.Tests/FunScript.Tests.fsproj". | |
Build succeeded. | |
0 Warning(s) | |
0 Error(s) | |
Time Elapsed 00:00:18.2899600 | |
Build-Test-Output: /Users/yupferris/dev/projects/FunScript/build/tests/EdgeJs.dll | |
Build-Test-Output: /Users/yupferris/dev/projects/FunScript/build/tests/FSharp.Control.Reactive.dll | |
Build-Test-Output: /Users/yupferris/dev/projects/FunScript/build/tests/FSharp.Core.dll | |
Build-Test-Output: /Users/yupferris/dev/projects/FunScript/build/tests/FunScript.Interop.dll | |
Build-Test-Output: /Users/yupferris/dev/projects/FunScript/build/tests/FunScript.Interop.dll.mdb | |
Build-Test-Output: /Users/yupferris/dev/projects/FunScript/build/tests/FunScript.Rx.dll | |
Build-Test-Output: /Users/yupferris/dev/projects/FunScript/build/tests/FunScript.Rx.dll.mdb | |
Build-Test-Output: /Users/yupferris/dev/projects/FunScript/build/tests/FunScript.Tests.dll | |
Build-Test-Output: /Users/yupferris/dev/projects/FunScript/build/tests/FunScript.Tests.dll.config | |
Build-Test-Output: /Users/yupferris/dev/projects/FunScript/build/tests/FunScript.Tests.dll.mdb | |
Build-Test-Output: /Users/yupferris/dev/projects/FunScript/build/tests/FunScript.dll | |
Build-Test-Output: /Users/yupferris/dev/projects/FunScript/build/tests/FunScript.dll.mdb | |
Build-Test-Output: /Users/yupferris/dev/projects/FunScript/build/tests/System.Reactive.Core.dll | |
Build-Test-Output: /Users/yupferris/dev/projects/FunScript/build/tests/System.Reactive.Interfaces.dll | |
Build-Test-Output: /Users/yupferris/dev/projects/FunScript/build/tests/System.Reactive.Linq.dll | |
Build-Test-Output: /Users/yupferris/dev/projects/FunScript/build/tests/nunit.framework.dll | |
Build-Test-Output: /Users/yupferris/dev/projects/FunScript/build/tests/edge/double_edge.js | |
Build-Test-Output: /Users/yupferris/dev/projects/FunScript/build/tests/edge/edge.js | |
Build-Test-Output: /Users/yupferris/dev/projects/FunScript/build/tests/edge/x64/edge.node | |
Build-Test-Output: /Users/yupferris/dev/projects/FunScript/build/tests/edge/x64/node.dll | |
Build-Test-Output: /Users/yupferris/dev/projects/FunScript/build/tests/edge/x86/edge.node | |
Build-Test-Output: /Users/yupferris/dev/projects/FunScript/build/tests/edge/x86/node.dll | |
Finished Target: Build-Test | |
Starting Target: Run-Test (==> Build-Test) | |
Run-Test-Dlls: /Users/yupferris/dev/projects/FunScript/build/tests/FunScript.Tests.dll | |
/Users/yupferris/dev/projects/FunScript/packages/NUnit.Runners/tools/nunit-console.exe "-nologo" "-labels" "/Users/yupferris/dev/projects/FunScript/build/tests/FunScript.Tests.dll" "-xml:TestResult.xml" "-framework:4.5" | |
mono /Users/yupferris/dev/projects/FunScript/packages/NUnit.Runners/tools/nunit-console.exe "-nologo" "-labels" "/Users/yupferris/dev/projects/FunScript/build/tests/FunScript.Tests.dll" "-xml:TestResult.xml" "-framework:4.5" | |
WARNING: The runtime version supported by this application is unavailable. | |
Using default runtime: v4.0.30319 | |
ProcessModel: Default DomainUsage: Single | |
Execution Runtime: v4.5 | |
***** FunScript.Tests.Arithmetic.abs works | |
// Code: | |
var b, a;a = (function(c){return Math.abs(c);;});b = (function(c){return Math.round(c);;});return b((a(-4) * 1000.000000)) | |
***** FunScript.Tests.Arithmetic.acos works | |
// Code: | |
var b, a;a = (function(c){return Math.acos(c);;});b = (function(c){return Math.round(c);;});return b((a(0.250000) * 1000.000000)) | |
***** FunScript.Tests.Arithmetic.asin works | |
// Code: | |
var b, a;a = (function(c){return Math.asin(c);;});b = (function(c){return Math.round(c);;});return b((a(0.250000) * 1000.000000)) | |
***** FunScript.Tests.Arithmetic.atan works | |
// Code: | |
var b, a;a = (function(c){return Math.atan(c);;});b = (function(c){return Math.round(c);;});return b((a(0.250000) * 1000.000000)) | |
***** FunScript.Tests.Arithmetic.atan2 works | |
// Code: | |
var b, a;a = (function(c,d){return Math.atan2(c, d);;});b = (function(c){return Math.round(c);;});return b((a(-0.250000, -0.250000) * 1000.000000)) | |
***** FunScript.Tests.Arithmetic.Bitwise and can be generated | |
// Code: | |
return (6 & 2) | |
***** FunScript.Tests.Arithmetic.Bitwise or can be generated | |
// Code: | |
return (4 | 2) | |
***** FunScript.Tests.Arithmetic.Bitwise shift left can be generated | |
// Code: | |
return (4 << 2) | |
***** FunScript.Tests.Arithmetic.Bitwise shift right can be generated | |
// Code: | |
return (4 >> 2) | |
***** FunScript.Tests.Arithmetic.ceil works | |
// Code: | |
var b, a;a = (function(c){return Math.ceil(c);;});b = (function(c){return Math.round(c);;});return b((a(11.250000) * 1000.000000)) | |
***** FunScript.Tests.Arithmetic.cos works | |
// Code: | |
var b, a;a = (function(c){return Math.cos(c);;});b = (function(c){return Math.round(c);;});return b((a((0.250000 * 3.141593)) * 1000.000000)) | |
***** FunScript.Tests.Arithmetic.E works | |
// Code: | |
var a;a = (function(b){return Math.round(b);;});return a((2.718282 * 1000.000000)) | |
***** FunScript.Tests.Arithmetic.Evaluation order is preserved by generated code | |
// Code: | |
return (((4.000000 - 2.000000) * 2.000000) + 1.000000) | |
***** FunScript.Tests.Arithmetic.exp works | |
// Code: | |
var b, a;a = (function(c){return Math.exp(c);;});b = (function(c){return Math.round(c);;});return b((a(8.000000) * 1000.000000)) | |
***** FunScript.Tests.Arithmetic.floor works | |
// Code: | |
var b, a;a = (function(c){return Math.floor(c);;});b = (function(c){return Math.round(c);;});return b((a(11.750000) * 1000.000000)) | |
***** FunScript.Tests.Arithmetic.Infix add can be generated | |
// Code: | |
return (4.000000 + 2.000000) | |
***** FunScript.Tests.Arithmetic.Infix divide can be generated | |
// Code: | |
return (4.000000 / 2.000000) | |
***** FunScript.Tests.Arithmetic.Infix modulo can be generated | |
// Code: | |
return (4.000000 % 2.000000) | |
***** FunScript.Tests.Arithmetic.Infix multiply can be generated | |
// Code: | |
return (4.000000 * 2.000000) | |
***** FunScript.Tests.Arithmetic.Infix subtract can be generated | |
// Code: | |
return (4.000000 - 2.000000) | |
***** FunScript.Tests.Arithmetic.log works | |
// Code: | |
var b, a;a = (function(c){return Math.log(c);;});b = (function(c){return Math.round(c);;});return b((a(232.120000) * 1000.000000)) | |
***** FunScript.Tests.Arithmetic.log10 works | |
// Code: | |
var d, c, b, a;a = (function(e){return Math.LN10;;});b = (function(e){return Math.log(e);;});c = (function(e){return (b(e) / a());});d = (function(e){return Math.round(e);;});return d((c(232.120000) * 1000.000000)) | |
***** FunScript.Tests.Arithmetic.Math.abs works | |
// Code: | |
var b, a;a = (function(c){return Math.abs(c);;});b = (function(c){return Math.round(c);;});return b((a(-4) * 1000.000000)) | |
***** FunScript.Tests.Arithmetic.Math.acos works | |
// Code: | |
var b, a;a = (function(c){return Math.acos(c);;});b = (function(c){return Math.round(c);;});return b((a(0.250000) * 1000.000000)) | |
***** FunScript.Tests.Arithmetic.Math.asin works | |
// Code: | |
var b, a;a = (function(c){return Math.asin(c);;});b = (function(c){return Math.round(c);;});return b((a(0.250000) * 1000.000000)) | |
***** FunScript.Tests.Arithmetic.Math.atan works | |
// Code: | |
var b, a;a = (function(c){return Math.atan(c);;});b = (function(c){return Math.round(c);;});return b((a(0.250000) * 1000.000000)) | |
***** FunScript.Tests.Arithmetic.Math.atan2 works | |
// Code: | |
var b, a;a = (function(c,d){return Math.atan2(c, d);;});b = (function(c){return Math.round(c);;});return b((a(-0.250000, -0.250000) * 1000.000000)) | |
***** FunScript.Tests.Arithmetic.Math.ceil works | |
// Code: | |
var b, a;a = (function(c){return Math.ceil(c);;});b = (function(c){return Math.round(c);;});return b((a(11.250000) * 1000.000000)) | |
***** FunScript.Tests.Arithmetic.Math.cos works | |
// Code: | |
var b, a;a = (function(c){return Math.cos(c);;});b = (function(c){return Math.round(c);;});return b((a((0.250000 * 3.141593)) * 1000.000000)) | |
***** FunScript.Tests.Arithmetic.Math.exp works | |
// Code: | |
var b, a;a = (function(c){return Math.exp(c);;});b = (function(c){return Math.round(c);;});return b((a(8.000000) * 1000.000000)) | |
***** FunScript.Tests.Arithmetic.Math.floor works | |
// Code: | |
var b, a;a = (function(c){return Math.floor(c);;});b = (function(c){return Math.round(c);;});return b((a(11.750000) * 1000.000000)) | |
***** FunScript.Tests.Arithmetic.Math.log works | |
// Code: | |
var b, a;a = (function(c){return Math.log(c);;});b = (function(c){return Math.round(c);;});return b((a(232.120000) * 1000.000000)) | |
***** FunScript.Tests.Arithmetic.Math.log10 works | |
// Code: | |
var d, c, b, a;a = (function(e){return Math.LN10;;});b = (function(e){return Math.log(e);;});c = (function(e){return (b(e) / a());});d = (function(e){return Math.round(e);;});return d((c(232.120000) * 1000.000000)) | |
***** FunScript.Tests.Arithmetic.Math.pown works | |
// Code: | |
var b, a;a = (function(c,d){return Math.pow(c, d);;});b = (function(c){return Math.round(c);;});return b((a(2.200000, 3.000000) * 1000.000000)) | |
***** FunScript.Tests.Arithmetic.Math.round works | |
// Code: | |
var a;a = (function(b){return Math.round(b);;});return a((a(-12.500000) * 1000.000000)) | |
***** FunScript.Tests.Arithmetic.Math.sin works | |
// Code: | |
var b, a;a = (function(c){return Math.round(c);;});b = (function(c){return Math.sin(c);;});return a((b((0.250000 * 3.141593)) * 1000.000000)) | |
***** FunScript.Tests.Arithmetic.Math.sqrt works | |
// Code: | |
var b, a;a = (function(c){return Math.round(c);;});b = (function(c){return Math.sqrt(c);;});return a((b(4.000000) * 1000.000000)) | |
***** FunScript.Tests.Arithmetic.Math.tan works | |
// Code: | |
var b, a;a = (function(c){return Math.round(c);;});b = (function(c){return Math.tan(c);;});return a((b((0.250000 * 3.141593)) * 1000.000000)) | |
***** FunScript.Tests.Arithmetic.PI works | |
// Code: | |
var a;a = (function(b){return Math.round(b);;});return a((3.141593 * 1000.000000)) | |
***** FunScript.Tests.Arithmetic.pown works | |
// Code: | |
var b, a;a = (function(c,d){return Math.pow(c, d);;});b = (function(c){return Math.round(c);;});return b((a(2.200000, 3) * 1000.000000)) | |
***** FunScript.Tests.Arithmetic.round works | |
// Code: | |
var a;a = (function(b){return Math.round(b);;});return a((a(-12.500000) * 1000.000000)) | |
***** FunScript.Tests.Arithmetic.sin works | |
// Code: | |
var b, a;a = (function(c){return Math.round(c);;});b = (function(c){return Math.sin(c);;});return a((b((0.250000 * 3.141593)) * 1000.000000)) | |
***** FunScript.Tests.Arithmetic.sqrt works | |
// Code: | |
var b, a;a = (function(c){return Math.round(c);;});b = (function(c){return Math.sqrt(c);;});return a((b(4.000000) * 1000.000000)) | |
***** FunScript.Tests.Arithmetic.tan works | |
// Code: | |
var b, a;a = (function(c){return Math.round(c);;});b = (function(c){return Math.tan(c);;});return a((b((0.250000 * 3.141593)) * 1000.000000)) | |
***** FunScript.Tests.Arrays.Array as IList count has same behaviour | |
// Code: | |
var a = [1.000000, 2.000000, 3.000000];var b = a;return Object.keys(b).length | |
***** FunScript.Tests.Arrays.Array as IList indexer has same behaviour | |
// Code: | |
var a = [1.000000, 2.000000, 3.000000];var b = a;return (b[0] + b[2]) | |
***** FunScript.Tests.Arrays.Array as IList Seq.length has same behaviour | |
// Code: | |
var o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(p){return p.length;;});b = (function(p){var q = this;{};q.factory = p;});c = (function(p){return p.Value;;});d = (function(p){return p.Value;;});e = (function(p){return ((p.Tag == 1.000000) && true);});f = (function(p){return p.GetEnumerator();});g = (function(p,q,r){return h((function(s){return (function(t){return (function(u){return p(t)(u);});});}), q, r);});h = (function(p,q,r){return i(p, q, f(r));});i = (function(p,q,r){var s = {contents: 0};var t = {contents: q};while (r.MoveNext()){t.contents = p(s.contents)(t.contents)(r.get_Current());null;s.contents = (s.contents + 1);null;};return t.contents;});j = (function(p){var q;q = (new b(p));return {GetEnumerator: (function(r){return (function(s,r){var t;return s.factory(t);})(q, r);})};});k = (function(p){return g((function(q){return (function(r){return (q + 1);});}), 0, p);});l = (function(p){return m((function(q){if ((q < a(p))) {return {Tag: 1.000000, Value: (new n(p[q], (q + 1)))};}else{return {Tag: 0.000000};};}), 0);});m = (function(p,q){return j((function(r){var s;s = (new o(q, p));return {get_Current: (function(t){return (function(u,t){return u.current;})(s, t);}), MoveNext: (function(t){return (function(u,t){var v = (function(w){var x = c(u.acc);var y = u.unfold(x);if ((y.Tag == 1.000000)) {var z = d(y).Items[0.000000];var A = d(y).Items[1.000000];u.acc = {Tag: 1.000000, Value: A};u.current = z;return true;}else{u.acc = {Tag: 0.000000};u.current = null;return false;};});return (e(u.acc) && (function(){var w;return v(w);})());})(s, t);}), Reset: (function(t){return (function(u,t){u.acc = {Tag: 1.000000, Value: u.seed};u.current = null;})(s, t);}), Dispose: (function(t){return (function(u,t){;})(s, t);})};}));});n = (function(Item0,Item1){var r = this;r.Items = [Item0, Item1];});o = (function(p,q){var r = this;{};r.seed = p;r.unfold = q;r.acc = {Tag: 1.000000, Value: r.seed};r.current = null;});var p = [1.000000, 2.000000, 3.000000];var q = p;return k(l(q)) | |
***** FunScript.Tests.Arrays.Array indexer getter works | |
// Code: | |
var a = [1.000000, 2.000000, 3.000000, 4.000000, 5.000000];return a[2] | |
***** FunScript.Tests.Arrays.Array indexer setter works | |
// Code: | |
var a = [1.000000, 2.000000, 3.000000, 4.000000, 5.000000];a[3] = 10.000000;return null | |
***** FunScript.Tests.Arrays.Array literals work | |
// Code: | |
var a = [1, 2, 3, 4, 5];return true | |
***** FunScript.Tests.Arrays.Array.append works | |
// Code: | |
var a;a = (function(b,c){return b.concat(c);;});var b = [1.000000, 2.000000, 3.000000, 4.000000];var c = [0.000000];var d = a(c, b);return (d[0] + d[1]) | |
***** FunScript.Tests.Arrays.Array.average works | |
// Code: | |
var f, e, d, c, b, a;a = (function(g){var h = e(g);var i = f((function(j){return 1;}), g);return (h / i);});b = (function(g,h,i){return c((function(j){return (function(k){return (function(l){return g(k)(l);});});}), h, i);});c = (function(g,h,i){var j = h;for (var k = 0; k <= (d(i) - 1); k++){j = g(k)(j)(i[k]);null;};return j;});d = (function(g){return g.length;;});e = (function(g){return b((function(h){return (function(i){return (h + i);});}), 0, g);});f = (function(g,h){return b((function(i){return (function(j){return (i + g(j));});}), 0, h);});var g = [1.000000, 2.000000, 3.000000, 4.000000];return a(g) | |
***** FunScript.Tests.Arrays.Array.averageBy works | |
// Code: | |
var e, d, c, b, a;a = (function(f,g){var h = e(f, g);var i = e((function(j){return 1;}), g);return (h / i);});b = (function(f,g,h){return c((function(i){return (function(j){return (function(k){return f(j)(k);});});}), g, h);});c = (function(f,g,h){var i = g;for (var j = 0; j <= (d(h) - 1); j++){i = f(j)(i)(h[j]);null;};return i;});d = (function(f){return f.length;;});e = (function(f,g){return b((function(h){return (function(i){return (h + f(i));});}), 0, g);});var f = [1.000000, 2.000000, 3.000000, 4.000000];var g = 2.000000;return a((function(h){return (g * h);}), f) | |
***** FunScript.Tests.Arrays.Array.blit works | |
// Code: | |
var b, a;a = (function(c,d,e,f,g){var h = (f - d);for (var i = d; i <= ((d + g) - 1); i++){e[(i + h)] = c[i];null;};return e;});b = (function(c){return new Array(c);;});var c = [1.000000, 2.000000, 3.000000, 4.000000];var d = b(2);a(c, 2, d, 0, 2);return (d[0] + d[1]) | |
***** FunScript.Tests.Arrays.Array.choose works | |
// Code: | |
var d, c, b, a;a = (function(e,f){var g = c(0);var h = 0;for (var i = 0; i <= (b(f) - 1); i++){var j = e(f[i]);if ((j.Tag == 0.000000)) {;}else{var k = d(j);g[h] = k;null;h = (h + 1);null;};};return g;});b = (function(e){return e.length;;});c = (function(e){return new Array(e);;});d = (function(e){return e.Value;;});var e = [1.000000, 2.000000, 3.000000, 4.000000];var f = a((function(g){if ((g > 2.000000)) {return {Tag: 1.000000, Value: g};}else{return {Tag: 0.000000};};}), e);return (f[0] + f[1]) | |
***** FunScript.Tests.Arrays.Array.collect works | |
// Code: | |
var f, e, d, c, b, a;a = (function(g,h){return b(d(g, h));});b = (function(g){return [].concat.apply([], g);;});c = (function(g){return g.length;;});d = (function(g,h){return e((function(i){return (function(j){return g(j);});}), h);});e = (function(g,h){var i = f(c(h));for (var j = 0; j <= (c(h) - 1); j++){i[j] = g(j)(h[j]);null;};return i;});f = (function(g){return new Array(g);;});var g = [[1.000000], [2.000000], [3.000000], [4.000000]];var h = a((function(i){return i;}), g);return (h[0] + h[1]) | |
***** FunScript.Tests.Arrays.Array.concat works | |
// Code: | |
var r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(s){return s.length;;});b = (function(s){return c(o(s));});c = (function(s){return [].concat.apply([], s);;});d = (function(s){return new Array(s);;});e = (function(s){var t = this;{};t.factory = s;});f = (function(s){return s.Value;;});g = (function(s){return s.Value;;});h = (function(s){return ((s.Tag == 1.000000) && true);});i = (function(s){return s.GetEnumerator();});j = (function(s,t,u){return k(s, t, i(u));});k = (function(s,t,u){var v = {contents: 0};var w = {contents: t};while (u.MoveNext()){w.contents = s(v.contents)(w.contents)(u.get_Current());null;v.contents = (v.contents + 1);null;};return w.contents;});l = (function(s){var t;t = (new e(s));return {GetEnumerator: (function(u){return (function(v,u){var w;return v.factory(w);})(t, u);})};});m = (function(s,t){var u;return j((function(v){return (function(w){return (function(x){return s(v)(x);});});}), u, t);});n = (function(s){return p((function(t){if ((t < a(s))) {return {Tag: 1.000000, Value: (new q(s[t], (t + 1)))};}else{return {Tag: 0.000000};};}), 0);});o = (function(s){var t = d(0);m((function(u){return (function(v){t[u] = v;return null;});}), s);return t;});p = (function(s,t){return l((function(u){var v;v = (new r(t, s));return {get_Current: (function(w){return (function(x,w){return x.current;})(v, w);}), MoveNext: (function(w){return (function(x,w){var y = (function(z){var A = f(x.acc);var B = x.unfold(A);if ((B.Tag == 1.000000)) {var C = g(B).Items[0.000000];var D = g(B).Items[1.000000];x.acc = {Tag: 1.000000, Value: D};x.current = C;return true;}else{x.acc = {Tag: 0.000000};x.current = null;return false;};});return (h(x.acc) && (function(){var z;return y(z);})());})(v, w);}), Reset: (function(w){return (function(x,w){x.acc = {Tag: 1.000000, Value: x.seed};x.current = null;})(v, w);}), Dispose: (function(w){return (function(x,w){;})(v, w);})};}));});q = (function(Item0,Item1){var u = this;u.Items = [Item0, Item1];});r = (function(s,t){var u = this;{};u.seed = s;u.unfold = t;u.acc = {Tag: 1.000000, Value: u.seed};u.current = null;});var s = [[1.000000], [2.000000], [3.000000], [4.000000]];var t = b(n(s));return (t[0] + t[1]) | |
***** FunScript.Tests.Arrays.Array.copy works | |
// Code: | |
var a;a = (function(b){return b.slice(0);;});var b = [1.000000, 2.000000, 3.000000, 4.000000];var c = a(b);return (c[0] + c[1]) | |
***** FunScript.Tests.Arrays.Array.empty works | |
// Code: | |
var b, a;a = (function(c){return c.length;;});b = (function(){return [];});var c = b();return a(c) | |
***** FunScript.Tests.Arrays.Array.exists works | |
// Code: | |
var c, b, a;a = (function(d,e){return b(d, e, 0);});b = (function(d,e,f){if ((f == c(e))) {return false;}else{return (d(e[f]) || b(d, e, (f + 1)));};});c = (function(d){return d.length;;});var d = [1.000000, 2.000000, 3.000000, 4.000000];return a((function(e){return (e == 2.000000);}), d) | |
***** FunScript.Tests.Arrays.Array.exists2 works | |
// Code: | |
var c, b, a;a = (function(d,e,f){if ((c(e) != c(f))) {throw ("Arrays had different lengths");null;}else{;};return b(d, e, f, 0);});b = (function(d,e,f,g){if ((g == c(e))) {return false;}else{return (d(e[g])(f[g]) || b(d, e, f, (g + 1)));};});c = (function(d){return d.length;;});var d = [1.000000, 2.000000, 3.000000, 4.000000];var e = [1.000000, 2.000000, 3.000000, 4.000000];return a((function(f){return (function(g){return ((f * g) == 16.000000);});}), d, e) | |
***** FunScript.Tests.Arrays.Array.fill works | |
// Code: | |
var b, a;a = (function(c,d,e,f){for (var g = d; g <= ((d + e) - 1); g++){c[g] = f;null;};});b = (function(c){return new Array(c);;});var c = b(2);a(c, 0, 2, 2.000000);return (c[0] + c[1]) | |
***** FunScript.Tests.Arrays.Array.filter works | |
// Code: | |
var d, c, b, a;a = (function(e){return e.length;;});b = (function(e,f){var g = d(0);var h = 0;for (var i = 0; i <= (c(f) - 1); i++){if (e(f[i])) {g[h] = f[i];null;h = (h + 1);null;}else{;};};return g;});c = (function(e){return e.length;;});d = (function(e){return new Array(e);;});var e = [1.000000, 2.000000, 3.000000, 4.000000];var f = b((function(g){return (g > 2.000000);}), e);return a(f) | |
***** FunScript.Tests.Arrays.Array.find works | |
// Code: | |
var g, f, e, d, c, b, a;a = (function(h,i){return b((function(j){return (function(k){return h(k);});}), i);});b = (function(h,i){var j = d(h, i);if ((j.Tag == 1.000000)) {var k = g(j);return k;}else{throw ("Array did not contain any matching elements");return null;};});c = (function(h){return h.length;;});d = (function(h,i){return e((function(j){return (function(k){if (h(j)(k)) {return {Tag: 1.000000, Value: k};}else{return {Tag: 0.000000};};});}), i);});e = (function(h,i){return f(h, 0, i);});f = (function(h,i,j){if ((i == c(j))) {return {Tag: 0.000000};}else{var k = h(i)(j[i]);if ((k.Tag == 0.000000)) {return f(h, (i + 1), j);}else{return k;};};});g = (function(h){return h.Value;;});var h = [1.000000, 2.000000, 3.000000, 4.000000];var i = 2.000000;return a((function(j){return (i == j);}), h) | |
***** FunScript.Tests.Arrays.Array.findIndex works | |
// Code: | |
var f, e, d, c, b, a;a = (function(g,h){var i = c(g, h);if ((i.Tag == 1.000000)) {var j = f(i);return j;}else{throw ("Array did not contain any matching elements");return null;};});b = (function(g){return g.length;;});c = (function(g,h){return d((function(i){return (function(j){if (g(j)) {return {Tag: 1.000000, Value: i};}else{return {Tag: 0.000000};};});}), h);});d = (function(g,h){return e(g, 0, h);});e = (function(g,h,i){if ((h == b(i))) {return {Tag: 0.000000};}else{var j = g(h)(i[h]);if ((j.Tag == 0.000000)) {return e(g, (h + 1), i);}else{return j;};};});f = (function(g){return g.Value;;});var g = [1.000000, 2.000000, 3.000000, 4.000000];var h = 2.000000;return a((function(i){return (h == i);}), g) | |
***** FunScript.Tests.Arrays.Array.fold works | |
// Code: | |
var c, b, a;a = (function(d,e,f){return b((function(g){return (function(h){return (function(i){return d(h)(i);});});}), e, f);});b = (function(d,e,f){var g = e;for (var h = 0; h <= (c(f) - 1); h++){g = d(h)(g)(f[h]);null;};return g;});c = (function(d){return d.length;;});var d = [1.000000, 2.000000, 3.000000, 4.000000];var e = (function(f){return (function(g){return (f + g);});});var f = 0.000000;var g = (function(h){return a(e, f, h);})(d);return g | |
***** FunScript.Tests.Arrays.Array.fold2 works | |
// Code: | |
var c, b, a;a = (function(d,e,f,g){return b((function(h){return (function(i){return (function(j){return (function(k){return d(i)(j)(k);});});});}), e, f, g);});b = (function(d,e,f,g){var h = e;if ((c(f) != c(g))) {throw ("Arrays had different lengths");null;}else{;};for (var i = 0; i <= (c(f) - 1); i++){h = d(i)(h)(f[i])(g[i]);null;};return h;});c = (function(d){return d.length;;});var d = [1.000000, 2.000000, 3.000000, 4.000000];var e = [1.000000, 2.000000, 3.000000, 4.000000];var f = a((function(g){return (function(h){return (function(i){return ((g + h) + i);});});}), 0.000000, d, e);return f | |
***** FunScript.Tests.Arrays.Array.foldBack works | |
// Code: | |
var c, b, a;a = (function(d,e,f){return b((function(g){return (function(h){return (function(i){return d(h)(i);});});}), e, f);});b = (function(d,e,f){var g = f;var h = c(e);for (var i = 1; i <= h; i++){g = d((i - 1))(e[(h - i)])(g);null;};return g;});c = (function(d){return d.length;;});var d = [1.000000, 2.000000, 3.000000, 4.000000];var e = a((function(f){return (function(g){return (f + g);});}), d, 0.000000);return e | |
***** FunScript.Tests.Arrays.Array.foldBack2 works | |
// Code: | |
var c, b, a;a = (function(d,e,f,g){return b((function(h){return (function(i){return (function(j){return (function(k){return d(i)(j)(k);});});});}), e, f, g);});b = (function(d,e,f,g){var h = g;if ((c(e) != c(f))) {throw ("Arrays had different lengths");null;}else{;};var i = c(e);for (var j = 1; j <= i; j++){h = d((j - 1))(e[(i - j)])(f[(i - j)])(h);null;};return h;});c = (function(d){return d.length;;});var d = [1.000000, 2.000000, 3.000000, 4.000000];var e = [1.000000, 2.000000, 3.000000, 4.000000];var f = a((function(g){return (function(h){return (function(i){return ((g + h) + i);});});}), d, e, 0.000000);return f | |
***** FunScript.Tests.Arrays.Array.forall works | |
// Code: | |
var d, c, b, a;a = (function(e,f,g){return b((function(h){return (function(i){return (function(j){return e(i)(j);});});}), f, g);});b = (function(e,f,g){var h = f;for (var i = 0; i <= (d(g) - 1); i++){h = e(i)(h)(g[i]);null;};return h;});c = (function(e,f){return a((function(g){return (function(h){return (e(h) && g);});}), true, f);});d = (function(e){return e.length;;});var e = [1.000000, 2.000000, 3.000000, 4.000000];return c((function(f){return (f < 5.000000);}), e) | |
***** FunScript.Tests.Arrays.Array.forall2 works | |
// Code: | |
var d, c, b, a;a = (function(e,f,g,h){return b((function(i){return (function(j){return (function(k){return (function(l){return e(j)(k)(l);});});});}), f, g, h);});b = (function(e,f,g,h){var i = f;if ((d(g) != d(h))) {throw ("Arrays had different lengths");null;}else{;};for (var j = 0; j <= (d(g) - 1); j++){i = e(j)(i)(g[j])(h[j]);null;};return i;});c = (function(e,f,g){return a((function(h){return (function(i){return (function(j){return (h && e(i)(j));});});}), true, f, g);});d = (function(e){return e.length;;});var e = [1.000000, 2.000000, 3.000000, 4.000000];var f = [1.000000, 2.000000, 3.000000, 4.000000];return c((function(g){return (function(h){return (g == h);});}), e, f) | |
***** FunScript.Tests.Arrays.Array.init works | |
// Code: | |
var b, a;a = (function(c,d){var e = b(0);for (var f = 0; f <= (c - 1); f++){e[f] = d(f);null;};return e;});b = (function(c){return new Array(c);;});var c = a(4, (function(d){return d;}));return (c[0] + c[1]) | |
***** FunScript.Tests.Arrays.Array.isEmpty works | |
// Code: | |
var b, a;a = (function(c){return (b(c) == 0);});b = (function(c){return c.length;;});var c = [1];return a(c) | |
***** FunScript.Tests.Arrays.Array.iter works | |
// Code: | |
var d, c, b, a;a = (function(e,f,g){return b((function(h){return (function(i){return (function(j){return e(i)(j);});});}), f, g);});b = (function(e,f,g){var h = f;for (var i = 0; i <= (d(g) - 1); i++){h = e(i)(h)(g[i]);null;};return h;});c = (function(e,f){var g;return a((function(h){return (function(i){return e(i);});}), g, f);});d = (function(e){return e.length;;});var e = [1.000000, 2.000000, 3.000000, 4.000000];var f = {contents: 0.000000};c((function(g){f.contents = (f.contents + g);}), e);return f.contents | |
***** FunScript.Tests.Arrays.Array.iter2 works | |
// Code: | |
var d, c, b, a;a = (function(e,f,g,h){return b((function(i){return (function(j){return (function(k){return (function(l){return e(j)(k)(l);});});});}), f, g, h);});b = (function(e,f,g,h){var i = f;if ((d(g) != d(h))) {throw ("Arrays had different lengths");null;}else{;};for (var j = 0; j <= (d(g) - 1); j++){i = e(j)(i)(g[j])(h[j]);null;};return i;});c = (function(e,f,g){var h;return a((function(i){return (function(j){return (function(k){return e(j)(k);});});}), h, f, g);});d = (function(e){return e.length;;});var e = [1.000000, 2.000000, 3.000000, 4.000000];var f = {contents: 0.000000};c((function(g){return (function(h){f.contents = ((f.contents + g) + h);});}), e, e);return f.contents | |
***** FunScript.Tests.Arrays.Array.iteri works | |
// Code: | |
var c, b, a;a = (function(d,e,f){var g = e;for (var h = 0; h <= (c(f) - 1); h++){g = d(h)(g)(f[h]);null;};return g;});b = (function(d,e){var f;return a((function(g){return (function(h){return (function(i){return d(g)(i);});});}), f, e);});c = (function(d){return d.length;;});var d = [1.000000, 2.000000, 3.000000, 4.000000];var e = {contents: 0.000000};b((function(f){return (function(g){e.contents = (e.contents + (f * g));});}), d);return e.contents | |
***** FunScript.Tests.Arrays.Array.iteri2 works | |
// Code: | |
var c, b, a;a = (function(d,e,f,g){var h = e;if ((c(f) != c(g))) {throw ("Arrays had different lengths");null;}else{;};for (var i = 0; i <= (c(f) - 1); i++){h = d(i)(h)(f[i])(g[i]);null;};return h;});b = (function(d,e,f){var g;return a((function(h){return (function(i){return (function(j){return (function(k){return d(h)(j)(k);});});});}), g, e, f);});c = (function(d){return d.length;;});var d = [1.000000, 2.000000, 3.000000, 4.000000];var e = {contents: 0.000000};b((function(f){return (function(g){return (function(h){e.contents = ((e.contents + (f * g)) + (f * h));});});}), d, d);return e.contents | |
***** FunScript.Tests.Arrays.Array.length works | |
// Code: | |
var a;a = (function(b){return b.length;;});var b = [1.000000, 2.000000, 3.000000, 4.000000];return a(b) | |
***** FunScript.Tests.Arrays.Array.Length works | |
// Code: | |
var a;a = (function(b){return b.length;;});var b = [1.000000, 2.000000, 3.000000, 4.000000];return a(b) | |
***** FunScript.Tests.Arrays.Array.map works | |
// Code: | |
var d, c, b, a;a = (function(e){return e.length;;});b = (function(e,f){return c((function(g){return (function(h){return e(h);});}), f);});c = (function(e,f){var g = d(a(f));for (var h = 0; h <= (a(f) - 1); h++){g[h] = e(h)(f[h]);null;};return g;});d = (function(e){return new Array(e);;});var e = [1.000000];var f = 2.000000;var g = b((function(h){return (f * h);}), e);return g[0] | |
***** FunScript.Tests.Arrays.Array.map2 works | |
// Code: | |
var d, c, b, a;a = (function(e){return e.length;;});b = (function(e,f,g){return c((function(h){return (function(i){return (function(j){return e(i)(j);});});}), f, g);});c = (function(e,f,g){if ((a(f) != a(g))) {throw ("Arrays had different lengths");null;}else{;};var h = d(a(f));for (var i = 0; i <= (a(f) - 1); i++){h[i] = e(i)(f[i])(g[i]);null;};return h;});d = (function(e){return new Array(e);;});var e = [1.000000];var f = [2.000000];var g = b((function(h){return (function(i){return (h * i);});}), e, f);return g[0] | |
***** FunScript.Tests.Arrays.Array.mapi works | |
// Code: | |
var c, b, a;a = (function(d){return d.length;;});b = (function(d,e){var f = c(a(e));for (var g = 0; g <= (a(e) - 1); g++){f[g] = d(g)(e[g]);null;};return f;});c = (function(d){return new Array(d);;});var d = [1.000000];var e = b((function(f){return (function(g){return (f + g);});}), d);return e[0] | |
***** FunScript.Tests.Arrays.Array.mapi2 works | |
// Code: | |
var c, b, a;a = (function(d){return d.length;;});b = (function(d,e,f){if ((a(e) != a(f))) {throw ("Arrays had different lengths");null;}else{;};var g = c(a(e));for (var h = 0; h <= (a(e) - 1); h++){g[h] = d(h)(e[h])(f[h]);null;};return g;});c = (function(d){return new Array(d);;});var d = [1.000000];var e = [2.000000];var f = b((function(g){return (function(h){return (function(i){return (g + (h * i));});});}), d, e);return f[0] | |
***** FunScript.Tests.Arrays.Array.max works | |
// Code: | |
var d, c, b, a;a = (function(e,f,g){var h = f;for (var i = 0; i <= (b(g) - 1); i++){h = e(i)(h)(g[i]);null;};return h;});b = (function(e){return e.length;;});c = (function(e){return d((function(f){return (function(g){if ((g > f)) {return g;}else{return f;};});}), e);});d = (function(e,f){if ((b(f) == 0)) {throw ("Array was empty");return null;}else{return a((function(g){return (function(h){return (function(i){if ((g == 0)) {return i;}else{return e(h)(i);};});});}), null, f);};});var e = [1.000000, 2.000000];return c(e) | |
***** FunScript.Tests.Arrays.Array.maxBy works | |
// Code: | |
var d, c, b, a;a = (function(e,f,g){var h = f;for (var i = 0; i <= (b(g) - 1); i++){h = e(i)(h)(g[i]);null;};return h;});b = (function(e){return e.length;;});c = (function(e,f){return d((function(g){return (function(h){if ((e(h) > e(g))) {return h;}else{return g;};});}), f);});d = (function(e,f){if ((b(f) == 0)) {throw ("Array was empty");return null;}else{return a((function(g){return (function(h){return (function(i){if ((g == 0)) {return i;}else{return e(h)(i);};});});}), null, f);};});var e = [1.000000, 2.000000];return c((function(f){return (-f);}), e) | |
***** FunScript.Tests.Arrays.Array.min works | |
// Code: | |
var d, c, b, a;a = (function(e,f,g){var h = f;for (var i = 0; i <= (b(g) - 1); i++){h = e(i)(h)(g[i]);null;};return h;});b = (function(e){return e.length;;});c = (function(e){return d((function(f){return (function(g){if ((g < f)) {return g;}else{return f;};});}), e);});d = (function(e,f){if ((b(f) == 0)) {throw ("Array was empty");return null;}else{return a((function(g){return (function(h){return (function(i){if ((g == 0)) {return i;}else{return e(h)(i);};});});}), null, f);};});var e = [1.000000, 2.000000];return c(e) | |
***** FunScript.Tests.Arrays.Array.minBy works | |
// Code: | |
var d, c, b, a;a = (function(e,f,g){var h = f;for (var i = 0; i <= (b(g) - 1); i++){h = e(i)(h)(g[i]);null;};return h;});b = (function(e){return e.length;;});c = (function(e,f){return d((function(g){return (function(h){if ((e(h) > e(g))) {return g;}else{return h;};});}), f);});d = (function(e,f){if ((b(f) == 0)) {throw ("Array was empty");return null;}else{return a((function(g){return (function(h){return (function(i){if ((g == 0)) {return i;}else{return e(h)(i);};});});}), null, f);};});var e = [1.000000, 2.000000];return c((function(f){return (-f);}), e) | |
***** FunScript.Tests.Arrays.Array.ofList works | |
// Code: | |
var m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(n){return new Array(n);;});b = (function(n,o){return (new l(n, o));});c = (function(){return (new m());});d = (function(n,o,p){return e((function(q){return (function(r){return (function(s){return n(r)(s);});});}), o, p);});e = (function(n,o,p){return g(n, 0, o, p);});f = (function(n,o,p){return h(n, 0, o, p);});g = (function(n,o,p,q){if ((q.Tag == 1.000000)) {var r = q.Item2;var s = q.Item1;return g(n, (o + 1), n(o)(p)(s), r);}else{return p;};});h = (function(n,o,p,q){if ((q.Tag == 1.000000)) {var r = q.Item2;var s = q.Item1;return h(n, (o + 1), n(o)(p)(s), r);}else{return p;};});i = (function(n,o){var p;return f((function(q){return (function(r){return (function(s){return n(q)(s);});});}), p, o);});j = (function(n){return d((function(o){return (function(p){return (o + 1);});}), 0, n);});k = (function(n){var o = j(n);var p = a(o);i((function(q){return (function(r){p[q] = r;return null;});}), n);return p;});l = (function(Item1,Item2){var p = this;p.Tag = 1.000000;p._CaseName = "Cons";p.Item1 = Item1;p.Item2 = Item2;});m = (function(){var n = this;n.Tag = 0.000000;n._CaseName = "Nil";});var n = b(1.000000, b(2.000000, c()));var o = k(n);return o[0] | |
***** FunScript.Tests.Arrays.Array.ofSeq works | |
// Code: | |
var u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(v){return new Array(v);;});b = (function(v){var w = this;{};w.factory = v;});c = (function(v,w){return (new t(v, w));});d = (function(){return (new u());});e = (function(v){if ((v.Tag == 1.000000)) {var w = v.Item2;var x = v.Item1;return x;}else{throw ("List was empty");return null;};});f = (function(v){if ((v.Tag == 1.000000)) {var w = v.Item2;var x = v.Item1;return w;}else{throw ("List was empty");return null;};});g = (function(v){return v.Value;;});h = (function(v){return v.Value;;});i = (function(v){return ((v.Tag == 1.000000) && true);});j = (function(v){return v.GetEnumerator();});k = (function(v,w,x){return l(v, w, j(x));});l = (function(v,w,x){var y = {contents: 0};var z = {contents: w};while (x.MoveNext()){z.contents = v(y.contents)(z.contents)(x.get_Current());null;y.contents = (y.contents + 1);null;};return z.contents;});m = (function(v){var w;w = (new b(v));return {GetEnumerator: (function(x){return (function(y,x){var z;return y.factory(z);})(w, x);})};});n = (function(v,w){var x;return k((function(y){return (function(z){return (function(A){return v(y)(A);});});}), x, w);});o = (function(v){return q((function(w){if ((w.Tag == 1.000000)) {var x = f(w);var y = e(w);return {Tag: 1.000000, Value: (new r(y, x))};}else{return {Tag: 0.000000};};}), v);});p = (function(v){var w = a(0);n((function(x){return (function(y){w[x] = y;return null;});}), v);return w;});q = (function(v,w){return m((function(x){var y;y = (new s(w, v));return {get_Current: (function(z){return (function(A,z){return A.current;})(y, z);}), MoveNext: (function(z){return (function(A,z){var B = (function(C){var D = g(A.acc);var E = A.unfold(D);if ((E.Tag == 1.000000)) {var F = h(E).Items[0.000000];var G = h(E).Items[1.000000];A.acc = {Tag: 1.000000, Value: G};A.current = F;return true;}else{A.acc = {Tag: 0.000000};A.current = null;return false;};});return (i(A.acc) && (function(){var C;return B(C);})());})(y, z);}), Reset: (function(z){return (function(A,z){A.acc = {Tag: 1.000000, Value: A.seed};A.current = null;})(y, z);}), Dispose: (function(z){return (function(A,z){;})(y, z);})};}));});r = (function(Item0,Item1){var x = this;x.Items = [Item0, Item1];});s = (function(v,w){var x = this;{};x.seed = v;x.unfold = w;x.acc = {Tag: 1.000000, Value: x.seed};x.current = null;});t = (function(Item1,Item2){var x = this;x.Tag = 1.000000;x._CaseName = "Cons";x.Item1 = Item1;x.Item2 = Item2;});u = (function(){var v = this;v.Tag = 0.000000;v._CaseName = "Nil";});var v = o(c(1.000000, c(2.000000, d())));var w = p(v);return w[0] | |
***** FunScript.Tests.Arrays.Array.partition works | |
// Code: | |
var d, c, b, a;a = (function(e){return e.length;;});b = (function(e,f){var g = c(0);var h = c(0);var i = 0;var j = 0;for (var k = 0; k <= (a(f) - 1); k++){if (e(f[k])) {g[i] = f[k];null;i = (i + 1);null;}else{h[j] = f[k];null;j = (j + 1);null;};};return (new d(g, h));});c = (function(e){return new Array(e);;});d = (function(Item0,Item1){var g = this;g.Items = [Item0, Item1];});var e = [1.000000, 2.000000];var f = b((function(g){return (g <= 1.000000);}), e);var g = f.Items[1.000000];var h = f.Items[0.000000];return (h[0] - g[0]) | |
***** FunScript.Tests.Arrays.Array.permute works | |
// Code: | |
var j, i, h, g, f, e, d, c, b, a;a = (function(k,l,m){return b((function(n){return (function(o){return (function(p){return k(o)(p);});});}), l, m);});b = (function(k,l,m){var n = l;for (var o = 0; o <= (g(m) - 1); o++){n = k(o)(n)(m[o]);null;};return n;});c = (function(k,l,m){var n = l;for (var o = 0; o <= (f(m) - 1); o++){n = k(o)(n)(m[o]);null;};return n;});d = (function(k,l){return a((function(m){return (function(n){return (k(n) && m);});}), true, l);});e = (function(k,l){var m;return c((function(n){return (function(o){return (function(p){return k(n)(p);});});}), m, l);});f = (function(k){return k.length;;});g = (function(k){return k.length;;});h = (function(k,l){var m = f(l);var n = i(m);var o = j(m);e((function(p){return (function(q){var r = k(p);if (((r < 0) || (r >= m))) {throw ("Not a valid permutation");null;}else{;};n[r] = q;null;o[r] = 1;return null;});}), l);var p = 1;var q = d((function(r){return (p == r);}), o);if ((!q)) {throw ("Not a valid permutation");null;}else{;};return n;});i = (function(k){return new Array(k);;});j = (function(k){return new Array(k);;});var k = [1.000000, 2.000000];var l = h((function(m){return ((m + 1) - (2 * (m % 2)));}), k);return l[0] | |
***** FunScript.Tests.Arrays.Array.pick works | |
// Code: | |
var f, e, d, c, b, a;a = (function(g){return g.length;;});b = (function(g,h){var i = c(g, h);if ((i.Tag == 1.000000)) {var j = f(i);return j;}else{throw ("Array did not contain any matching elements");return null;};});c = (function(g,h){return d((function(i){return (function(j){return g(j);});}), h);});d = (function(g,h){return e(g, 0, h);});e = (function(g,h,i){if ((h == a(i))) {return {Tag: 0.000000};}else{var j = g(h)(i[h]);if ((j.Tag == 0.000000)) {return e(g, (h + 1), i);}else{return j;};};});f = (function(g){return g.Value;;});var g = [1.000000, 2.000000];return b((function(h){if ((h == 2.000000)) {return {Tag: 1.000000, Value: h};}else{return {Tag: 0.000000};};}), g) | |
***** FunScript.Tests.Arrays.Array.reduce works | |
// Code: | |
var c, b, a;a = (function(d,e,f){var g = e;for (var h = 0; h <= (b(f) - 1); h++){g = d(h)(g)(f[h]);null;};return g;});b = (function(d){return d.length;;});c = (function(d,e){if ((b(e) == 0)) {throw ("Array was empty");return null;}else{return a((function(f){return (function(g){return (function(h){if ((f == 0)) {return h;}else{return d(g)(h);};});});}), null, e);};});var d = [1.000000, 2.000000];return c((function(e){return (function(f){return (e + f);});}), d) | |
***** FunScript.Tests.Arrays.Array.reduceBack works | |
// Code: | |
var c, b, a;a = (function(d,e,f){var g = f;var h = b(e);for (var i = 1; i <= h; i++){g = d((i - 1))(e[(h - i)])(g);null;};return g;});b = (function(d){return d.length;;});c = (function(d,e){if ((b(e) == 0)) {throw ("Array was empty");return null;}else{return a((function(f){return (function(g){return (function(h){if ((f == 0)) {return g;}else{return d(h)(g);};});});}), e, null);};});var d = [1.000000, 2.000000];return c((function(e){return (function(f){return (e + f);});}), d) | |
***** FunScript.Tests.Arrays.Array.rev works | |
// Code: | |
var c, b, a;a = (function(d){return d.length;;});b = (function(d){var e = a(d);var f = c(e);for (var g = 0; g <= (e - 1); g++){f[g] = d[((e - 1) - g)];null;};return f;});c = (function(d){return new Array(d);;});var d = [1.000000, 2.000000];var e = b(d);return e[0] | |
***** FunScript.Tests.Arrays.Array.scan works | |
// Code: | |
var c, b, a;a = (function(d){return d.length;;});b = (function(d,e,f){var g = c((a(f) + 1));g[0] = e;null;for (var h = 0; h <= (a(f) - 1); h++){g[(h + 1)] = d(g[h])(f[h]);null;};return g;});c = (function(d){return new Array(d);;});var d = [1.000000, 2.000000, 3.000000, 4.000000];var e = (function(f){return (function(g){return (f + g);});});var f = 0.000000;var g = (function(h){return b(e, f, h);})(d);return (g[0] + g[1]) | |
***** FunScript.Tests.Arrays.Array.scanBack works | |
// Code: | |
var c, b, a;a = (function(d){return d.length;;});b = (function(d,e,f){var g = c((a(e) + 1));var h = a(e);g[a(e)] = f;null;for (var i = 1; i <= a(e); i++){g[(h - i)] = d(e[(h - i)])(g[((h - i) + 1)]);null;};return g;});c = (function(d){return new Array(d);;});var d = [1.000000, 2.000000, 3.000000];var e = b((function(f){return (function(g){return (f + g);});}), d, 0.000000);return (e[0] + e[1]) | |
***** FunScript.Tests.Arrays.Array.sort works | |
// Code: | |
var d, c, b, a;a = (function(e){return e.slice(0);;});b = (function(e){var f = a(e);c(f);return f;});c = (function(e){return d((function(f){return (function(g){return (f < g ? -1 : (f == g ? 0 : 1));});}), e);});d = (function(e,f){f.sort(function($a,$b) { return e($a)($b); });;});var e = [3.000000, 4.000000, 1.000000, 2.000000];var f = b(e);return (f[0] + f[1]) | |
***** FunScript.Tests.Arrays.Array.sortBy works | |
// Code: | |
var d, c, b, a;a = (function(e){return e.slice(0);;});b = (function(e,f){var g = a(f);c(e, g);return g;});c = (function(e,f){return d((function(g){return (function(h){var i = e(g);var j = e(h);return (i < j ? -1 : (i == j ? 0 : 1));});}), f);});d = (function(e,f){f.sort(function($a,$b) { return e($a)($b); });;});var e = [3.000000, 4.000000, 1.000000, 2.000000];var f = b((function(g){return (-g);}), e);return (f[0] + f[1]) | |
***** FunScript.Tests.Arrays.Array.sortInPlace works | |
// Code: | |
var b, a;a = (function(c){return b((function(d){return (function(e){return (d < e ? -1 : (d == e ? 0 : 1));});}), c);});b = (function(c,d){d.sort(function($a,$b) { return c($a)($b); });;});var c = [3.000000, 4.000000, 1.000000, 2.000000];a(c);return (c[0] + c[1]) | |
***** FunScript.Tests.Arrays.Array.sortInPlaceBy works | |
// Code: | |
var b, a;a = (function(c,d){return b((function(e){return (function(f){var g = c(e);var h = c(f);return (g < h ? -1 : (g == h ? 0 : 1));});}), d);});b = (function(c,d){d.sort(function($a,$b) { return c($a)($b); });;});var c = [3.000000, 4.000000, 1.000000, 2.000000];a((function(d){return (-d);}), c);return (c[0] + c[1]) | |
***** FunScript.Tests.Arrays.Array.sortInPlaceWith works | |
// Code: | |
var a;a = (function(b,c){c.sort(function($a,$b) { return b($a)($b); });;});var b = [3.000000, 4.000000, 1.000000, 2.000000];a((function(c){return (function(d){return (c - d);});}), b);return (b[0] + b[1]) | |
***** FunScript.Tests.Arrays.Array.sortWith works | |
// Code: | |
var c, b, a;a = (function(d){return d.slice(0);;});b = (function(d,e){e.sort(function($a,$b) { return d($a)($b); });;});c = (function(d,e){var f = a(e);b(d, f);return f;});var d = [3.000000, 4.000000, 1.000000, 2.000000];var e = c((function(f){return (function(g){return (f - g);});}), d);return (e[0] + e[1]) | |
***** FunScript.Tests.Arrays.Array.sub works | |
// Code: | |
var a;a = (function(b,c,d){return b.slice(c, c + d);;});var b = [1.000000, 2.000000, 3.000000, 4.000000];var c = a(b, 2, 2);return (c[0] + c[1]) | |
***** FunScript.Tests.Arrays.Array.sum works | |
// Code: | |
var d, c, b, a;a = (function(e,f,g){return b((function(h){return (function(i){return (function(j){return e(i)(j);});});}), f, g);});b = (function(e,f,g){var h = f;for (var i = 0; i <= (c(g) - 1); i++){h = e(i)(h)(g[i]);null;};return h;});c = (function(e){return e.length;;});d = (function(e){return a((function(f){return (function(g){return (f + g);});}), 0, e);});var e = [1.000000, 2.000000];return d(e) | |
***** FunScript.Tests.Arrays.Array.sumBy works | |
// Code: | |
var d, c, b, a;a = (function(e,f,g){return b((function(h){return (function(i){return (function(j){return e(i)(j);});});}), f, g);});b = (function(e,f,g){var h = f;for (var i = 0; i <= (c(g) - 1); i++){h = e(i)(h)(g[i]);null;};return h;});c = (function(e){return e.length;;});d = (function(e,f){return a((function(g){return (function(h){return (g + e(h));});}), 0, f);});var e = [1.000000, 2.000000];var f = 2.000000;return d((function(g){return (f * g);}), e) | |
***** FunScript.Tests.Arrays.Array.toList works | |
// Code: | |
var l, k, j, i, h, g, f, e, d, c, b, a;a = (function(m,n,o){return b((function(p){return (function(q){return (function(r){return m(q)(r);});});}), n, o);});b = (function(m,n,o){var p = o;var q = c(n);for (var r = 1; r <= q; r++){p = m((r - 1))(n[(q - r)])(p);null;};return p;});c = (function(m){return m.length;;});d = (function(m,n){var o = g(m, n);if ((o.Tag == 1.000000)) {var p = j(o);return p;}else{throw ("List did not contain any matching elements");return null;};});e = (function(m,n){return d((function(o){return (function(p){return (n == o);});}), m);});f = (function(m){return a((function(n){return (function(o){return (new k(n, o));});}), m, (new l()));});g = (function(m,n){return h((function(o){return (function(p){if (m(o)(p)) {return {Tag: 1.000000, Value: p};}else{return {Tag: 0.000000};};});}), n);});h = (function(m,n){return i(m, 0, n);});i = (function(m,n,o){if ((o.Tag == 1.000000)) {var p = o.Item2;var q = o.Item1;var r = m(n)(q);if ((r.Tag == 0.000000)) {return i(m, (n + 1), p);}else{return r;};}else{return {Tag: 0.000000};};});j = (function(m){return m.Value;;});k = (function(Item1,Item2){var o = this;o.Tag = 1.000000;o._CaseName = "Cons";o.Item1 = Item1;o.Item2 = Item2;});l = (function(){var m = this;m.Tag = 0.000000;m._CaseName = "Nil";});var m = [1.000000, 2.000000];var n = f(m);return (e(n, 0) + e(n, 1)) | |
***** FunScript.Tests.Arrays.Array.toSeq works | |
// Code: | |
var l, k, j, i, h, g, f, e, d, c, b, a;a = (function(m){return m.length;;});b = (function(m){var n = this;{};n.factory = m;});c = (function(m){return m.Value;;});d = (function(m){return m.Value;;});e = (function(m){return ((m.Tag == 1.000000) && true);});f = (function(m){return m.GetEnumerator();});g = (function(m){var n;n = (new b(m));return {GetEnumerator: (function(o){return (function(p,o){var q;return p.factory(q);})(n, o);})};});h = (function(m){var n = f(m);if (n.MoveNext()) {return n.get_Current();}else{throw ("Seq was empty");return null;};});i = (function(m){return j((function(n){if ((n < a(m))) {return {Tag: 1.000000, Value: (new k(m[n], (n + 1)))};}else{return {Tag: 0.000000};};}), 0);});j = (function(m,n){return g((function(o){var p;p = (new l(n, m));return {get_Current: (function(q){return (function(r,q){return r.current;})(p, q);}), MoveNext: (function(q){return (function(r,q){var s = (function(t){var u = c(r.acc);var v = r.unfold(u);if ((v.Tag == 1.000000)) {var w = d(v).Items[0.000000];var x = d(v).Items[1.000000];r.acc = {Tag: 1.000000, Value: x};r.current = w;return true;}else{r.acc = {Tag: 0.000000};r.current = null;return false;};});return (e(r.acc) && (function(){var t;return s(t);})());})(p, q);}), Reset: (function(q){return (function(r,q){r.acc = {Tag: 1.000000, Value: r.seed};r.current = null;})(p, q);}), Dispose: (function(q){return (function(r,q){;})(p, q);})};}));});k = (function(Item0,Item1){var o = this;o.Items = [Item0, Item1];});l = (function(m,n){var o = this;{};o.seed = m;o.unfold = n;o.acc = {Tag: 1.000000, Value: o.seed};o.current = null;});var m = [1.000000, 2.000000];var n = i(m);return h(n) | |
***** FunScript.Tests.Arrays.Array.tryFind works | |
// Code: | |
var e, d, c, b, a;a = (function(f){return f.length;;});b = (function(f,g){return c((function(h){return (function(i){if (f(i)) {return {Tag: 1.000000, Value: i};}else{return {Tag: 0.000000};};});}), g);});c = (function(f,g){return d(f, 0, g);});d = (function(f,g,h){if ((g == a(h))) {return {Tag: 0.000000};}else{var i = f(g)(h[g]);if ((i.Tag == 0.000000)) {return d(f, (g + 1), h);}else{return i;};};});e = (function(f){return ((f.Tag == 1.000000) && true);});var f = [1.000000, 2.000000];var g = 1.000000;var h = b((function(i){return (g == i);}), f);return e(h) | |
***** FunScript.Tests.Arrays.Array.tryFindIndex works | |
// Code: | |
var e, d, c, b, a;a = (function(f){return f.length;;});b = (function(f,g){return c((function(h){return (function(i){if (f(i)) {return {Tag: 1.000000, Value: h};}else{return {Tag: 0.000000};};});}), g);});c = (function(f,g){return d(f, 0, g);});d = (function(f,g,h){if ((g == a(h))) {return {Tag: 0.000000};}else{var i = f(g)(h[g]);if ((i.Tag == 0.000000)) {return d(f, (g + 1), h);}else{return i;};};});e = (function(f){return f.Value;;});var f = [1.000000, 2.000000];var g = 2.000000;var h = b((function(i){return (g == i);}), f);return e(h) | |
***** FunScript.Tests.Arrays.Array.tryPick works | |
// Code: | |
var e, d, c, b, a;a = (function(f){return f.length;;});b = (function(f,g){return c((function(h){return (function(i){return f(i);});}), g);});c = (function(f,g){return d(f, 0, g);});d = (function(f,g,h){if ((g == a(h))) {return {Tag: 0.000000};}else{var i = f(g)(h[g]);if ((i.Tag == 0.000000)) {return d(f, (g + 1), h);}else{return i;};};});e = (function(f){return f.Value;;});var f = [1.000000, 2.000000];var g = b((function(h){if ((h == 2.000000)) {return {Tag: 1.000000, Value: h};}else{return {Tag: 0.000000};};}), f);if ((g.Tag == 0.000000)) {return 0.000000;}else{var h = e(g);return h;} | |
***** FunScript.Tests.Arrays.Array.unzip works | |
// Code: | |
var g, f, e, d, c, b, a;a = (function(h,i,j){var k = i;for (var l = 0; l <= (c(j) - 1); l++){k = h(l)(k)(j[l]);null;};return k;});b = (function(h,i){var j;return a((function(k){return (function(l){return (function(m){return h(k)(m);});});}), j, i);});c = (function(h){return h.length;;});d = (function(h){var i = e(0);var j = e(0);b((function(k){return (function(l){var m = l.Items[0.000000];var n = l.Items[1.000000];i[k] = m;null;j[k] = n;return null;});}), h);return (new g(i, j));});e = (function(h){return new Array(h);;});f = (function(Item0,Item1){var j = this;j.Items = [Item0, Item1];});g = (function(Item0,Item1){var j = this;j.Items = [Item0, Item1];});var h = [(new f(1.000000, 2.000000))];var i = d(h);var j = i.Items[1.000000];var k = i.Items[0.000000];return (k[0] + j[0]) | |
***** FunScript.Tests.Arrays.Array.unzip3 works | |
// Code: | |
var g, f, e, d, c, b, a;a = (function(h,i,j){var k = i;for (var l = 0; l <= (c(j) - 1); l++){k = h(l)(k)(j[l]);null;};return k;});b = (function(h,i){var j;return a((function(k){return (function(l){return (function(m){return h(k)(m);});});}), j, i);});c = (function(h){return h.length;;});d = (function(h){var i = e(0);var j = e(0);var k = e(0);b((function(l){return (function(m){var n = m.Items[0.000000];var o = m.Items[1.000000];var p = m.Items[2.000000];i[l] = n;null;j[l] = o;null;k[l] = p;return null;});}), h);return (new g(i, j, k));});e = (function(h){return new Array(h);;});f = (function(Item0,Item1,Item2){var k = this;k.Items = [Item0, Item1, Item2];});g = (function(Item0,Item1,Item2){var k = this;k.Items = [Item0, Item1, Item2];});var h = [(new f(1.000000, 2.000000, 3.000000))];var i = d(h);var j = i.Items[1.000000];var k = i.Items[0.000000];var l = i.Items[2.000000];return ((k[0] + j[0]) + l[0]) | |
***** FunScript.Tests.Arrays.Array.zeroCreate works | |
// Code: | |
var a;a = (function(b){return new Array(b);;});var b = a(2) | |
***** FunScript.Tests.Arrays.Array.zip works | |
// Code: | |
var f, e, d, c, b, a;a = (function(g){return g.length;;});b = (function(g,h,i){return c((function(j){return (function(k){return (function(l){return g(k)(l);});});}), h, i);});c = (function(g,h,i){if ((a(h) != a(i))) {throw ("Arrays had different lengths");null;}else{;};var j = d(a(h));for (var k = 0; k <= (a(h) - 1); k++){j[k] = g(k)(h[k])(i[k]);null;};return j;});d = (function(g){return new Array(g);;});e = (function(g,h){return b((function(i){return (function(j){return (new f(i, j));});}), g, h);});f = (function(Item0,Item1){var i = this;i.Items = [Item0, Item1];});var g = [1.000000, 2.000000, 3.000000];var h = [1.000000, 2.000000, 3.000000];var i = e(g, h);var j = i[0];var k = j.Items[1.000000];var l = j.Items[0.000000];return (l + k) | |
***** FunScript.Tests.Arrays.Array.zip3 works | |
// Code: | |
var f, e, d, c, b, a;a = (function(g){return g.length;;});b = (function(g,h,i,j){return c((function(k){return (function(l){return (function(m){return (function(n){return g(l)(m)(n);});});});}), h, i, j);});c = (function(g,h,i,j){if (((a(h) != a(i)) || (a(i) != a(j)))) {throw ("Arrays had different lengths");null;}else{;};var k = d(a(h));for (var l = 0; l <= (a(h) - 1); l++){k[l] = g(l)(h[l])(i[l])(j[l]);null;};return k;});d = (function(g){return new Array(g);;});e = (function(g,h,i){return b((function(j){return (function(k){return (function(l){return (new f(j, k, l));});});}), g, h, i);});f = (function(Item0,Item1,Item2){var j = this;j.Items = [Item0, Item1, Item2];});var g = [1.000000, 2.000000, 3.000000];var h = [1.000000, 2.000000, 3.000000];var i = [1.000000, 2.000000, 3.000000];var j = e(g, h, i);var k = j[0];var l = k.Items[2.000000];var m = k.Items[1.000000];var n = k.Items[0.000000];return ((n + m) + l) | |
***** FunScript.Tests.Arrays.System.Array.CreateInstance works | |
// Code: | |
var g, f, e, d, c, b, a;a = (function(h,i){return b(i);});b = (function(h){return new Array(h);;});c = (function(h){return (new d(null, h));});d = (function(h,i){var j = this;{};j.factory = i;j.isCreated = false;j.value_24 = h;});e = (function(){var h = this;h.Tag = 0.000000;h._CaseName = "ClassType";});f = (function(h,i,j,k){var l = this;{};l.name = h;l.fullName = i;l.typeArgs_32 = c((function(m){var n;return j(n);}));l.kind_33 = c((function(m){var n;return k(n);}));});g = (new f("String", "System.String", (function(h){return [];}), (function(h){return (new e());})));var h = a(g, 2);h[0] = "blah1";null;h[1] = "blah2";null;return (h[0] + h[1]) | |
***** FunScript.Tests.Arrays.System.Array.GetEnumerator works | |
// Code: | |
var r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(s){return s.length;;});b = (function(s,t){return c(t);});c = (function(s){return new Array(s);;});d = (function(s){var t = this;{};t.factory = s;});e = (function(s){return l(s).GetEnumerator();});f = (function(s){return (new g(null, s));});g = (function(s,t){var u = this;{};u.factory = t;u.isCreated = false;u.value_24 = s;});h = (function(s){return s.Value;;});i = (function(s){return s.Value;;});j = (function(s){return ((s.Tag == 1.000000) && true);});k = (function(s){var t;t = (new d(s));return {GetEnumerator: (function(u){return (function(v,u){var w;return v.factory(w);})(t, u);})};});l = (function(s){return m((function(t){if ((t < a(s))) {return {Tag: 1.000000, Value: (new n(s[t], (t + 1)))};}else{return {Tag: 0.000000};};}), 0);});m = (function(s,t){return k((function(u){var v;v = (new q(t, s));return {get_Current: (function(w){return (function(x,w){return x.current;})(v, w);}), MoveNext: (function(w){return (function(x,w){var y = (function(z){var A = h(x.acc);var B = x.unfold(A);if ((B.Tag == 1.000000)) {var C = i(B).Items[0.000000];var D = i(B).Items[1.000000];x.acc = {Tag: 1.000000, Value: D};x.current = C;return true;}else{x.acc = {Tag: 0.000000};x.current = null;return false;};});return (j(x.acc) && (function(){var z;return y(z);})());})(v, w);}), Reset: (function(w){return (function(x,w){x.acc = {Tag: 1.000000, Value: x.seed};x.current = null;})(v, w);}), Dispose: (function(w){return (function(x,w){;})(v, w);})};}));});n = (function(Item0,Item1){var u = this;u.Items = [Item0, Item1];});o = (function(){var s = this;s.Tag = 0.000000;s._CaseName = "ClassType";});p = (function(s,t,u,v){var w = this;{};w.name = s;w.fullName = t;w.typeArgs_32 = f((function(x){var y;return u(y);}));w.kind_33 = f((function(x){var y;return v(y);}));});q = (function(s,t){var u = this;{};u.seed = s;u.unfold = t;u.acc = {Tag: 1.000000, Value: u.seed};u.current = null;});r = (new p("String", "System.String", (function(s){return [];}), (function(s){return (new o());})));var s = b(r, 2);s[0] = "blah1";null;s[1] = "blah2";null;var t = {contents: ""};var u = e(s);try{while (u.MoveNext()){var v = u.get_Current();t.contents = (t.contents + v);null;};}finally{if (false) {u.Dispose();}else{;};};return t.contents | |
***** FunScript.Tests.Asyncs.Async exceptions are handled correctly | |
// Code: | |
var o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(p,q){return k((function(r){var s;var t = q(s);var u = t.Item;return u(r);}));});b = (function(p,q,r){var s = q.Item;return k((function(t){l(t.Aux.CancellationToken);var u = t.Aux;var v = (function(w){return t.Cont(r(w));});var w = (new e(u.StackCounter, v, u.CancelledCont, u.CancellationToken));return s((new f(t.Cont, w)));}));});c = (function(p,q){return k((function(r){var s;return j(r, s);}));});d = (function(p){{};});e = (function(p,q,r,s){var t = this;t.StackCounter = p;t.ExceptionCont = q;t.CancelledCont = r;t.CancellationToken = s;});f = (function(p,q){var r = this;r.Cont = p;r.Aux = q;});g = (function(p,q){var r;if ((q.Tag == 1.000000)) {var s = n(q);r = s;}else{r = (new m({Tag: 0.000000}));};var t = r;var u = p.Item;var v = (new e({contents: 0}, (function(w){var x = w;}), (function(w){var x = w;}), t));return u((new f((function(w){var x = w;}), v)));});h = (function(Item){var q = this;q.Tag = 0.000000;q._CaseName = "Cont";q.Item = Item;});i = (function(){return (new d());});j = (function(p,q){return p.Cont(q);});k = (function(p){return (new h((function(q){l(q.Aux.CancellationToken);q.Aux.StackCounter.contents = (q.Aux.StackCounter.contents + 1);null;if ((q.Aux.StackCounter.contents > 1000)) {q.Aux.StackCounter.contents = 0;null;return window.setTimeout((function(r){try{return p(q);}catch(s){return q.Aux.ExceptionCont(s);};}), 1.000000);}else{try{return p(q);}catch(r){return q.Aux.ExceptionCont(r);};};})));});l = (function(p,q){var r = p.Cell;if ((r.Tag == 1.000000)) {var s = o(r);if (s.contents) {var t = o(r);throw ("OperationCancelledException");return null;}else{;};}else{;};});m = (function(p){var q = this;q.Cell = p;});n = (function(p){return p.Value;;});o = (function(p){return p.Value;;});var p = {contents: 0.000000};var q = (function(r){g(a(i(), (function(s){return b(i(), a(i(), (function(t){if (r) {throw ("boom!");null;return c(i());}else{p.contents = 12.000000;null;return c(i());};})), (function(t){p.contents = 10.000000;null;return c(i());}));})), {Tag: 0.000000});return p.contents;});return (q(true) + q(false)) | |
***** FunScript.Tests.Asyncs.Async for binding works correctly | |
// Code: | |
var B, A, z, y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(C){return C.length;;});b = (function(C,D,E){var F = D.Item;return o((function(G){var H = (function(I){var J = E(I);var K = J.Item;return K(G);});return F((new j(H, G.Aux)));}));});c = (function(C,D){return o((function(E){var F;var G = D(F);var H = G.Item;return H(E);}));});d = (function(C,D,E){var F = D.GetEnumerator();return f(C, (function(G){return F.MoveNext();}), c(C, (function(G){return E(F.get_Current());})));});e = (function(C,D){return o((function(E){return n(E, D);}));});f = (function(C,D,E){var F;if (D(F)) {return b(C, E, (function(G){return f(C, D, E);}));}else{var G;return e(C, G);};});g = (function(C,D){return o((function(E){var F;return n(E, F);}));});h = (function(C){{};});i = (function(C,D,E,F){var G = this;G.StackCounter = C;G.ExceptionCont = D;G.CancelledCont = E;G.CancellationToken = F;});j = (function(C,D){var E = this;E.Cont = C;E.Aux = D;});k = (function(C,D){var E;if ((D.Tag == 1.000000)) {var F = s(D);E = F;}else{E = (new q({Tag: 0.000000}));};var G = E;var H = C.Item;var I = (new i({contents: 0}, (function(J){var K = J;}), (function(J){var K = J;}), G));return H((new j((function(J){var K = J;}), I)));});l = (function(Item){var D = this;D.Tag = 0.000000;D._CaseName = "Cont";D.Item = Item;});m = (function(){return (new h());});n = (function(C,D){return C.Cont(D);});o = (function(C){return (new l((function(D){p(D.Aux.CancellationToken);D.Aux.StackCounter.contents = (D.Aux.StackCounter.contents + 1);null;if ((D.Aux.StackCounter.contents > 1000)) {D.Aux.StackCounter.contents = 0;null;return window.setTimeout((function(E){try{return C(D);}catch(F){return D.Aux.ExceptionCont(F);};}), 1.000000);}else{try{return C(D);}catch(E){return D.Aux.ExceptionCont(E);};};})));});p = (function(C,D){var E = C.Cell;if ((E.Tag == 1.000000)) {var F = t(E);if (F.contents) {var G = t(E);throw ("OperationCancelledException");return null;}else{;};}else{;};});q = (function(C){var D = this;D.Cell = C;});r = (function(C){var D = this;{};D.factory = C;});s = (function(C){return C.Value;;});t = (function(C){return C.Value;;});u = (function(C){return C.Value;;});v = (function(C){return C.Value;;});w = (function(C){return ((C.Tag == 1.000000) && true);});x = (function(C){var D;D = (new r(C));return {GetEnumerator: (function(E){return (function(F,E){var G;return F.factory(G);})(D, E);})};});y = (function(C){return z((function(D){if ((D < a(C))) {return {Tag: 1.000000, Value: (new A(C[D], (D + 1)))};}else{return {Tag: 0.000000};};}), 0);});z = (function(C,D){return x((function(E){var F;F = (new B(D, C));return {get_Current: (function(G){return (function(H,G){return H.current;})(F, G);}), MoveNext: (function(G){return (function(H,G){var I = (function(J){var K = u(H.acc);var L = H.unfold(K);if ((L.Tag == 1.000000)) {var M = v(L).Items[0.000000];var N = v(L).Items[1.000000];H.acc = {Tag: 1.000000, Value: N};H.current = M;return true;}else{H.acc = {Tag: 0.000000};H.current = null;return false;};});return (w(H.acc) && (function(){var J;return I(J);})());})(F, G);}), Reset: (function(G){return (function(H,G){H.acc = {Tag: 1.000000, Value: H.seed};H.current = null;})(F, G);}), Dispose: (function(G){return (function(H,G){;})(F, G);})};}));});A = (function(Item0,Item1){var E = this;E.Items = [Item0, Item1];});B = (function(C,D){var E = this;{};E.seed = C;E.unfold = D;E.acc = {Tag: 1.000000, Value: E.seed};E.current = null;});var C = [1.000000, 2.000000, 3.000000];var D = {contents: 0.000000};k(c(m(), (function(E){return d(m(), y(C), (function(F){var G = F;D.contents = (D.contents + G);null;return g(m());}));})), {Tag: 0.000000});return D.contents | |
***** FunScript.Tests.Asyncs.async use statements should dispose of resources when the go out of scope | |
// Code: | |
var w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(x,y,z){var A = y.Item;return r((function(B){var C = (function(D){var E = z(D);var F = E.Item;return F(B);});return A((new i(C, B.Aux)));}));});b = (function(x,y){return q((function(z){var A;var B = y(A);var C = B.Item;return C(z);}));});c = (function(x,y){return r((function(z){var A;var B = y(A);var C = B.Item;return C(z);}));});d = (function(x,y){return q((function(z){return o(z, y);}));});e = (function(x,y,z){return r((function(A){var B = z(y);var C = B.Item;var D;D = y;var E = {Dispose: (function(F){return (function(G,F){var H;return G.f(H);})(D, F);})};return C((new j((function(F){E.Dispose();return A.Cont(F);}), A.Aux)));}));});f = (function(x,y){return r((function(z){var A;return p(z, A);}));});g = (function(x){{};});h = (function(x,y,z,A){var B = this;B.StackCounter = x;B.ExceptionCont = y;B.CancelledCont = z;B.CancellationToken = A;});i = (function(x,y){var z = this;z.Cont = x;z.Aux = y;});j = (function(x,y){var z = this;z.Cont = x;z.Aux = y;});k = (function(Item){var y = this;y.Tag = 0.000000;y._CaseName = "Cont";y.Item = Item;});l = (function(x,y){var z;if ((y.Tag == 1.000000)) {var A = v(y);z = A;}else{z = (new t({Tag: 0.000000}));};var B = z;var C = x.Item;var D = (new h({contents: 0}, (function(E){var F = E;}), (function(E){var F = E;}), B));return C((new j((function(E){var F = E;}), D)));});m = (function(Item){var y = this;y.Tag = 0.000000;y._CaseName = "Cont";y.Item = Item;});n = (function(){return (new g());});o = (function(x,y){return x.Cont(y);});p = (function(x,y){return x.Cont(y);});q = (function(x){return (new k((function(y){s(y.Aux.CancellationToken);y.Aux.StackCounter.contents = (y.Aux.StackCounter.contents + 1);null;if ((y.Aux.StackCounter.contents > 1000)) {y.Aux.StackCounter.contents = 0;null;return window.setTimeout((function(z){try{return x(y);}catch(A){return y.Aux.ExceptionCont(A);};}), 1.000000);}else{try{return x(y);}catch(z){return y.Aux.ExceptionCont(z);};};})));});r = (function(x){return (new m((function(y){s(y.Aux.CancellationToken);y.Aux.StackCounter.contents = (y.Aux.StackCounter.contents + 1);null;if ((y.Aux.StackCounter.contents > 1000)) {y.Aux.StackCounter.contents = 0;null;return window.setTimeout((function(z){try{return x(y);}catch(A){return y.Aux.ExceptionCont(A);};}), 1.000000);}else{try{return x(y);}catch(z){return y.Aux.ExceptionCont(z);};};})));});s = (function(x,y){var z = x.Cell;if ((z.Tag == 1.000000)) {var A = w(z);if (A.contents) {var B = w(z);throw ("OperationCancelledException");return null;}else{;};}else{;};});t = (function(x){var y = this;y.Cell = x;});u = (function(x){var y = this;{};y.f = x;});v = (function(x){return x.Value;;});w = (function(x){return x.Value;;});var x = {contents: false};var y = {contents: false};var z = {contents: false};var A = b(n(), (function(B){return d(n(), (new u((function(C){x.contents = true;}))));}));l(c(n(), (function(B){return a(n(), A, (function(C){var D = C;return e(n(), D, (function(E){var F = E;y.contents = (!x.contents);null;return f(n());}));}));})), {Tag: 0.000000});z.contents = x.contents;null;return (y.contents && z.contents) | |
***** FunScript.Tests.Asyncs.Async while binding works correctly | |
// Code: | |
var q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(r,s,t){var u = s.Item;return m((function(v){var w = (function(x){var y = t(x);var z = y.Item;return z(v);});return u((new h(w, v.Aux)));}));});b = (function(r,s){return m((function(t){var u;var v = s(u);var w = v.Item;return w(t);}));});c = (function(r,s){return m((function(t){return l(t, s);}));});d = (function(r,s,t){var u;if (s(u)) {return a(r, t, (function(v){return d(r, s, t);}));}else{var v;return c(r, v);};});e = (function(r,s){return m((function(t){var u;return l(t, u);}));});f = (function(r){{};});g = (function(r,s,t,u){var v = this;v.StackCounter = r;v.ExceptionCont = s;v.CancelledCont = t;v.CancellationToken = u;});h = (function(r,s){var t = this;t.Cont = r;t.Aux = s;});i = (function(r,s){var t;if ((s.Tag == 1.000000)) {var u = p(s);t = u;}else{t = (new o({Tag: 0.000000}));};var v = t;var w = r.Item;var x = (new g({contents: 0}, (function(y){var z = y;}), (function(y){var z = y;}), v));return w((new h((function(y){var z = y;}), x)));});j = (function(Item){var s = this;s.Tag = 0.000000;s._CaseName = "Cont";s.Item = Item;});k = (function(){return (new f());});l = (function(r,s){return r.Cont(s);});m = (function(r){return (new j((function(s){n(s.Aux.CancellationToken);s.Aux.StackCounter.contents = (s.Aux.StackCounter.contents + 1);null;if ((s.Aux.StackCounter.contents > 1000)) {s.Aux.StackCounter.contents = 0;null;return window.setTimeout((function(t){try{return r(s);}catch(u){return s.Aux.ExceptionCont(u);};}), 1.000000);}else{try{return r(s);}catch(t){return s.Aux.ExceptionCont(t);};};})));});n = (function(r,s){var t = r.Cell;if ((t.Tag == 1.000000)) {var u = q(t);if (u.contents) {var v = q(t);throw ("OperationCancelledException");return null;}else{;};}else{;};});o = (function(r){var s = this;s.Cell = r;});p = (function(r){return r.Value;;});q = (function(r){return r.Value;;});var r = {contents: 0.000000};i(b(k(), (function(s){return d(k(), (function(t){return (r.contents < 10.000000);}), b(k(), (function(t){r.contents = (r.contents + 1.000000);null;return e(k());})));})), {Tag: 0.000000});return r.contents | |
***** FunScript.Tests.Asyncs.Simple async is executed correctly | |
// Code: | |
var u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(v,w,x){var y = w.Item;return q((function(z){var A = (function(B){var C = x(B);var D = C.Item;return D(z);});return y((new h(A, z.Aux)));}));});b = (function(v,w){return p((function(x){var y;var z = w(y);var A = z.Item;return A(x);}));});c = (function(v,w){return q((function(x){var y;var z = w(y);var A = z.Item;return A(x);}));});d = (function(v,w){return p((function(x){return n(x, w);}));});e = (function(v,w){return q((function(x){var y;return o(x, y);}));});f = (function(v){{};});g = (function(v,w,x,y){var z = this;z.StackCounter = v;z.ExceptionCont = w;z.CancelledCont = x;z.CancellationToken = y;});h = (function(v,w){var x = this;x.Cont = v;x.Aux = w;});i = (function(v,w){var x = this;x.Cont = v;x.Aux = w;});j = (function(Item){var w = this;w.Tag = 0.000000;w._CaseName = "Cont";w.Item = Item;});k = (function(v,w){var x;if ((w.Tag == 1.000000)) {var y = t(w);x = y;}else{x = (new s({Tag: 0.000000}));};var z = x;var A = v.Item;var B = (new g({contents: 0}, (function(C){var D = C;}), (function(C){var D = C;}), z));return A((new i((function(C){var D = C;}), B)));});l = (function(Item){var w = this;w.Tag = 0.000000;w._CaseName = "Cont";w.Item = Item;});m = (function(){return (new f());});n = (function(v,w){return v.Cont(w);});o = (function(v,w){return v.Cont(w);});p = (function(v){return (new j((function(w){r(w.Aux.CancellationToken);w.Aux.StackCounter.contents = (w.Aux.StackCounter.contents + 1);null;if ((w.Aux.StackCounter.contents > 1000)) {w.Aux.StackCounter.contents = 0;null;return window.setTimeout((function(x){try{return v(w);}catch(y){return w.Aux.ExceptionCont(y);};}), 1.000000);}else{try{return v(w);}catch(x){return w.Aux.ExceptionCont(x);};};})));});q = (function(v){return (new l((function(w){r(w.Aux.CancellationToken);w.Aux.StackCounter.contents = (w.Aux.StackCounter.contents + 1);null;if ((w.Aux.StackCounter.contents > 1000)) {w.Aux.StackCounter.contents = 0;null;return window.setTimeout((function(x){try{return v(w);}catch(y){return w.Aux.ExceptionCont(y);};}), 1.000000);}else{try{return v(w);}catch(x){return w.Aux.ExceptionCont(x);};};})));});r = (function(v,w){var x = v.Cell;if ((x.Tag == 1.000000)) {var y = u(x);if (y.contents) {var z = u(x);throw ("OperationCancelledException");return null;}else{;};}else{;};});s = (function(v){var w = this;w.Cell = v;});t = (function(v){return v.Value;;});u = (function(v){return v.Value;;});var v = {contents: false};var w = b(m(), (function(x){return d(m(), 99);}));k(c(m(), (function(x){return a(m(), w, (function(y){var z = y;var A = 99;v.contents = (z == A);null;return e(m());}));})), {Tag: 0.000000});return v.contents | |
***** FunScript.Tests.Asyncs.Simple async translates without exception | |
// Code: | |
var n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(o,p){return j((function(q){var r;var s = p(r);var t = s.Item;return t(q);}));});b = (function(o,p){return j((function(q){return i(q, p);}));});c = (function(o){{};});d = (function(o,p,q,r){var s = this;s.StackCounter = o;s.ExceptionCont = p;s.CancelledCont = q;s.CancellationToken = r;});e = (function(o,p){var q = this;q.Cont = o;q.Aux = p;});f = (function(o,p){var q;if ((p.Tag == 1.000000)) {var r = m(p);q = r;}else{q = (new l({Tag: 0.000000}));};var s = q;var t = o.Item;var u = (new d({contents: 0}, (function(v){var w = v;}), (function(v){var w = v;}), s));return t((new e((function(v){var w = v;}), u)));});g = (function(Item){var p = this;p.Tag = 0.000000;p._CaseName = "Cont";p.Item = Item;});h = (function(){return (new c());});i = (function(o,p){return o.Cont(p);});j = (function(o){return (new g((function(p){k(p.Aux.CancellationToken);p.Aux.StackCounter.contents = (p.Aux.StackCounter.contents + 1);null;if ((p.Aux.StackCounter.contents > 1000)) {p.Aux.StackCounter.contents = 0;null;return window.setTimeout((function(q){try{return o(p);}catch(r){return p.Aux.ExceptionCont(r);};}), 1.000000);}else{try{return o(p);}catch(q){return p.Aux.ExceptionCont(q);};};})));});k = (function(o,p){var q = o.Cell;if ((q.Tag == 1.000000)) {var r = n(q);if (r.contents) {var s = n(q);throw ("OperationCancelledException");return null;}else{;};}else{;};});l = (function(o){var p = this;p.Cell = o;});m = (function(o){return o.Value;;});n = (function(o){return o.Value;;});return f(a(h(), (function(o){var p;return b(h(), p);})), {Tag: 0.000000}) | |
***** FunScript.Tests.Asyncs.Try ... with ... expressions inside async expressions work the same | |
// Code: | |
var C, B, A, z, y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(D,E,F){var G = E.Item;return w((function(H){var I = (function(J){var K = F(J);var L = K.Item;return L(H);});return G((new n(I, H.Aux)));}));});b = (function(D,E,F){var G = E.Item;return v((function(H){var I = (function(J){var K = F(J);var L = K.Item;return L(H);});return G((new o(I, H.Aux)));}));});c = (function(D,E,F){var G = E.Item;return w((function(H){var I = (function(J){var K = F(J);var L = K.Item;return L(H);});return G((new o(I, H.Aux)));}));});d = (function(D,E,F){return b(D, E, (function(G){return F;}));});e = (function(D,E,F){return c(D, E, (function(G){return F;}));});f = (function(D,E){return v((function(F){var G;var H = E(G);var I = H.Item;return I(F);}));});g = (function(D,E){return w((function(F){var G;var H = E(G);var I = H.Item;return I(F);}));});h = (function(D,E){return v((function(F){return t(F, E);}));});i = (function(D,E){return w((function(F){return u(F, E);}));});j = (function(D,E,F){var G = E.Item;return w((function(H){x(H.Aux.CancellationToken);var I = H.Aux;var J = (function(K){return H.Cont(F(K));});var K = (new m(I.StackCounter, J, I.CancelledCont, I.CancellationToken));return G((new o(H.Cont, K)));}));});k = (function(D,E){return w((function(F){var G;return u(F, G);}));});l = (function(D){{};});m = (function(D,E,F,G){var H = this;H.StackCounter = D;H.ExceptionCont = E;H.CancelledCont = F;H.CancellationToken = G;});n = (function(D,E){var F = this;F.Cont = D;F.Aux = E;});o = (function(D,E){var F = this;F.Cont = D;F.Aux = E;});p = (function(D,E){var F;if ((E.Tag == 1.000000)) {var G = A(E);F = G;}else{F = (new y({Tag: 0.000000}));};var H = F;var I = D.Item;var J = (new m({contents: 0}, (function(K){var L = K;}), (function(K){var L = K;}), H));return I((new o((function(K){var L = K;}), J)));});q = (function(Item){var E = this;E.Tag = 0.000000;E._CaseName = "Cont";E.Item = Item;});r = (function(Item){var E = this;E.Tag = 0.000000;E._CaseName = "Cont";E.Item = Item;});s = (function(){return (new l());});t = (function(D,E){return D.Cont(E);});u = (function(D,E){return D.Cont(E);});v = (function(D){return (new q((function(E){x(E.Aux.CancellationToken);E.Aux.StackCounter.contents = (E.Aux.StackCounter.contents + 1);null;if ((E.Aux.StackCounter.contents > 1000)) {E.Aux.StackCounter.contents = 0;null;return window.setTimeout((function(F){try{return D(E);}catch(G){return E.Aux.ExceptionCont(G);};}), 1.000000);}else{try{return D(E);}catch(F){return E.Aux.ExceptionCont(F);};};})));});w = (function(D){return (new r((function(E){x(E.Aux.CancellationToken);E.Aux.StackCounter.contents = (E.Aux.StackCounter.contents + 1);null;if ((E.Aux.StackCounter.contents > 1000)) {E.Aux.StackCounter.contents = 0;null;return window.setTimeout((function(F){try{return D(E);}catch(G){return E.Aux.ExceptionCont(G);};}), 1.000000);}else{try{return D(E);}catch(F){return E.Aux.ExceptionCont(F);};};})));});x = (function(D,E){var F = D.Cell;if ((F.Tag == 1.000000)) {var G = B(F);if (G.contents) {var H = B(F);throw ("OperationCancelledException");return null;}else{;};}else{;};});y = (function(D){var E = this;E.Cell = D;});z = (function(D){var E = this;{};E.message = D;});A = (function(D){return D.Value;;});B = (function(D){return D.Value;;});C = (function(D){return D.Value;;});var D = {contents: {Tag: 0.000000}};p(g(s(), (function(E){var F = {contents: ""};var G = (function(H){throw ((new z("Boo!")));return null;});var H = (function(I){F.contents = (F.contents + I);});var I = (function(J){return g(s(), (function(K){H("b");return e(s(), j(s(), g(s(), (function(L){H("c");var M;G(M);H("1");return k(s());})), (function(L){H("d");return k(s());})), g(s(), (function(L){H("e");return k(s());})));}));});return a(s(), f(s(), (function(J){H("a");return d(s(), j(s(), g(s(), (function(K){var L;return c(s(), I(L), (function(M){var N;return i(s(), N);}));})), (function(K){H("2");return k(s());})), f(s(), (function(K){H("f");return h(s(), F.contents);})));})), (function(J){var K = J;D.contents = {Tag: 1.000000, Value: K};null;return k(s());}));})), {Tag: 0.000000});return C(D.contents) | |
***** FunScript.Tests.CommonOperators.the ! operator works | |
// Code: | |
var a = {contents: 10.000000};return a.contents | |
***** FunScript.Tests.CommonOperators.the .. .. operator works | |
// Code: | |
var A, z, y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(B){var C = this;{};C.factory = B;});b = (function(B,C){return (new z(B, C));});c = (function(){return (new A());});d = (function(B,C){var D = j(B, C);if ((D.Tag == 1.000000)) {var E = m(D);return E;}else{throw ("List did not contain any matching elements");return null;};});e = (function(B,C,D){return f((function(E){return (function(F){return (function(G){return B(F)(G);});});}), C, D);});f = (function(B,C,D){return g(B, 0, C, D);});g = (function(B,C,D,E){if ((E.Tag == 1.000000)) {var F = E.Item2;var G = E.Item1;return g(B, (C + 1), B(C)(D)(G), F);}else{return D;};});h = (function(B,C){return d((function(D){return (function(E){return (C == D);});}), B);});i = (function(B){return e((function(C){return (function(D){return (new z(D, C));});}), (new A()), B);});j = (function(B,C){return k((function(D){return (function(E){if (B(D)(E)) {return {Tag: 1.000000, Value: E};}else{return {Tag: 0.000000};};});}), C);});k = (function(B,C){return l(B, 0, C);});l = (function(B,C,D){if ((D.Tag == 1.000000)) {var E = D.Item2;var F = D.Item1;var G = B(C)(F);if ((G.Tag == 0.000000)) {return l(B, (C + 1), E);}else{return G;};}else{return {Tag: 0.000000};};});m = (function(B){return B.Value;;});n = (function(B){return B.Value;;});o = (function(B){return ((B.Tag == 1.000000) && true);});p = (function(B,C,D){var E = 0;return w((function(F){if ((((C > E) && (F <= D)) || ((C < E) && (F >= D)))) {return {Tag: 1.000000, Value: (new x(F, (F + C)))};}else{return {Tag: 0.000000};};}), B);});q = (function(B){return B.GetEnumerator();});r = (function(B,C,D){return s((function(E){return (function(F){return (function(G){return B(F)(G);});});}), C, D);});s = (function(B,C,D){return t(B, C, q(D));});t = (function(B,C,D){var E = {contents: 0};var F = {contents: C};while (D.MoveNext()){F.contents = B(E.contents)(F.contents)(D.get_Current());null;E.contents = (E.contents + 1);null;};return F.contents;});u = (function(B){var C;C = (new a(B));return {GetEnumerator: (function(D){return (function(E,D){var F;return E.factory(F);})(C, D);})};});v = (function(B){return i(r((function(C){return (function(D){return b(D, C);});}), c(), B));});w = (function(B,C){return u((function(D){var E;E = (new y(C, B));return {get_Current: (function(F){return (function(G,F){return G.current;})(E, F);}), MoveNext: (function(F){return (function(G,F){var H = (function(I){var J = m(G.acc);var K = G.unfold(J);if ((K.Tag == 1.000000)) {var L = n(K).Items[0.000000];var M = n(K).Items[1.000000];G.acc = {Tag: 1.000000, Value: M};G.current = L;return true;}else{G.acc = {Tag: 0.000000};G.current = null;return false;};});return (o(G.acc) && (function(){var I;return H(I);})());})(E, F);}), Reset: (function(F){return (function(G,F){G.acc = {Tag: 1.000000, Value: G.seed};G.current = null;})(E, F);}), Dispose: (function(F){return (function(G,F){;})(E, F);})};}));});x = (function(Item0,Item1){var D = this;D.Items = [Item0, Item1];});y = (function(B,C){var D = this;{};D.seed = B;D.unfold = C;D.acc = {Tag: 1.000000, Value: D.seed};D.current = null;});z = (function(Item1,Item2){var D = this;D.Tag = 1.000000;D._CaseName = "Cons";D.Item1 = Item1;D.Item2 = Item2;});A = (function(){var B = this;B.Tag = 0.000000;B._CaseName = "Nil";});var B = v(p(10.000000, 2.000000, 20.000000));return (h(B, 0) + h(B, 1)) | |
***** FunScript.Tests.CommonOperators.the .. operator works | |
// Code: | |
var B, A, z, y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(C){var D = this;{};D.factory = C;});b = (function(C,D){return (new A(C, D));});c = (function(){return (new B());});d = (function(C,D){var E = j(C, D);if ((E.Tag == 1.000000)) {var F = m(E);return F;}else{throw ("List did not contain any matching elements");return null;};});e = (function(C,D,E){return f((function(F){return (function(G){return (function(H){return C(G)(H);});});}), D, E);});f = (function(C,D,E){return g(C, 0, D, E);});g = (function(C,D,E,F){if ((F.Tag == 1.000000)) {var G = F.Item2;var H = F.Item1;return g(C, (D + 1), C(D)(E)(H), G);}else{return E;};});h = (function(C,D){return d((function(E){return (function(F){return (D == E);});}), C);});i = (function(C){return e((function(D){return (function(E){return (new A(E, D));});}), (new B()), C);});j = (function(C,D){return k((function(E){return (function(F){if (C(E)(F)) {return {Tag: 1.000000, Value: F};}else{return {Tag: 0.000000};};});}), D);});k = (function(C,D){return l(C, 0, D);});l = (function(C,D,E){if ((E.Tag == 1.000000)) {var F = E.Item2;var G = E.Item1;var H = C(D)(G);if ((H.Tag == 0.000000)) {return l(C, (D + 1), F);}else{return H;};}else{return {Tag: 0.000000};};});m = (function(C){return C.Value;;});n = (function(C){return C.Value;;});o = (function(C){return ((C.Tag == 1.000000) && true);});p = (function(C,D,E){var F = 0;return x((function(G){if ((((D > F) && (G <= E)) || ((D < F) && (G >= E)))) {return {Tag: 1.000000, Value: (new y(G, (G + D)))};}else{return {Tag: 0.000000};};}), C);});q = (function(C,D){return p(C, 1, D);});r = (function(C){return C.GetEnumerator();});s = (function(C,D,E){return t((function(F){return (function(G){return (function(H){return C(G)(H);});});}), D, E);});t = (function(C,D,E){return u(C, D, r(E));});u = (function(C,D,E){var F = {contents: 0};var G = {contents: D};while (E.MoveNext()){G.contents = C(F.contents)(G.contents)(E.get_Current());null;F.contents = (F.contents + 1);null;};return G.contents;});v = (function(C){var D;D = (new a(C));return {GetEnumerator: (function(E){return (function(F,E){var G;return F.factory(G);})(D, E);})};});w = (function(C){return i(s((function(D){return (function(E){return b(E, D);});}), c(), C));});x = (function(C,D){return v((function(E){var F;F = (new z(D, C));return {get_Current: (function(G){return (function(H,G){return H.current;})(F, G);}), MoveNext: (function(G){return (function(H,G){var I = (function(J){var K = m(H.acc);var L = H.unfold(K);if ((L.Tag == 1.000000)) {var M = n(L).Items[0.000000];var N = n(L).Items[1.000000];H.acc = {Tag: 1.000000, Value: N};H.current = M;return true;}else{H.acc = {Tag: 0.000000};H.current = null;return false;};});return (o(H.acc) && (function(){var J;return I(J);})());})(F, G);}), Reset: (function(G){return (function(H,G){H.acc = {Tag: 1.000000, Value: H.seed};H.current = null;})(F, G);}), Dispose: (function(G){return (function(H,G){;})(F, G);})};}));});y = (function(Item0,Item1){var E = this;E.Items = [Item0, Item1];});z = (function(C,D){var E = this;{};E.seed = C;E.unfold = D;E.acc = {Tag: 1.000000, Value: E.seed};E.current = null;});A = (function(Item1,Item2){var E = this;E.Tag = 1.000000;E._CaseName = "Cons";E.Item1 = Item1;E.Item2 = Item2;});B = (function(){var C = this;C.Tag = 0.000000;C._CaseName = "Nil";});var C = w(q(10.000000, 20.000000));return (h(C, 0) + h(C, 1)) | |
***** FunScript.Tests.CommonOperators.the := operator works | |
// Code: | |
var a = {contents: 10.000000};a.contents = 11.000000;null;return a.contents | |
***** FunScript.Tests.CommonOperators.the |||> operator works | |
// Code: | |
var a;a = (function(Item0,Item1,Item2){var e = this;e.Items = [Item0, Item1, Item2];});var b = (function(c){return (function(d){return (function(e){return ((c + d) + e);});});});var c = (new a(10.000000, 11.000000, 12.000000));var d = c.Items[0.000000];var e = c.Items[1.000000];var f = c.Items[2.000000];return b(d)(e)(f) | |
***** FunScript.Tests.CommonOperators.the ||> operator works | |
// Code: | |
var a;a = (function(Item0,Item1){var d = this;d.Items = [Item0, Item1];});var b = (function(c){return (function(d){return (c + d);});});var c = (new a(10.000000, 11.000000));var d = c.Items[0.000000];var e = c.Items[1.000000];return b(d)(e) | |
***** FunScript.Tests.CommonOperators.the |> operator works | |
// Code: | |
var a = (function(b){return (b + 1.000000);});var b = 10.000000;return a(b) | |
***** FunScript.Tests.CommonOperators.the |> operator works with functions that return functions | |
// Code: | |
var a;a = (function(Item0,Item1){var d = this;d.Items = [Item0, Item1];});var b = (function(c){return (function(d){var e = d.Items[0.000000];var f = d.Items[1.000000];return ((c + e) + f);});});var c = b(9.000000);return c((new a(10.000000, 11.000000))) | |
***** FunScript.Tests.CommonOperators.the |> operator works with functions that return functions that return functions | |
// Code: | |
var a;a = (function(Item0,Item1){var d = this;d.Items = [Item0, Item1];});var b = (function(c){return (function(d){var e = d.Items[0.000000];var f = d.Items[1.000000];var g = ((c + e) + f);return (function(h){return (g + h);});});});var c = b(9.000000);var d = c((new a(10.000000, 11.000000)));return d(12.000000) | |
***** FunScript.Tests.CommonOperators.the <| operator works | |
// Code: | |
var a = (function(b){return (b + 1.000000);});var b = 10.000000;return a(b) | |
***** FunScript.Tests.CommonOperators.the <|| operator works | |
// Code: | |
var a;a = (function(Item0,Item1){var d = this;d.Items = [Item0, Item1];});var b = (function(c){return (function(d){return (c + d);});});var c = (new a(10.000000, 11.000000));var d = c.Items[0.000000];var e = c.Items[1.000000];return b(d)(e) | |
***** FunScript.Tests.CommonOperators.the <||| operator works | |
// Code: | |
var a;a = (function(Item0,Item1,Item2){var e = this;e.Items = [Item0, Item1, Item2];});var b = (function(c){return (function(d){return (function(e){return ((c + d) + e);});});});var c = (new a(10.000000, 11.000000, 12.000000));var d = c.Items[0.000000];var e = c.Items[1.000000];var f = c.Items[2.000000];return b(d)(e)(f) | |
***** FunScript.Tests.CommonOperators.the << operator works | |
// Code: | |
var a = (function(b){return (b + 1.000000);});var b = (function(c){return (c / 2.000000);});return (function(c){return a(b(c));})(10.000000) | |
***** FunScript.Tests.CommonOperators.the <'a ref>.Value property works | |
// Code: | |
var a = {contents: 10.000000};a.contents = 11.000000;null;return a.contents | |
***** FunScript.Tests.CommonOperators.the >> operator works | |
// Code: | |
var a = (function(b){return (b + 1.000000);});var b = (function(c){return (c / 2.000000);});return (function(c){return b(a(c));})(10.000000) | |
***** FunScript.Tests.CommonOperators.the >> operator works with functions that take tuples | |
// Code: | |
var a;a = (function(Item0,Item1){var d = this;d.Items = [Item0, Item1];});var b = (function(c){var d = c.Items[0.000000];var e = c.Items[1.000000];return (new a((d + 1.000000), (e + 1.000000)));});var c = (function(d){var e = d.Items[0.000000];var f = d.Items[1.000000];return (new a((e / 2.000000), (f / 2.000000)));});var d = (function(e){return c(b(e));})((new a(10.000000, 100.000000)));return d.Items[0.000000] | |
***** FunScript.Tests.CommonOperators.the defaultArg function works | |
// Code: | |
var a;a = (function(b){return b.Value;;});var b = {Tag: 0.000000};if ((b.Tag == 1.000000)) {var c = a(b);return c;}else{return 10.000000;} | |
***** FunScript.Tests.CommonOperators.the id function works | |
// Code: | |
return 10.000000 | |
***** FunScript.Tests.CommonOperators.the ignore function evaluates its arguments | |
// Code: | |
var a = {contents: false};var b;a.contents = true;var c = b;return a.contents | |
***** FunScript.Tests.CommonOperators.the ignore function works | |
// Code: | |
var a = 11.000000 | |
***** FunScript.Tests.CommonOperators.the ref function works | |
// Code: | |
var a = {contents: 10.000000} | |
***** FunScript.Tests.Comparison.custom IComparable implementation equality works | |
// Code: | |
var d, c, b, a;a = (function(e,f){var g = f;var h = (c(e) < c(g) ? -1 : (c(e) == c(g) ? 0 : 1));if ((h != 0)) {return h;}else{return (d(e) < d(g) ? -1 : (d(e) == d(g) ? 0 : 1));};});b = (function(e,f){var g = this;{};g.X_ = e;g.Y_ = f;});c = (function(e,f){return e.X_;});d = (function(e,f){return e.Y_;});var e = (new b(0, "0"));var f = (new b(0, "0"));return (function(g){return (function(h){return ((a(g, h)) == 0);});})(e)(f) | |
***** FunScript.Tests.Comparison.custom IComparable implementation greater than or equal works | |
// Code: | |
var d, c, b, a;a = (function(e,f){var g = f;var h = (c(e) < c(g) ? -1 : (c(e) == c(g) ? 0 : 1));if ((h != 0)) {return h;}else{return (d(e) < d(g) ? -1 : (d(e) == d(g) ? 0 : 1));};});b = (function(e,f){var g = this;{};g.X_ = e;g.Y_ = f;});c = (function(e,f){return e.X_;});d = (function(e,f){return e.Y_;});var e = (new b(0, "0"));var f = (new b(0, "0"));return (function(g){return (function(h){return ((a(g, h)) >= 0);});})(e)(f) | |
***** FunScript.Tests.Comparison.custom IComparable implementation greater than works | |
// Code: | |
var d, c, b, a;a = (function(e,f){var g = f;var h = (c(e) < c(g) ? -1 : (c(e) == c(g) ? 0 : 1));if ((h != 0)) {return h;}else{return (d(e) < d(g) ? -1 : (d(e) == d(g) ? 0 : 1));};});b = (function(e,f){var g = this;{};g.X_ = e;g.Y_ = f;});c = (function(e,f){return e.X_;});d = (function(e,f){return e.Y_;});var e = (new b(0, "0"));var f = (new b(0, "0"));return (function(g){return (function(h){return ((a(g, h)) > 0);});})(e)(f) | |
***** FunScript.Tests.Comparison.custom IComparable implementation inequality works | |
// Code: | |
var d, c, b, a;a = (function(e,f){var g = f;var h = (c(e) < c(g) ? -1 : (c(e) == c(g) ? 0 : 1));if ((h != 0)) {return h;}else{return (d(e) < d(g) ? -1 : (d(e) == d(g) ? 0 : 1));};});b = (function(e,f){var g = this;{};g.X_ = e;g.Y_ = f;});c = (function(e,f){return e.X_;});d = (function(e,f){return e.Y_;});var e = (new b(0, "0"));var f = (new b(0, "0"));return (function(g){return (function(h){return ((a(g, h)) != 0);});})(e)(f) | |
***** FunScript.Tests.Comparison.custom IComparable implementation less than or equal works | |
// Code: | |
var d, c, b, a;a = (function(e,f){var g = f;var h = (c(e) < c(g) ? -1 : (c(e) == c(g) ? 0 : 1));if ((h != 0)) {return h;}else{return (d(e) < d(g) ? -1 : (d(e) == d(g) ? 0 : 1));};});b = (function(e,f){var g = this;{};g.X_ = e;g.Y_ = f;});c = (function(e,f){return e.X_;});d = (function(e,f){return e.Y_;});var e = (new b(0, "0"));var f = (new b(0, "0"));return (function(g){return (function(h){return ((a(g, h)) <= 0);});})(e)(f) | |
***** FunScript.Tests.Comparison.custom IComparable implementation less than works | |
// Code: | |
var d, c, b, a;a = (function(e,f){var g = f;var h = (c(e) < c(g) ? -1 : (c(e) == c(g) ? 0 : 1));if ((h != 0)) {return h;}else{return (d(e) < d(g) ? -1 : (d(e) == d(g) ? 0 : 1));};});b = (function(e,f){var g = this;{};g.X_ = e;g.Y_ = f;});c = (function(e,f){return e.X_;});d = (function(e,f){return e.Y_;});var e = (new b(0, "0"));var f = (new b(0, "0"));return (function(g){return (function(h){return ((a(g, h)) < 0);});})(e)(f) | |
***** FunScript.Tests.Comparison.custom IComparable record implementation equality works | |
// Code: | |
var d, c, b, a;a = (function(e,f){var g = f;var h = (c(e) < c(g) ? -1 : (c(e) == c(g) ? 0 : 1));if ((h != 0)) {return h;}else{return (d(e) < d(g) ? -1 : (d(e) == d(g) ? 0 : 1));};});b = (function(e,f){var g = this;{};g.X_ = e;g.Y_ = f;});c = (function(e,f){return e.X_;});d = (function(e,f){return e.Y_;});var e = (new b(0, "0"));var f = (new b(0, "0"));return (function(g){return (function(h){return ((a(g, h)) == 0);});})(e)(f) | |
***** FunScript.Tests.Comparison.custom IComparable record implementation greater than or equal works | |
// Code: | |
var d, c, b, a;a = (function(e,f){var g = f;var h = (c(e) < c(g) ? -1 : (c(e) == c(g) ? 0 : 1));if ((h != 0)) {return h;}else{return (d(e) < d(g) ? -1 : (d(e) == d(g) ? 0 : 1));};});b = (function(e,f){var g = this;{};g.X_ = e;g.Y_ = f;});c = (function(e,f){return e.X_;});d = (function(e,f){return e.Y_;});var e = (new b(0, "0"));var f = (new b(0, "0"));return (function(g){return (function(h){return ((a(g, h)) >= 0);});})(e)(f) | |
***** FunScript.Tests.Comparison.custom IComparable record implementation greater than works | |
// Code: | |
var d, c, b, a;a = (function(e,f){var g = f;var h = (c(e) < c(g) ? -1 : (c(e) == c(g) ? 0 : 1));if ((h != 0)) {return h;}else{return (d(e) < d(g) ? -1 : (d(e) == d(g) ? 0 : 1));};});b = (function(e,f){var g = this;{};g.X_ = e;g.Y_ = f;});c = (function(e,f){return e.X_;});d = (function(e,f){return e.Y_;});var e = (new b(0, "0"));var f = (new b(0, "0"));return (function(g){return (function(h){return ((a(g, h)) > 0);});})(e)(f) | |
***** FunScript.Tests.Comparison.custom IComparable record implementation inequality works | |
// Code: | |
var d, c, b, a;a = (function(e,f){var g = f;var h = (c(e) < c(g) ? -1 : (c(e) == c(g) ? 0 : 1));if ((h != 0)) {return h;}else{return (d(e) < d(g) ? -1 : (d(e) == d(g) ? 0 : 1));};});b = (function(e,f){var g = this;{};g.X_ = e;g.Y_ = f;});c = (function(e,f){return e.X_;});d = (function(e,f){return e.Y_;});var e = (new b(0, "0"));var f = (new b(0, "0"));return (function(g){return (function(h){return ((a(g, h)) != 0);});})(e)(f) | |
***** FunScript.Tests.Comparison.custom IComparable record implementation less than or equal works | |
// Code: | |
var d, c, b, a;a = (function(e,f){var g = f;var h = (c(e) < c(g) ? -1 : (c(e) == c(g) ? 0 : 1));if ((h != 0)) {return h;}else{return (d(e) < d(g) ? -1 : (d(e) == d(g) ? 0 : 1));};});b = (function(e,f){var g = this;{};g.X_ = e;g.Y_ = f;});c = (function(e,f){return e.X_;});d = (function(e,f){return e.Y_;});var e = (new b(0, "0"));var f = (new b(0, "0"));return (function(g){return (function(h){return ((a(g, h)) <= 0);});})(e)(f) | |
***** FunScript.Tests.Comparison.custom IComparable record implementation less than works | |
// Code: | |
var d, c, b, a;a = (function(e,f){var g = f;var h = (c(e) < c(g) ? -1 : (c(e) == c(g) ? 0 : 1));if ((h != 0)) {return h;}else{return (d(e) < d(g) ? -1 : (d(e) == d(g) ? 0 : 1));};});b = (function(e,f){var g = this;{};g.X_ = e;g.Y_ = f;});c = (function(e,f){return e.X_;});d = (function(e,f){return e.Y_;});var e = (new b(0, "0"));var f = (new b(0, "0"));return (function(g){return (function(h){return ((a(g, h)) < 0);});})(e)(f) | |
***** FunScript.Tests.Comparison.Infix equality works | |
// Code: | |
return (2.000000 == 3.000000) | |
***** FunScript.Tests.Comparison.Infix greater than or equal to works | |
// Code: | |
return (2.000000 >= 3.000000) | |
***** FunScript.Tests.Comparison.Infix greater than works | |
// Code: | |
return (2.000000 > 3.000000) | |
***** FunScript.Tests.Comparison.Infix inequality works | |
// Code: | |
return (2.000000 != 3.000000) | |
***** FunScript.Tests.Comparison.Infix less than or equal to works | |
// Code: | |
return (2.000000 <= 3.000000) | |
***** FunScript.Tests.Comparison.Infix less than works | |
// Code: | |
return (2.000000 < 3.000000) | |
***** FunScript.Tests.Comparison.list equality works | |
// Code: | |
var g, f, e, d, c, b, a;a = (function(h){return (function(i){var j = (h.Tag == 0.000000);var k = (i.Tag == 0.000000);if ((j && k)) {return 0;}else{if (j) {return -1;}else{if (k) {return 1;}else{var l = (h.Tag == 1.000000);var m = (i.Tag == 1.000000);if ((l && m)) {var n = (d(h) < d(i) ? -1 : (d(h) == d(i) ? 0 : 1));if ((n != 0)) {return n;}else{var o = a(e(h))(e(i));if ((o != 0)) {return o;}else{return 0;};};}else{if (l) {return -1;}else{if (m) {return 1;}else{throw ("Unknown union case");return null;};};};};};};});});b = (function(h,i){return (new f(h, i));});c = (function(){return (new g());});d = (function(h){if ((h.Tag == 1.000000)) {var i = h.Item2;var j = h.Item1;return j;}else{throw ("List was empty");return null;};});e = (function(h){if ((h.Tag == 1.000000)) {var i = h.Item2;var j = h.Item1;return i;}else{throw ("List was empty");return null;};});f = (function(Item1,Item2){var j = this;j.Tag = 1.000000;j._CaseName = "Cons";j.Item1 = Item1;j.Item2 = Item2;});g = (function(){var h = this;h.Tag = 0.000000;h._CaseName = "Nil";});var h = b(0, b(0, c()));var i = b(0, b(0, c()));return (function(j){return (function(k){return (a(j)(k) == 0);});})(h)(i) | |
***** FunScript.Tests.Comparison.list greater than or equal works | |
// Code: | |
var g, f, e, d, c, b, a;a = (function(h){return (function(i){var j = (h.Tag == 0.000000);var k = (i.Tag == 0.000000);if ((j && k)) {return 0;}else{if (j) {return -1;}else{if (k) {return 1;}else{var l = (h.Tag == 1.000000);var m = (i.Tag == 1.000000);if ((l && m)) {var n = (d(h) < d(i) ? -1 : (d(h) == d(i) ? 0 : 1));if ((n != 0)) {return n;}else{var o = a(e(h))(e(i));if ((o != 0)) {return o;}else{return 0;};};}else{if (l) {return -1;}else{if (m) {return 1;}else{throw ("Unknown union case");return null;};};};};};};});});b = (function(h,i){return (new f(h, i));});c = (function(){return (new g());});d = (function(h){if ((h.Tag == 1.000000)) {var i = h.Item2;var j = h.Item1;return j;}else{throw ("List was empty");return null;};});e = (function(h){if ((h.Tag == 1.000000)) {var i = h.Item2;var j = h.Item1;return i;}else{throw ("List was empty");return null;};});f = (function(Item1,Item2){var j = this;j.Tag = 1.000000;j._CaseName = "Cons";j.Item1 = Item1;j.Item2 = Item2;});g = (function(){var h = this;h.Tag = 0.000000;h._CaseName = "Nil";});var h = b(0, b(0, c()));var i = b(0, b(0, c()));return (function(j){return (function(k){return (a(j)(k) >= 0);});})(h)(i) | |
***** FunScript.Tests.Comparison.list greater than works | |
// Code: | |
var g, f, e, d, c, b, a;a = (function(h){return (function(i){var j = (h.Tag == 0.000000);var k = (i.Tag == 0.000000);if ((j && k)) {return 0;}else{if (j) {return -1;}else{if (k) {return 1;}else{var l = (h.Tag == 1.000000);var m = (i.Tag == 1.000000);if ((l && m)) {var n = (d(h) < d(i) ? -1 : (d(h) == d(i) ? 0 : 1));if ((n != 0)) {return n;}else{var o = a(e(h))(e(i));if ((o != 0)) {return o;}else{return 0;};};}else{if (l) {return -1;}else{if (m) {return 1;}else{throw ("Unknown union case");return null;};};};};};};});});b = (function(h,i){return (new f(h, i));});c = (function(){return (new g());});d = (function(h){if ((h.Tag == 1.000000)) {var i = h.Item2;var j = h.Item1;return j;}else{throw ("List was empty");return null;};});e = (function(h){if ((h.Tag == 1.000000)) {var i = h.Item2;var j = h.Item1;return i;}else{throw ("List was empty");return null;};});f = (function(Item1,Item2){var j = this;j.Tag = 1.000000;j._CaseName = "Cons";j.Item1 = Item1;j.Item2 = Item2;});g = (function(){var h = this;h.Tag = 0.000000;h._CaseName = "Nil";});var h = b(0, b(0, c()));var i = b(0, b(0, c()));return (function(j){return (function(k){return (a(j)(k) > 0);});})(h)(i) | |
***** FunScript.Tests.Comparison.list inequality works | |
// Code: | |
var g, f, e, d, c, b, a;a = (function(h){return (function(i){var j = (h.Tag == 0.000000);var k = (i.Tag == 0.000000);if ((j && k)) {return 0;}else{if (j) {return -1;}else{if (k) {return 1;}else{var l = (h.Tag == 1.000000);var m = (i.Tag == 1.000000);if ((l && m)) {var n = (d(h) < d(i) ? -1 : (d(h) == d(i) ? 0 : 1));if ((n != 0)) {return n;}else{var o = a(e(h))(e(i));if ((o != 0)) {return o;}else{return 0;};};}else{if (l) {return -1;}else{if (m) {return 1;}else{throw ("Unknown union case");return null;};};};};};};});});b = (function(h,i){return (new f(h, i));});c = (function(){return (new g());});d = (function(h){if ((h.Tag == 1.000000)) {var i = h.Item2;var j = h.Item1;return j;}else{throw ("List was empty");return null;};});e = (function(h){if ((h.Tag == 1.000000)) {var i = h.Item2;var j = h.Item1;return i;}else{throw ("List was empty");return null;};});f = (function(Item1,Item2){var j = this;j.Tag = 1.000000;j._CaseName = "Cons";j.Item1 = Item1;j.Item2 = Item2;});g = (function(){var h = this;h.Tag = 0.000000;h._CaseName = "Nil";});var h = b(0, b(0, c()));var i = b(0, b(0, c()));return (function(j){return (function(k){return (a(j)(k) != 0);});})(h)(i) | |
***** FunScript.Tests.Comparison.list less than or equal works | |
// Code: | |
var g, f, e, d, c, b, a;a = (function(h){return (function(i){var j = (h.Tag == 0.000000);var k = (i.Tag == 0.000000);if ((j && k)) {return 0;}else{if (j) {return -1;}else{if (k) {return 1;}else{var l = (h.Tag == 1.000000);var m = (i.Tag == 1.000000);if ((l && m)) {var n = (d(h) < d(i) ? -1 : (d(h) == d(i) ? 0 : 1));if ((n != 0)) {return n;}else{var o = a(e(h))(e(i));if ((o != 0)) {return o;}else{return 0;};};}else{if (l) {return -1;}else{if (m) {return 1;}else{throw ("Unknown union case");return null;};};};};};};});});b = (function(h,i){return (new f(h, i));});c = (function(){return (new g());});d = (function(h){if ((h.Tag == 1.000000)) {var i = h.Item2;var j = h.Item1;return j;}else{throw ("List was empty");return null;};});e = (function(h){if ((h.Tag == 1.000000)) {var i = h.Item2;var j = h.Item1;return i;}else{throw ("List was empty");return null;};});f = (function(Item1,Item2){var j = this;j.Tag = 1.000000;j._CaseName = "Cons";j.Item1 = Item1;j.Item2 = Item2;});g = (function(){var h = this;h.Tag = 0.000000;h._CaseName = "Nil";});var h = b(0, b(0, c()));var i = b(0, b(0, c()));return (function(j){return (function(k){return (a(j)(k) <= 0);});})(h)(i) | |
***** FunScript.Tests.Comparison.list less than works | |
// Code: | |
var g, f, e, d, c, b, a;a = (function(h){return (function(i){var j = (h.Tag == 0.000000);var k = (i.Tag == 0.000000);if ((j && k)) {return 0;}else{if (j) {return -1;}else{if (k) {return 1;}else{var l = (h.Tag == 1.000000);var m = (i.Tag == 1.000000);if ((l && m)) {var n = (d(h) < d(i) ? -1 : (d(h) == d(i) ? 0 : 1));if ((n != 0)) {return n;}else{var o = a(e(h))(e(i));if ((o != 0)) {return o;}else{return 0;};};}else{if (l) {return -1;}else{if (m) {return 1;}else{throw ("Unknown union case");return null;};};};};};};});});b = (function(h,i){return (new f(h, i));});c = (function(){return (new g());});d = (function(h){if ((h.Tag == 1.000000)) {var i = h.Item2;var j = h.Item1;return j;}else{throw ("List was empty");return null;};});e = (function(h){if ((h.Tag == 1.000000)) {var i = h.Item2;var j = h.Item1;return i;}else{throw ("List was empty");return null;};});f = (function(Item1,Item2){var j = this;j.Tag = 1.000000;j._CaseName = "Cons";j.Item1 = Item1;j.Item2 = Item2;});g = (function(){var h = this;h.Tag = 0.000000;h._CaseName = "Nil";});var h = b(0, b(0, c()));var i = b(0, b(0, c()));return (function(j){return (function(k){return (a(j)(k) < 0);});})(h)(i) | |
***** FunScript.Tests.Comparison.map equality works | |
// Code: | |
var bb, ab, _, Z, Y, X, W, V, U, T, S, R, Q, P, O, N, M, L, K, J, I, H, G, F, E, D, C, B, A, z, y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(cb,db){var eb = db;var fb;fb = cb;var gb;gb = eb;return J((function(hb){return (function(ib){var jb = cb.comparer_386.Compare(h(hb), h(ib));if ((jb != 0)) {return jb;}else{return (i(hb) < i(ib) ? -1 : (i(hb) == i(ib) ? 0 : 1));};});}), {GetEnumerator: (function(hb){return (function(ib,hb){return v(ib.tree_390);})(fb, hb);})}, {GetEnumerator: (function(hb){return (function(ib,hb){return v(ib.tree_390);})(gb, hb);})});});b = (function(cb){var db = this;{};db.factory = cb;});c = (function(cb,db,eb){return (new d(cb.comparer_386, p(cb.comparer_386, db, eb, cb.tree_390)));});d = (function(cb,db){var eb = this;{};eb.comparer_386 = cb;eb.tree_390 = db;});e = (function(cb){var db = (new f());var eb;eb = db;return (new d({Compare: (function(fb,gb){return (function(hb,fb,gb){return (fb < gb ? -1 : (fb == gb ? 0 : 1));})(eb, fb, gb);})}, (new A())));});f = (function(cb){{};});g = (function(cb,db){var eb = this;{};eb.key = cb;eb.value = db;});h = (function(cb,db){return cb.key;});i = (function(cb,db){return cb.value;});j = (function(cb,db){return (new _(cb, db));});k = (function(){return (new ab());});l = (function(cb){if ((cb.Tag == 1.000000)) {var db = cb.Item2;var eb = cb.Item1;return eb;}else{throw ("List was empty");return null;};});m = (function(cb){return ((cb.Tag == 0.000000) && true);});n = (function(cb){if ((cb.Tag == 1.000000)) {var db = cb.Item2;var eb = cb.Item1;return db;}else{throw ("List was empty");return null;};});o = (function(cb,db){var eb = this;eb.stack = cb;eb.started = db;});p = (function(cb,db,eb,fb){if ((fb.Tag == 1.000000)) {var gb = fb.Item1;var hb = cb.Compare(db, gb);if ((hb < 0)) {return (new B(db, eb, (new A()), fb, 2));}else{if ((hb == 0)) {return (new C(db, eb));}else{return (new B(db, eb, fb, (new A()), 2));};};}else{if ((fb.Tag == 2.000000)) {var ib = fb.Item2;var jb = fb.Item4;var kb = fb.Item3;var lb = fb.Item1;var mb = fb.Item5;var nb = cb.Compare(db, lb);if ((nb < 0)) {return z(p(cb, db, eb, kb), lb, ib, jb);}else{if ((nb == 0)) {return (new B(db, eb, kb, jb, mb));}else{return z(kb, lb, ib, p(cb, db, eb, jb));};};}else{return (new C(db, eb));};};});q = (function(cb){throw ("enumeration already finished");return null;});r = (function(cb){if ((cb.Tag == 1.000000)) {if ((l(cb).Tag == 1.000000)) {return cb;}else{if ((l(cb).Tag == 2.000000)) {var db = l(cb).Item1;var eb = l(cb).Item3;var fb = l(cb).Item4;var gb = n(cb);var hb = l(cb).Item2;return r(j(eb, j((new C(db, hb)), j(fb, gb))));}else{var ib = n(cb);return r(ib);};};}else{return k();};});s = (function(cb){if (cb.started) {var db = cb.stack;if ((db.Tag == 0.000000)) {return q();}else{if ((l(db).Tag == 1.000000)) {var eb = l(db).Item1;var fb = l(db).Item2;return (new g(eb, fb));}else{throw ("Please report error: Map iterator, unexpected stack for current");return null;};};}else{return y();};});t = (function(cb){if ((cb.Tag == 1.000000)) {return 1;}else{if ((cb.Tag == 2.000000)) {var db = cb.Item5;return db;}else{return 0;};};});u = (function(cb,db,eb,fb){var gb = (new Y(cb, fb));if ((gb.Items[0.000000].Tag == 0.000000)) {if ((gb.Items[1.000000].Tag == 0.000000)) {return (new C(db, eb));}else{var hb = t(cb);var ib = t(fb);var jb;if ((hb < ib)) {jb = ib;}else{jb = hb;};var kb = jb;return (new B(db, eb, cb, fb, (kb + 1)));};}else{var lb = t(cb);var mb = t(fb);var nb;if ((lb < mb)) {nb = mb;}else{nb = lb;};var ob = nb;return (new B(db, eb, cb, fb, (ob + 1)));};});v = (function(cb){var db;db = (new bb(cb));return {get_Current: (function(eb){return (function(fb,eb){return s(fb.i.contents);})(db, eb);}), MoveNext: (function(eb){return (function(fb,eb){return x(fb.i.contents);})(db, eb);}), Reset: (function(eb){return (function(fb,eb){fb.i.contents = w(fb.s);})(db, eb);}), Dispose: (function(eb){return (function(fb,eb){;})(db, eb);})};});w = (function(cb){return (new o(r(j(cb, k())), false));});x = (function(cb){if (cb.started) {var db = cb.stack;if ((db.Tag == 0.000000)) {return false;}else{if ((l(db).Tag == 1.000000)) {var eb = n(db);cb.stack = r(eb);null;return (!m(cb.stack));}else{throw ("Please report error: Map iterator, unexpected stack for moveNext");return null;};};}else{cb.started = true;null;return (!m(cb.stack));};});y = (function(cb){throw ("enumeration not started");return null;});z = (function(cb,db,eb,fb){var gb = t(cb);var hb = t(fb);if ((hb > (gb + 2))) {if ((fb.Tag == 2.000000)) {var ib = fb.Item2;var jb = fb.Item4;var kb = fb.Item3;var lb = fb.Item1;if ((t(kb) > (gb + 1))) {if ((kb.Tag == 2.000000)) {var mb = kb.Item2;var nb = kb.Item4;var ob = kb.Item3;var pb = kb.Item1;return u(u(cb, db, eb, ob), pb, mb, u(nb, lb, ib, jb));}else{throw ("rebalance");return null;};}else{return u(u(cb, db, eb, kb), lb, ib, jb);};}else{throw ("rebalance");return null;};}else{if ((gb > (hb + 2))) {if ((cb.Tag == 2.000000)) {var qb = cb.Item2;var rb = cb.Item4;var sb = cb.Item3;var tb = cb.Item1;if ((t(rb) > (hb + 1))) {if ((rb.Tag == 2.000000)) {var ub = rb.Item2;var vb = rb.Item4;var wb = rb.Item3;var xb = rb.Item1;return u(u(sb, tb, qb, wb), xb, ub, u(vb, db, eb, fb));}else{throw ("re balance");return null;};}else{return u(sb, tb, qb, u(rb, db, eb, fb));};}else{throw ("rebalance");return null;};}else{return u(cb, db, eb, fb);};};});A = (function(){var cb = this;cb.Tag = 0.000000;cb._CaseName = "MapEmpty";});B = (function(Item1,Item2,Item3,Item4,Item5){var hb = this;hb.Tag = 2.000000;hb._CaseName = "MapNode";hb.Item1 = Item1;hb.Item2 = Item2;hb.Item3 = Item3;hb.Item4 = Item4;hb.Item5 = Item5;});C = (function(Item1,Item2){var eb = this;eb.Tag = 1.000000;eb._CaseName = "MapOne";eb.Item1 = Item1;eb.Item2 = Item2;});D = (function(cb,db,eb){return c(eb, cb, db);});E = (function(){return e();});F = (function(cb){return cb.Value;;});G = (function(cb){return cb.Value;;});H = (function(cb){return cb.Value;;});I = (function(cb){return ((cb.Tag == 1.000000) && true);});J = (function(cb,db,eb){var fb = T((function(gb){return (gb != 0);}), S((function(gb){return (function(hb){return cb(gb)(hb);});}), db, eb));if ((fb.Tag == 0.000000)) {return (R(db) - R(eb));}else{var gb = F(fb);return gb;};});K = (function(cb){return Q((function(db){var eb;return L(cb(eb));}));});L = (function(cb){return cb.GetEnumerator();});M = (function(cb){return cb.GetEnumerator();});N = (function(cb,db,eb){return O((function(fb){return (function(gb){return (function(hb){return cb(gb)(hb);});});}), db, eb);});O = (function(cb,db,eb){return P(cb, db, M(eb));});P = (function(cb,db,eb){var fb = {contents: 0};var gb = {contents: db};while (eb.MoveNext()){gb.contents = cb(fb.contents)(gb.contents)(eb.get_Current());null;fb.contents = (fb.contents + 1);null;};return gb.contents;});Q = (function(cb){var db;db = (new b(cb));return {GetEnumerator: (function(eb){return (function(fb,eb){var gb;return fb.factory(gb);})(db, eb);})};});R = (function(cb){return N((function(db){return (function(eb){return (db + 1);});}), 0, cb);});S = (function(cb,db,eb){return K((function(fb){var gb = M(db);var hb = M(eb);var ib;return W((function(jb){if ((gb.MoveNext() && hb.MoveNext())) {var kb;return {Tag: 1.000000, Value: (new X(cb(gb.get_Current())(hb.get_Current()), kb))};}else{return {Tag: 0.000000};};}), ib);}));});T = (function(cb,db){return U((function(eb){return (function(fb){if (cb(fb)) {return {Tag: 1.000000, Value: fb};}else{return {Tag: 0.000000};};});}), db);});U = (function(cb,db){return V(cb, 0, L(db));});V = (function(cb,db,eb){if (eb.MoveNext()) {var fb = cb(db)(eb.get_Current());if ((fb.Tag == 0.000000)) {return V(cb, (db + 1), eb);}else{return fb;};}else{return {Tag: 0.000000};};});W = (function(cb,db){return Q((function(eb){var fb;fb = (new Z(db, cb));return {get_Current: (function(gb){return (function(hb,gb){return hb.current;})(fb, gb);}), MoveNext: (function(gb){return (function(hb,gb){var ib = (function(jb){var kb = H(hb.acc);var lb = hb.unfold(kb);if ((lb.Tag == 1.000000)) {var mb = G(lb).Items[0.000000];var nb = G(lb).Items[1.000000];hb.acc = {Tag: 1.000000, Value: nb};hb.current = mb;return true;}else{hb.acc = {Tag: 0.000000};hb.current = null;return false;};});return (I(hb.acc) && (function(){var jb;return ib(jb);})());})(fb, gb);}), Reset: (function(gb){return (function(hb,gb){hb.acc = {Tag: 1.000000, Value: hb.seed};hb.current = null;})(fb, gb);}), Dispose: (function(gb){return (function(hb,gb){;})(fb, gb);})};}));});X = (function(Item0,Item1){var eb = this;eb.Items = [Item0, Item1];});Y = (function(Item0,Item1){var eb = this;eb.Items = [Item0, Item1];});Z = (function(cb,db){var eb = this;{};eb.seed = cb;eb.unfold = db;eb.acc = {Tag: 1.000000, Value: eb.seed};eb.current = null;});_ = (function(Item1,Item2){var eb = this;eb.Tag = 1.000000;eb._CaseName = "Cons";eb.Item1 = Item1;eb.Item2 = Item2;});ab = (function(){var cb = this;cb.Tag = 0.000000;cb._CaseName = "Nil";});bb = (function(cb){var db = this;{};db.s = cb;db.i = {contents: w(db.s)};});var cb = D(0, 0, E());var db = D(0, 0, E());return (function(eb){return (function(fb){return ((a(eb, fb)) == 0);});})(cb)(db) | |
***** FunScript.Tests.Comparison.map greater than or equal works | |
// Code: | |
var bb, ab, _, Z, Y, X, W, V, U, T, S, R, Q, P, O, N, M, L, K, J, I, H, G, F, E, D, C, B, A, z, y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(cb,db){var eb = db;var fb;fb = cb;var gb;gb = eb;return J((function(hb){return (function(ib){var jb = cb.comparer_386.Compare(h(hb), h(ib));if ((jb != 0)) {return jb;}else{return (i(hb) < i(ib) ? -1 : (i(hb) == i(ib) ? 0 : 1));};});}), {GetEnumerator: (function(hb){return (function(ib,hb){return v(ib.tree_390);})(fb, hb);})}, {GetEnumerator: (function(hb){return (function(ib,hb){return v(ib.tree_390);})(gb, hb);})});});b = (function(cb){var db = this;{};db.factory = cb;});c = (function(cb,db,eb){return (new d(cb.comparer_386, p(cb.comparer_386, db, eb, cb.tree_390)));});d = (function(cb,db){var eb = this;{};eb.comparer_386 = cb;eb.tree_390 = db;});e = (function(cb){var db = (new f());var eb;eb = db;return (new d({Compare: (function(fb,gb){return (function(hb,fb,gb){return (fb < gb ? -1 : (fb == gb ? 0 : 1));})(eb, fb, gb);})}, (new A())));});f = (function(cb){{};});g = (function(cb,db){var eb = this;{};eb.key = cb;eb.value = db;});h = (function(cb,db){return cb.key;});i = (function(cb,db){return cb.value;});j = (function(cb,db){return (new _(cb, db));});k = (function(){return (new ab());});l = (function(cb){if ((cb.Tag == 1.000000)) {var db = cb.Item2;var eb = cb.Item1;return eb;}else{throw ("List was empty");return null;};});m = (function(cb){return ((cb.Tag == 0.000000) && true);});n = (function(cb){if ((cb.Tag == 1.000000)) {var db = cb.Item2;var eb = cb.Item1;return db;}else{throw ("List was empty");return null;};});o = (function(cb,db){var eb = this;eb.stack = cb;eb.started = db;});p = (function(cb,db,eb,fb){if ((fb.Tag == 1.000000)) {var gb = fb.Item1;var hb = cb.Compare(db, gb);if ((hb < 0)) {return (new B(db, eb, (new A()), fb, 2));}else{if ((hb == 0)) {return (new C(db, eb));}else{return (new B(db, eb, fb, (new A()), 2));};};}else{if ((fb.Tag == 2.000000)) {var ib = fb.Item2;var jb = fb.Item4;var kb = fb.Item3;var lb = fb.Item1;var mb = fb.Item5;var nb = cb.Compare(db, lb);if ((nb < 0)) {return z(p(cb, db, eb, kb), lb, ib, jb);}else{if ((nb == 0)) {return (new B(db, eb, kb, jb, mb));}else{return z(kb, lb, ib, p(cb, db, eb, jb));};};}else{return (new C(db, eb));};};});q = (function(cb){throw ("enumeration already finished");return null;});r = (function(cb){if ((cb.Tag == 1.000000)) {if ((l(cb).Tag == 1.000000)) {return cb;}else{if ((l(cb).Tag == 2.000000)) {var db = l(cb).Item1;var eb = l(cb).Item3;var fb = l(cb).Item4;var gb = n(cb);var hb = l(cb).Item2;return r(j(eb, j((new C(db, hb)), j(fb, gb))));}else{var ib = n(cb);return r(ib);};};}else{return k();};});s = (function(cb){if (cb.started) {var db = cb.stack;if ((db.Tag == 0.000000)) {return q();}else{if ((l(db).Tag == 1.000000)) {var eb = l(db).Item1;var fb = l(db).Item2;return (new g(eb, fb));}else{throw ("Please report error: Map iterator, unexpected stack for current");return null;};};}else{return y();};});t = (function(cb){if ((cb.Tag == 1.000000)) {return 1;}else{if ((cb.Tag == 2.000000)) {var db = cb.Item5;return db;}else{return 0;};};});u = (function(cb,db,eb,fb){var gb = (new Y(cb, fb));if ((gb.Items[0.000000].Tag == 0.000000)) {if ((gb.Items[1.000000].Tag == 0.000000)) {return (new C(db, eb));}else{var hb = t(cb);var ib = t(fb);var jb;if ((hb < ib)) {jb = ib;}else{jb = hb;};var kb = jb;return (new B(db, eb, cb, fb, (kb + 1)));};}else{var lb = t(cb);var mb = t(fb);var nb;if ((lb < mb)) {nb = mb;}else{nb = lb;};var ob = nb;return (new B(db, eb, cb, fb, (ob + 1)));};});v = (function(cb){var db;db = (new bb(cb));return {get_Current: (function(eb){return (function(fb,eb){return s(fb.i.contents);})(db, eb);}), MoveNext: (function(eb){return (function(fb,eb){return x(fb.i.contents);})(db, eb);}), Reset: (function(eb){return (function(fb,eb){fb.i.contents = w(fb.s);})(db, eb);}), Dispose: (function(eb){return (function(fb,eb){;})(db, eb);})};});w = (function(cb){return (new o(r(j(cb, k())), false));});x = (function(cb){if (cb.started) {var db = cb.stack;if ((db.Tag == 0.000000)) {return false;}else{if ((l(db).Tag == 1.000000)) {var eb = n(db);cb.stack = r(eb);null;return (!m(cb.stack));}else{throw ("Please report error: Map iterator, unexpected stack for moveNext");return null;};};}else{cb.started = true;null;return (!m(cb.stack));};});y = (function(cb){throw ("enumeration not started");return null;});z = (function(cb,db,eb,fb){var gb = t(cb);var hb = t(fb);if ((hb > (gb + 2))) {if ((fb.Tag == 2.000000)) {var ib = fb.Item2;var jb = fb.Item4;var kb = fb.Item3;var lb = fb.Item1;if ((t(kb) > (gb + 1))) {if ((kb.Tag == 2.000000)) {var mb = kb.Item2;var nb = kb.Item4;var ob = kb.Item3;var pb = kb.Item1;return u(u(cb, db, eb, ob), pb, mb, u(nb, lb, ib, jb));}else{throw ("rebalance");return null;};}else{return u(u(cb, db, eb, kb), lb, ib, jb);};}else{throw ("rebalance");return null;};}else{if ((gb > (hb + 2))) {if ((cb.Tag == 2.000000)) {var qb = cb.Item2;var rb = cb.Item4;var sb = cb.Item3;var tb = cb.Item1;if ((t(rb) > (hb + 1))) {if ((rb.Tag == 2.000000)) {var ub = rb.Item2;var vb = rb.Item4;var wb = rb.Item3;var xb = rb.Item1;return u(u(sb, tb, qb, wb), xb, ub, u(vb, db, eb, fb));}else{throw ("re balance");return null;};}else{return u(sb, tb, qb, u(rb, db, eb, fb));};}else{throw ("rebalance");return null;};}else{return u(cb, db, eb, fb);};};});A = (function(){var cb = this;cb.Tag = 0.000000;cb._CaseName = "MapEmpty";});B = (function(Item1,Item2,Item3,Item4,Item5){var hb = this;hb.Tag = 2.000000;hb._CaseName = "MapNode";hb.Item1 = Item1;hb.Item2 = Item2;hb.Item3 = Item3;hb.Item4 = Item4;hb.Item5 = Item5;});C = (function(Item1,Item2){var eb = this;eb.Tag = 1.000000;eb._CaseName = "MapOne";eb.Item1 = Item1;eb.Item2 = Item2;});D = (function(cb,db,eb){return c(eb, cb, db);});E = (function(){return e();});F = (function(cb){return cb.Value;;});G = (function(cb){return cb.Value;;});H = (function(cb){return cb.Value;;});I = (function(cb){return ((cb.Tag == 1.000000) && true);});J = (function(cb,db,eb){var fb = T((function(gb){return (gb != 0);}), S((function(gb){return (function(hb){return cb(gb)(hb);});}), db, eb));if ((fb.Tag == 0.000000)) {return (R(db) - R(eb));}else{var gb = F(fb);return gb;};});K = (function(cb){return Q((function(db){var eb;return L(cb(eb));}));});L = (function(cb){return cb.GetEnumerator();});M = (function(cb){return cb.GetEnumerator();});N = (function(cb,db,eb){return O((function(fb){return (function(gb){return (function(hb){return cb(gb)(hb);});});}), db, eb);});O = (function(cb,db,eb){return P(cb, db, M(eb));});P = (function(cb,db,eb){var fb = {contents: 0};var gb = {contents: db};while (eb.MoveNext()){gb.contents = cb(fb.contents)(gb.contents)(eb.get_Current());null;fb.contents = (fb.contents + 1);null;};return gb.contents;});Q = (function(cb){var db;db = (new b(cb));return {GetEnumerator: (function(eb){return (function(fb,eb){var gb;return fb.factory(gb);})(db, eb);})};});R = (function(cb){return N((function(db){return (function(eb){return (db + 1);});}), 0, cb);});S = (function(cb,db,eb){return K((function(fb){var gb = M(db);var hb = M(eb);var ib;return W((function(jb){if ((gb.MoveNext() && hb.MoveNext())) {var kb;return {Tag: 1.000000, Value: (new X(cb(gb.get_Current())(hb.get_Current()), kb))};}else{return {Tag: 0.000000};};}), ib);}));});T = (function(cb,db){return U((function(eb){return (function(fb){if (cb(fb)) {return {Tag: 1.000000, Value: fb};}else{return {Tag: 0.000000};};});}), db);});U = (function(cb,db){return V(cb, 0, L(db));});V = (function(cb,db,eb){if (eb.MoveNext()) {var fb = cb(db)(eb.get_Current());if ((fb.Tag == 0.000000)) {return V(cb, (db + 1), eb);}else{return fb;};}else{return {Tag: 0.000000};};});W = (function(cb,db){return Q((function(eb){var fb;fb = (new Z(db, cb));return {get_Current: (function(gb){return (function(hb,gb){return hb.current;})(fb, gb);}), MoveNext: (function(gb){return (function(hb,gb){var ib = (function(jb){var kb = H(hb.acc);var lb = hb.unfold(kb);if ((lb.Tag == 1.000000)) {var mb = G(lb).Items[0.000000];var nb = G(lb).Items[1.000000];hb.acc = {Tag: 1.000000, Value: nb};hb.current = mb;return true;}else{hb.acc = {Tag: 0.000000};hb.current = null;return false;};});return (I(hb.acc) && (function(){var jb;return ib(jb);})());})(fb, gb);}), Reset: (function(gb){return (function(hb,gb){hb.acc = {Tag: 1.000000, Value: hb.seed};hb.current = null;})(fb, gb);}), Dispose: (function(gb){return (function(hb,gb){;})(fb, gb);})};}));});X = (function(Item0,Item1){var eb = this;eb.Items = [Item0, Item1];});Y = (function(Item0,Item1){var eb = this;eb.Items = [Item0, Item1];});Z = (function(cb,db){var eb = this;{};eb.seed = cb;eb.unfold = db;eb.acc = {Tag: 1.000000, Value: eb.seed};eb.current = null;});_ = (function(Item1,Item2){var eb = this;eb.Tag = 1.000000;eb._CaseName = "Cons";eb.Item1 = Item1;eb.Item2 = Item2;});ab = (function(){var cb = this;cb.Tag = 0.000000;cb._CaseName = "Nil";});bb = (function(cb){var db = this;{};db.s = cb;db.i = {contents: w(db.s)};});var cb = D(0, 0, E());var db = D(0, 0, E());return (function(eb){return (function(fb){return ((a(eb, fb)) >= 0);});})(cb)(db) | |
***** FunScript.Tests.Comparison.map greater than works | |
// Code: | |
var bb, ab, _, Z, Y, X, W, V, U, T, S, R, Q, P, O, N, M, L, K, J, I, H, G, F, E, D, C, B, A, z, y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(cb,db){var eb = db;var fb;fb = cb;var gb;gb = eb;return J((function(hb){return (function(ib){var jb = cb.comparer_386.Compare(h(hb), h(ib));if ((jb != 0)) {return jb;}else{return (i(hb) < i(ib) ? -1 : (i(hb) == i(ib) ? 0 : 1));};});}), {GetEnumerator: (function(hb){return (function(ib,hb){return v(ib.tree_390);})(fb, hb);})}, {GetEnumerator: (function(hb){return (function(ib,hb){return v(ib.tree_390);})(gb, hb);})});});b = (function(cb){var db = this;{};db.factory = cb;});c = (function(cb,db,eb){return (new d(cb.comparer_386, p(cb.comparer_386, db, eb, cb.tree_390)));});d = (function(cb,db){var eb = this;{};eb.comparer_386 = cb;eb.tree_390 = db;});e = (function(cb){var db = (new f());var eb;eb = db;return (new d({Compare: (function(fb,gb){return (function(hb,fb,gb){return (fb < gb ? -1 : (fb == gb ? 0 : 1));})(eb, fb, gb);})}, (new A())));});f = (function(cb){{};});g = (function(cb,db){var eb = this;{};eb.key = cb;eb.value = db;});h = (function(cb,db){return cb.key;});i = (function(cb,db){return cb.value;});j = (function(cb,db){return (new _(cb, db));});k = (function(){return (new ab());});l = (function(cb){if ((cb.Tag == 1.000000)) {var db = cb.Item2;var eb = cb.Item1;return eb;}else{throw ("List was empty");return null;};});m = (function(cb){return ((cb.Tag == 0.000000) && true);});n = (function(cb){if ((cb.Tag == 1.000000)) {var db = cb.Item2;var eb = cb.Item1;return db;}else{throw ("List was empty");return null;};});o = (function(cb,db){var eb = this;eb.stack = cb;eb.started = db;});p = (function(cb,db,eb,fb){if ((fb.Tag == 1.000000)) {var gb = fb.Item1;var hb = cb.Compare(db, gb);if ((hb < 0)) {return (new B(db, eb, (new A()), fb, 2));}else{if ((hb == 0)) {return (new C(db, eb));}else{return (new B(db, eb, fb, (new A()), 2));};};}else{if ((fb.Tag == 2.000000)) {var ib = fb.Item2;var jb = fb.Item4;var kb = fb.Item3;var lb = fb.Item1;var mb = fb.Item5;var nb = cb.Compare(db, lb);if ((nb < 0)) {return z(p(cb, db, eb, kb), lb, ib, jb);}else{if ((nb == 0)) {return (new B(db, eb, kb, jb, mb));}else{return z(kb, lb, ib, p(cb, db, eb, jb));};};}else{return (new C(db, eb));};};});q = (function(cb){throw ("enumeration already finished");return null;});r = (function(cb){if ((cb.Tag == 1.000000)) {if ((l(cb).Tag == 1.000000)) {return cb;}else{if ((l(cb).Tag == 2.000000)) {var db = l(cb).Item1;var eb = l(cb).Item3;var fb = l(cb).Item4;var gb = n(cb);var hb = l(cb).Item2;return r(j(eb, j((new C(db, hb)), j(fb, gb))));}else{var ib = n(cb);return r(ib);};};}else{return k();};});s = (function(cb){if (cb.started) {var db = cb.stack;if ((db.Tag == 0.000000)) {return q();}else{if ((l(db).Tag == 1.000000)) {var eb = l(db).Item1;var fb = l(db).Item2;return (new g(eb, fb));}else{throw ("Please report error: Map iterator, unexpected stack for current");return null;};};}else{return y();};});t = (function(cb){if ((cb.Tag == 1.000000)) {return 1;}else{if ((cb.Tag == 2.000000)) {var db = cb.Item5;return db;}else{return 0;};};});u = (function(cb,db,eb,fb){var gb = (new Y(cb, fb));if ((gb.Items[0.000000].Tag == 0.000000)) {if ((gb.Items[1.000000].Tag == 0.000000)) {return (new C(db, eb));}else{var hb = t(cb);var ib = t(fb);var jb;if ((hb < ib)) {jb = ib;}else{jb = hb;};var kb = jb;return (new B(db, eb, cb, fb, (kb + 1)));};}else{var lb = t(cb);var mb = t(fb);var nb;if ((lb < mb)) {nb = mb;}else{nb = lb;};var ob = nb;return (new B(db, eb, cb, fb, (ob + 1)));};});v = (function(cb){var db;db = (new bb(cb));return {get_Current: (function(eb){return (function(fb,eb){return s(fb.i.contents);})(db, eb);}), MoveNext: (function(eb){return (function(fb,eb){return x(fb.i.contents);})(db, eb);}), Reset: (function(eb){return (function(fb,eb){fb.i.contents = w(fb.s);})(db, eb);}), Dispose: (function(eb){return (function(fb,eb){;})(db, eb);})};});w = (function(cb){return (new o(r(j(cb, k())), false));});x = (function(cb){if (cb.started) {var db = cb.stack;if ((db.Tag == 0.000000)) {return false;}else{if ((l(db).Tag == 1.000000)) {var eb = n(db);cb.stack = r(eb);null;return (!m(cb.stack));}else{throw ("Please report error: Map iterator, unexpected stack for moveNext");return null;};};}else{cb.started = true;null;return (!m(cb.stack));};});y = (function(cb){throw ("enumeration not started");return null;});z = (function(cb,db,eb,fb){var gb = t(cb);var hb = t(fb);if ((hb > (gb + 2))) {if ((fb.Tag == 2.000000)) {var ib = fb.Item2;var jb = fb.Item4;var kb = fb.Item3;var lb = fb.Item1;if ((t(kb) > (gb + 1))) {if ((kb.Tag == 2.000000)) {var mb = kb.Item2;var nb = kb.Item4;var ob = kb.Item3;var pb = kb.Item1;return u(u(cb, db, eb, ob), pb, mb, u(nb, lb, ib, jb));}else{throw ("rebalance");return null;};}else{return u(u(cb, db, eb, kb), lb, ib, jb);};}else{throw ("rebalance");return null;};}else{if ((gb > (hb + 2))) {if ((cb.Tag == 2.000000)) {var qb = cb.Item2;var rb = cb.Item4;var sb = cb.Item3;var tb = cb.Item1;if ((t(rb) > (hb + 1))) {if ((rb.Tag == 2.000000)) {var ub = rb.Item2;var vb = rb.Item4;var wb = rb.Item3;var xb = rb.Item1;return u(u(sb, tb, qb, wb), xb, ub, u(vb, db, eb, fb));}else{throw ("re balance");return null;};}else{return u(sb, tb, qb, u(rb, db, eb, fb));};}else{throw ("rebalance");return null;};}else{return u(cb, db, eb, fb);};};});A = (function(){var cb = this;cb.Tag = 0.000000;cb._CaseName = "MapEmpty";});B = (function(Item1,Item2,Item3,Item4,Item5){var hb = this;hb.Tag = 2.000000;hb._CaseName = "MapNode";hb.Item1 = Item1;hb.Item2 = Item2;hb.Item3 = Item3;hb.Item4 = Item4;hb.Item5 = Item5;});C = (function(Item1,Item2){var eb = this;eb.Tag = 1.000000;eb._CaseName = "MapOne";eb.Item1 = Item1;eb.Item2 = Item2;});D = (function(cb,db,eb){return c(eb, cb, db);});E = (function(){return e();});F = (function(cb){return cb.Value;;});G = (function(cb){return cb.Value;;});H = (function(cb){return cb.Value;;});I = (function(cb){return ((cb.Tag == 1.000000) && true);});J = (function(cb,db,eb){var fb = T((function(gb){return (gb != 0);}), S((function(gb){return (function(hb){return cb(gb)(hb);});}), db, eb));if ((fb.Tag == 0.000000)) {return (R(db) - R(eb));}else{var gb = F(fb);return gb;};});K = (function(cb){return Q((function(db){var eb;return L(cb(eb));}));});L = (function(cb){return cb.GetEnumerator();});M = (function(cb){return cb.GetEnumerator();});N = (function(cb,db,eb){return O((function(fb){return (function(gb){return (function(hb){return cb(gb)(hb);});});}), db, eb);});O = (function(cb,db,eb){return P(cb, db, M(eb));});P = (function(cb,db,eb){var fb = {contents: 0};var gb = {contents: db};while (eb.MoveNext()){gb.contents = cb(fb.contents)(gb.contents)(eb.get_Current());null;fb.contents = (fb.contents + 1);null;};return gb.contents;});Q = (function(cb){var db;db = (new b(cb));return {GetEnumerator: (function(eb){return (function(fb,eb){var gb;return fb.factory(gb);})(db, eb);})};});R = (function(cb){return N((function(db){return (function(eb){return (db + 1);});}), 0, cb);});S = (function(cb,db,eb){return K((function(fb){var gb = M(db);var hb = M(eb);var ib;return W((function(jb){if ((gb.MoveNext() && hb.MoveNext())) {var kb;return {Tag: 1.000000, Value: (new X(cb(gb.get_Current())(hb.get_Current()), kb))};}else{return {Tag: 0.000000};};}), ib);}));});T = (function(cb,db){return U((function(eb){return (function(fb){if (cb(fb)) {return {Tag: 1.000000, Value: fb};}else{return {Tag: 0.000000};};});}), db);});U = (function(cb,db){return V(cb, 0, L(db));});V = (function(cb,db,eb){if (eb.MoveNext()) {var fb = cb(db)(eb.get_Current());if ((fb.Tag == 0.000000)) {return V(cb, (db + 1), eb);}else{return fb;};}else{return {Tag: 0.000000};};});W = (function(cb,db){return Q((function(eb){var fb;fb = (new Z(db, cb));return {get_Current: (function(gb){return (function(hb,gb){return hb.current;})(fb, gb);}), MoveNext: (function(gb){return (function(hb,gb){var ib = (function(jb){var kb = H(hb.acc);var lb = hb.unfold(kb);if ((lb.Tag == 1.000000)) {var mb = G(lb).Items[0.000000];var nb = G(lb).Items[1.000000];hb.acc = {Tag: 1.000000, Value: nb};hb.current = mb;return true;}else{hb.acc = {Tag: 0.000000};hb.current = null;return false;};});return (I(hb.acc) && (function(){var jb;return ib(jb);})());})(fb, gb);}), Reset: (function(gb){return (function(hb,gb){hb.acc = {Tag: 1.000000, Value: hb.seed};hb.current = null;})(fb, gb);}), Dispose: (function(gb){return (function(hb,gb){;})(fb, gb);})};}));});X = (function(Item0,Item1){var eb = this;eb.Items = [Item0, Item1];});Y = (function(Item0,Item1){var eb = this;eb.Items = [Item0, Item1];});Z = (function(cb,db){var eb = this;{};eb.seed = cb;eb.unfold = db;eb.acc = {Tag: 1.000000, Value: eb.seed};eb.current = null;});_ = (function(Item1,Item2){var eb = this;eb.Tag = 1.000000;eb._CaseName = "Cons";eb.Item1 = Item1;eb.Item2 = Item2;});ab = (function(){var cb = this;cb.Tag = 0.000000;cb._CaseName = "Nil";});bb = (function(cb){var db = this;{};db.s = cb;db.i = {contents: w(db.s)};});var cb = D(0, 0, E());var db = D(0, 0, E());return (function(eb){return (function(fb){return ((a(eb, fb)) > 0);});})(cb)(db) | |
***** FunScript.Tests.Comparison.map inequality works | |
// Code: | |
var bb, ab, _, Z, Y, X, W, V, U, T, S, R, Q, P, O, N, M, L, K, J, I, H, G, F, E, D, C, B, A, z, y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(cb,db){var eb = db;var fb;fb = cb;var gb;gb = eb;return J((function(hb){return (function(ib){var jb = cb.comparer_386.Compare(h(hb), h(ib));if ((jb != 0)) {return jb;}else{return (i(hb) < i(ib) ? -1 : (i(hb) == i(ib) ? 0 : 1));};});}), {GetEnumerator: (function(hb){return (function(ib,hb){return v(ib.tree_390);})(fb, hb);})}, {GetEnumerator: (function(hb){return (function(ib,hb){return v(ib.tree_390);})(gb, hb);})});});b = (function(cb){var db = this;{};db.factory = cb;});c = (function(cb,db,eb){return (new d(cb.comparer_386, p(cb.comparer_386, db, eb, cb.tree_390)));});d = (function(cb,db){var eb = this;{};eb.comparer_386 = cb;eb.tree_390 = db;});e = (function(cb){var db = (new f());var eb;eb = db;return (new d({Compare: (function(fb,gb){return (function(hb,fb,gb){return (fb < gb ? -1 : (fb == gb ? 0 : 1));})(eb, fb, gb);})}, (new A())));});f = (function(cb){{};});g = (function(cb,db){var eb = this;{};eb.key = cb;eb.value = db;});h = (function(cb,db){return cb.key;});i = (function(cb,db){return cb.value;});j = (function(cb,db){return (new _(cb, db));});k = (function(){return (new ab());});l = (function(cb){if ((cb.Tag == 1.000000)) {var db = cb.Item2;var eb = cb.Item1;return eb;}else{throw ("List was empty");return null;};});m = (function(cb){return ((cb.Tag == 0.000000) && true);});n = (function(cb){if ((cb.Tag == 1.000000)) {var db = cb.Item2;var eb = cb.Item1;return db;}else{throw ("List was empty");return null;};});o = (function(cb,db){var eb = this;eb.stack = cb;eb.started = db;});p = (function(cb,db,eb,fb){if ((fb.Tag == 1.000000)) {var gb = fb.Item1;var hb = cb.Compare(db, gb);if ((hb < 0)) {return (new B(db, eb, (new A()), fb, 2));}else{if ((hb == 0)) {return (new C(db, eb));}else{return (new B(db, eb, fb, (new A()), 2));};};}else{if ((fb.Tag == 2.000000)) {var ib = fb.Item2;var jb = fb.Item4;var kb = fb.Item3;var lb = fb.Item1;var mb = fb.Item5;var nb = cb.Compare(db, lb);if ((nb < 0)) {return z(p(cb, db, eb, kb), lb, ib, jb);}else{if ((nb == 0)) {return (new B(db, eb, kb, jb, mb));}else{return z(kb, lb, ib, p(cb, db, eb, jb));};};}else{return (new C(db, eb));};};});q = (function(cb){throw ("enumeration already finished");return null;});r = (function(cb){if ((cb.Tag == 1.000000)) {if ((l(cb).Tag == 1.000000)) {return cb;}else{if ((l(cb).Tag == 2.000000)) {var db = l(cb).Item1;var eb = l(cb).Item3;var fb = l(cb).Item4;var gb = n(cb);var hb = l(cb).Item2;return r(j(eb, j((new C(db, hb)), j(fb, gb))));}else{var ib = n(cb);return r(ib);};};}else{return k();};});s = (function(cb){if (cb.started) {var db = cb.stack;if ((db.Tag == 0.000000)) {return q();}else{if ((l(db).Tag == 1.000000)) {var eb = l(db).Item1;var fb = l(db).Item2;return (new g(eb, fb));}else{throw ("Please report error: Map iterator, unexpected stack for current");return null;};};}else{return y();};});t = (function(cb){if ((cb.Tag == 1.000000)) {return 1;}else{if ((cb.Tag == 2.000000)) {var db = cb.Item5;return db;}else{return 0;};};});u = (function(cb,db,eb,fb){var gb = (new Y(cb, fb));if ((gb.Items[0.000000].Tag == 0.000000)) {if ((gb.Items[1.000000].Tag == 0.000000)) {return (new C(db, eb));}else{var hb = t(cb);var ib = t(fb);var jb;if ((hb < ib)) {jb = ib;}else{jb = hb;};var kb = jb;return (new B(db, eb, cb, fb, (kb + 1)));};}else{var lb = t(cb);var mb = t(fb);var nb;if ((lb < mb)) {nb = mb;}else{nb = lb;};var ob = nb;return (new B(db, eb, cb, fb, (ob + 1)));};});v = (function(cb){var db;db = (new bb(cb));return {get_Current: (function(eb){return (function(fb,eb){return s(fb.i.contents);})(db, eb);}), MoveNext: (function(eb){return (function(fb,eb){return x(fb.i.contents);})(db, eb);}), Reset: (function(eb){return (function(fb,eb){fb.i.contents = w(fb.s);})(db, eb);}), Dispose: (function(eb){return (function(fb,eb){;})(db, eb);})};});w = (function(cb){return (new o(r(j(cb, k())), false));});x = (function(cb){if (cb.started) {var db = cb.stack;if ((db.Tag == 0.000000)) {return false;}else{if ((l(db).Tag == 1.000000)) {var eb = n(db);cb.stack = r(eb);null;return (!m(cb.stack));}else{throw ("Please report error: Map iterator, unexpected stack for moveNext");return null;};};}else{cb.started = true;null;return (!m(cb.stack));};});y = (function(cb){throw ("enumeration not started");return null;});z = (function(cb,db,eb,fb){var gb = t(cb);var hb = t(fb);if ((hb > (gb + 2))) {if ((fb.Tag == 2.000000)) {var ib = fb.Item2;var jb = fb.Item4;var kb = fb.Item3;var lb = fb.Item1;if ((t(kb) > (gb + 1))) {if ((kb.Tag == 2.000000)) {var mb = kb.Item2;var nb = kb.Item4;var ob = kb.Item3;var pb = kb.Item1;return u(u(cb, db, eb, ob), pb, mb, u(nb, lb, ib, jb));}else{throw ("rebalance");return null;};}else{return u(u(cb, db, eb, kb), lb, ib, jb);};}else{throw ("rebalance");return null;};}else{if ((gb > (hb + 2))) {if ((cb.Tag == 2.000000)) {var qb = cb.Item2;var rb = cb.Item4;var sb = cb.Item3;var tb = cb.Item1;if ((t(rb) > (hb + 1))) {if ((rb.Tag == 2.000000)) {var ub = rb.Item2;var vb = rb.Item4;var wb = rb.Item3;var xb = rb.Item1;return u(u(sb, tb, qb, wb), xb, ub, u(vb, db, eb, fb));}else{throw ("re balance");return null;};}else{return u(sb, tb, qb, u(rb, db, eb, fb));};}else{throw ("rebalance");return null;};}else{return u(cb, db, eb, fb);};};});A = (function(){var cb = this;cb.Tag = 0.000000;cb._CaseName = "MapEmpty";});B = (function(Item1,Item2,Item3,Item4,Item5){var hb = this;hb.Tag = 2.000000;hb._CaseName = "MapNode";hb.Item1 = Item1;hb.Item2 = Item2;hb.Item3 = Item3;hb.Item4 = Item4;hb.Item5 = Item5;});C = (function(Item1,Item2){var eb = this;eb.Tag = 1.000000;eb._CaseName = "MapOne";eb.Item1 = Item1;eb.Item2 = Item2;});D = (function(cb,db,eb){return c(eb, cb, db);});E = (function(){return e();});F = (function(cb){return cb.Value;;});G = (function(cb){return cb.Value;;});H = (function(cb){return cb.Value;;});I = (function(cb){return ((cb.Tag == 1.000000) && true);});J = (function(cb,db,eb){var fb = T((function(gb){return (gb != 0);}), S((function(gb){return (function(hb){return cb(gb)(hb);});}), db, eb));if ((fb.Tag == 0.000000)) {return (R(db) - R(eb));}else{var gb = F(fb);return gb;};});K = (function(cb){return Q((function(db){var eb;return L(cb(eb));}));});L = (function(cb){return cb.GetEnumerator();});M = (function(cb){return cb.GetEnumerator();});N = (function(cb,db,eb){return O((function(fb){return (function(gb){return (function(hb){return cb(gb)(hb);});});}), db, eb);});O = (function(cb,db,eb){return P(cb, db, M(eb));});P = (function(cb,db,eb){var fb = {contents: 0};var gb = {contents: db};while (eb.MoveNext()){gb.contents = cb(fb.contents)(gb.contents)(eb.get_Current());null;fb.contents = (fb.contents + 1);null;};return gb.contents;});Q = (function(cb){var db;db = (new b(cb));return {GetEnumerator: (function(eb){return (function(fb,eb){var gb;return fb.factory(gb);})(db, eb);})};});R = (function(cb){return N((function(db){return (function(eb){return (db + 1);});}), 0, cb);});S = (function(cb,db,eb){return K((function(fb){var gb = M(db);var hb = M(eb);var ib;return W((function(jb){if ((gb.MoveNext() && hb.MoveNext())) {var kb;return {Tag: 1.000000, Value: (new X(cb(gb.get_Current())(hb.get_Current()), kb))};}else{return {Tag: 0.000000};};}), ib);}));});T = (function(cb,db){return U((function(eb){return (function(fb){if (cb(fb)) {return {Tag: 1.000000, Value: fb};}else{return {Tag: 0.000000};};});}), db);});U = (function(cb,db){return V(cb, 0, L(db));});V = (function(cb,db,eb){if (eb.MoveNext()) {var fb = cb(db)(eb.get_Current());if ((fb.Tag == 0.000000)) {return V(cb, (db + 1), eb);}else{return fb;};}else{return {Tag: 0.000000};};});W = (function(cb,db){return Q((function(eb){var fb;fb = (new Z(db, cb));return {get_Current: (function(gb){return (function(hb,gb){return hb.current;})(fb, gb);}), MoveNext: (function(gb){return (function(hb,gb){var ib = (function(jb){var kb = H(hb.acc);var lb = hb.unfold(kb);if ((lb.Tag == 1.000000)) {var mb = G(lb).Items[0.000000];var nb = G(lb).Items[1.000000];hb.acc = {Tag: 1.000000, Value: nb};hb.current = mb;return true;}else{hb.acc = {Tag: 0.000000};hb.current = null;return false;};});return (I(hb.acc) && (function(){var jb;return ib(jb);})());})(fb, gb);}), Reset: (function(gb){return (function(hb,gb){hb.acc = {Tag: 1.000000, Value: hb.seed};hb.current = null;})(fb, gb);}), Dispose: (function(gb){return (function(hb,gb){;})(fb, gb);})};}));});X = (function(Item0,Item1){var eb = this;eb.Items = [Item0, Item1];});Y = (function(Item0,Item1){var eb = this;eb.Items = [Item0, Item1];});Z = (function(cb,db){var eb = this;{};eb.seed = cb;eb.unfold = db;eb.acc = {Tag: 1.000000, Value: eb.seed};eb.current = null;});_ = (function(Item1,Item2){var eb = this;eb.Tag = 1.000000;eb._CaseName = "Cons";eb.Item1 = Item1;eb.Item2 = Item2;});ab = (function(){var cb = this;cb.Tag = 0.000000;cb._CaseName = "Nil";});bb = (function(cb){var db = this;{};db.s = cb;db.i = {contents: w(db.s)};});var cb = D(0, 0, E());var db = D(0, 0, E());return (function(eb){return (function(fb){return ((a(eb, fb)) != 0);});})(cb)(db) | |
***** FunScript.Tests.Comparison.map less than or equal works | |
// Code: | |
var bb, ab, _, Z, Y, X, W, V, U, T, S, R, Q, P, O, N, M, L, K, J, I, H, G, F, E, D, C, B, A, z, y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(cb,db){var eb = db;var fb;fb = cb;var gb;gb = eb;return J((function(hb){return (function(ib){var jb = cb.comparer_386.Compare(h(hb), h(ib));if ((jb != 0)) {return jb;}else{return (i(hb) < i(ib) ? -1 : (i(hb) == i(ib) ? 0 : 1));};});}), {GetEnumerator: (function(hb){return (function(ib,hb){return v(ib.tree_390);})(fb, hb);})}, {GetEnumerator: (function(hb){return (function(ib,hb){return v(ib.tree_390);})(gb, hb);})});});b = (function(cb){var db = this;{};db.factory = cb;});c = (function(cb,db,eb){return (new d(cb.comparer_386, p(cb.comparer_386, db, eb, cb.tree_390)));});d = (function(cb,db){var eb = this;{};eb.comparer_386 = cb;eb.tree_390 = db;});e = (function(cb){var db = (new f());var eb;eb = db;return (new d({Compare: (function(fb,gb){return (function(hb,fb,gb){return (fb < gb ? -1 : (fb == gb ? 0 : 1));})(eb, fb, gb);})}, (new A())));});f = (function(cb){{};});g = (function(cb,db){var eb = this;{};eb.key = cb;eb.value = db;});h = (function(cb,db){return cb.key;});i = (function(cb,db){return cb.value;});j = (function(cb,db){return (new _(cb, db));});k = (function(){return (new ab());});l = (function(cb){if ((cb.Tag == 1.000000)) {var db = cb.Item2;var eb = cb.Item1;return eb;}else{throw ("List was empty");return null;};});m = (function(cb){return ((cb.Tag == 0.000000) && true);});n = (function(cb){if ((cb.Tag == 1.000000)) {var db = cb.Item2;var eb = cb.Item1;return db;}else{throw ("List was empty");return null;};});o = (function(cb,db){var eb = this;eb.stack = cb;eb.started = db;});p = (function(cb,db,eb,fb){if ((fb.Tag == 1.000000)) {var gb = fb.Item1;var hb = cb.Compare(db, gb);if ((hb < 0)) {return (new B(db, eb, (new A()), fb, 2));}else{if ((hb == 0)) {return (new C(db, eb));}else{return (new B(db, eb, fb, (new A()), 2));};};}else{if ((fb.Tag == 2.000000)) {var ib = fb.Item2;var jb = fb.Item4;var kb = fb.Item3;var lb = fb.Item1;var mb = fb.Item5;var nb = cb.Compare(db, lb);if ((nb < 0)) {return z(p(cb, db, eb, kb), lb, ib, jb);}else{if ((nb == 0)) {return (new B(db, eb, kb, jb, mb));}else{return z(kb, lb, ib, p(cb, db, eb, jb));};};}else{return (new C(db, eb));};};});q = (function(cb){throw ("enumeration already finished");return null;});r = (function(cb){if ((cb.Tag == 1.000000)) {if ((l(cb).Tag == 1.000000)) {return cb;}else{if ((l(cb).Tag == 2.000000)) {var db = l(cb).Item1;var eb = l(cb).Item3;var fb = l(cb).Item4;var gb = n(cb);var hb = l(cb).Item2;return r(j(eb, j((new C(db, hb)), j(fb, gb))));}else{var ib = n(cb);return r(ib);};};}else{return k();};});s = (function(cb){if (cb.started) {var db = cb.stack;if ((db.Tag == 0.000000)) {return q();}else{if ((l(db).Tag == 1.000000)) {var eb = l(db).Item1;var fb = l(db).Item2;return (new g(eb, fb));}else{throw ("Please report error: Map iterator, unexpected stack for current");return null;};};}else{return y();};});t = (function(cb){if ((cb.Tag == 1.000000)) {return 1;}else{if ((cb.Tag == 2.000000)) {var db = cb.Item5;return db;}else{return 0;};};});u = (function(cb,db,eb,fb){var gb = (new Y(cb, fb));if ((gb.Items[0.000000].Tag == 0.000000)) {if ((gb.Items[1.000000].Tag == 0.000000)) {return (new C(db, eb));}else{var hb = t(cb);var ib = t(fb);var jb;if ((hb < ib)) {jb = ib;}else{jb = hb;};var kb = jb;return (new B(db, eb, cb, fb, (kb + 1)));};}else{var lb = t(cb);var mb = t(fb);var nb;if ((lb < mb)) {nb = mb;}else{nb = lb;};var ob = nb;return (new B(db, eb, cb, fb, (ob + 1)));};});v = (function(cb){var db;db = (new bb(cb));return {get_Current: (function(eb){return (function(fb,eb){return s(fb.i.contents);})(db, eb);}), MoveNext: (function(eb){return (function(fb,eb){return x(fb.i.contents);})(db, eb);}), Reset: (function(eb){return (function(fb,eb){fb.i.contents = w(fb.s);})(db, eb);}), Dispose: (function(eb){return (function(fb,eb){;})(db, eb);})};});w = (function(cb){return (new o(r(j(cb, k())), false));});x = (function(cb){if (cb.started) {var db = cb.stack;if ((db.Tag == 0.000000)) {return false;}else{if ((l(db).Tag == 1.000000)) {var eb = n(db);cb.stack = r(eb);null;return (!m(cb.stack));}else{throw ("Please report error: Map iterator, unexpected stack for moveNext");return null;};};}else{cb.started = true;null;return (!m(cb.stack));};});y = (function(cb){throw ("enumeration not started");return null;});z = (function(cb,db,eb,fb){var gb = t(cb);var hb = t(fb);if ((hb > (gb + 2))) {if ((fb.Tag == 2.000000)) {var ib = fb.Item2;var jb = fb.Item4;var kb = fb.Item3;var lb = fb.Item1;if ((t(kb) > (gb + 1))) {if ((kb.Tag == 2.000000)) {var mb = kb.Item2;var nb = kb.Item4;var ob = kb.Item3;var pb = kb.Item1;return u(u(cb, db, eb, ob), pb, mb, u(nb, lb, ib, jb));}else{throw ("rebalance");return null;};}else{return u(u(cb, db, eb, kb), lb, ib, jb);};}else{throw ("rebalance");return null;};}else{if ((gb > (hb + 2))) {if ((cb.Tag == 2.000000)) {var qb = cb.Item2;var rb = cb.Item4;var sb = cb.Item3;var tb = cb.Item1;if ((t(rb) > (hb + 1))) {if ((rb.Tag == 2.000000)) {var ub = rb.Item2;var vb = rb.Item4;var wb = rb.Item3;var xb = rb.Item1;return u(u(sb, tb, qb, wb), xb, ub, u(vb, db, eb, fb));}else{throw ("re balance");return null;};}else{return u(sb, tb, qb, u(rb, db, eb, fb));};}else{throw ("rebalance");return null;};}else{return u(cb, db, eb, fb);};};});A = (function(){var cb = this;cb.Tag = 0.000000;cb._CaseName = "MapEmpty";});B = (function(Item1,Item2,Item3,Item4,Item5){var hb = this;hb.Tag = 2.000000;hb._CaseName = "MapNode";hb.Item1 = Item1;hb.Item2 = Item2;hb.Item3 = Item3;hb.Item4 = Item4;hb.Item5 = Item5;});C = (function(Item1,Item2){var eb = this;eb.Tag = 1.000000;eb._CaseName = "MapOne";eb.Item1 = Item1;eb.Item2 = Item2;});D = (function(cb,db,eb){return c(eb, cb, db);});E = (function(){return e();});F = (function(cb){return cb.Value;;});G = (function(cb){return cb.Value;;});H = (function(cb){return cb.Value;;});I = (function(cb){return ((cb.Tag == 1.000000) && true);});J = (function(cb,db,eb){var fb = T((function(gb){return (gb != 0);}), S((function(gb){return (function(hb){return cb(gb)(hb);});}), db, eb));if ((fb.Tag == 0.000000)) {return (R(db) - R(eb));}else{var gb = F(fb);return gb;};});K = (function(cb){return Q((function(db){var eb;return L(cb(eb));}));});L = (function(cb){return cb.GetEnumerator();});M = (function(cb){return cb.GetEnumerator();});N = (function(cb,db,eb){return O((function(fb){return (function(gb){return (function(hb){return cb(gb)(hb);});});}), db, eb);});O = (function(cb,db,eb){return P(cb, db, M(eb));});P = (function(cb,db,eb){var fb = {contents: 0};var gb = {contents: db};while (eb.MoveNext()){gb.contents = cb(fb.contents)(gb.contents)(eb.get_Current());null;fb.contents = (fb.contents + 1);null;};return gb.contents;});Q = (function(cb){var db;db = (new b(cb));return {GetEnumerator: (function(eb){return (function(fb,eb){var gb;return fb.factory(gb);})(db, eb);})};});R = (function(cb){return N((function(db){return (function(eb){return (db + 1);});}), 0, cb);});S = (function(cb,db,eb){return K((function(fb){var gb = M(db);var hb = M(eb);var ib;return W((function(jb){if ((gb.MoveNext() && hb.MoveNext())) {var kb;return {Tag: 1.000000, Value: (new X(cb(gb.get_Current())(hb.get_Current()), kb))};}else{return {Tag: 0.000000};};}), ib);}));});T = (function(cb,db){return U((function(eb){return (function(fb){if (cb(fb)) {return {Tag: 1.000000, Value: fb};}else{return {Tag: 0.000000};};});}), db);});U = (function(cb,db){return V(cb, 0, L(db));});V = (function(cb,db,eb){if (eb.MoveNext()) {var fb = cb(db)(eb.get_Current());if ((fb.Tag == 0.000000)) {return V(cb, (db + 1), eb);}else{return fb;};}else{return {Tag: 0.000000};};});W = (function(cb,db){return Q((function(eb){var fb;fb = (new Z(db, cb));return {get_Current: (function(gb){return (function(hb,gb){return hb.current;})(fb, gb);}), MoveNext: (function(gb){return (function(hb,gb){var ib = (function(jb){var kb = H(hb.acc);var lb = hb.unfold(kb);if ((lb.Tag == 1.000000)) {var mb = G(lb).Items[0.000000];var nb = G(lb).Items[1.000000];hb.acc = {Tag: 1.000000, Value: nb};hb.current = mb;return true;}else{hb.acc = {Tag: 0.000000};hb.current = null;return false;};});return (I(hb.acc) && (function(){var jb;return ib(jb);})());})(fb, gb);}), Reset: (function(gb){return (function(hb,gb){hb.acc = {Tag: 1.000000, Value: hb.seed};hb.current = null;})(fb, gb);}), Dispose: (function(gb){return (function(hb,gb){;})(fb, gb);})};}));});X = (function(Item0,Item1){var eb = this;eb.Items = [Item0, Item1];});Y = (function(Item0,Item1){var eb = this;eb.Items = [Item0, Item1];});Z = (function(cb,db){var eb = this;{};eb.seed = cb;eb.unfold = db;eb.acc = {Tag: 1.000000, Value: eb.seed};eb.current = null;});_ = (function(Item1,Item2){var eb = this;eb.Tag = 1.000000;eb._CaseName = "Cons";eb.Item1 = Item1;eb.Item2 = Item2;});ab = (function(){var cb = this;cb.Tag = 0.000000;cb._CaseName = "Nil";});bb = (function(cb){var db = this;{};db.s = cb;db.i = {contents: w(db.s)};});var cb = D(0, 0, E());var db = D(0, 0, E());return (function(eb){return (function(fb){return ((a(eb, fb)) <= 0);});})(cb)(db) | |
***** FunScript.Tests.Comparison.map less than works | |
// Code: | |
var bb, ab, _, Z, Y, X, W, V, U, T, S, R, Q, P, O, N, M, L, K, J, I, H, G, F, E, D, C, B, A, z, y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(cb,db){var eb = db;var fb;fb = cb;var gb;gb = eb;return J((function(hb){return (function(ib){var jb = cb.comparer_386.Compare(h(hb), h(ib));if ((jb != 0)) {return jb;}else{return (i(hb) < i(ib) ? -1 : (i(hb) == i(ib) ? 0 : 1));};});}), {GetEnumerator: (function(hb){return (function(ib,hb){return v(ib.tree_390);})(fb, hb);})}, {GetEnumerator: (function(hb){return (function(ib,hb){return v(ib.tree_390);})(gb, hb);})});});b = (function(cb){var db = this;{};db.factory = cb;});c = (function(cb,db,eb){return (new d(cb.comparer_386, p(cb.comparer_386, db, eb, cb.tree_390)));});d = (function(cb,db){var eb = this;{};eb.comparer_386 = cb;eb.tree_390 = db;});e = (function(cb){var db = (new f());var eb;eb = db;return (new d({Compare: (function(fb,gb){return (function(hb,fb,gb){return (fb < gb ? -1 : (fb == gb ? 0 : 1));})(eb, fb, gb);})}, (new A())));});f = (function(cb){{};});g = (function(cb,db){var eb = this;{};eb.key = cb;eb.value = db;});h = (function(cb,db){return cb.key;});i = (function(cb,db){return cb.value;});j = (function(cb,db){return (new _(cb, db));});k = (function(){return (new ab());});l = (function(cb){if ((cb.Tag == 1.000000)) {var db = cb.Item2;var eb = cb.Item1;return eb;}else{throw ("List was empty");return null;};});m = (function(cb){return ((cb.Tag == 0.000000) && true);});n = (function(cb){if ((cb.Tag == 1.000000)) {var db = cb.Item2;var eb = cb.Item1;return db;}else{throw ("List was empty");return null;};});o = (function(cb,db){var eb = this;eb.stack = cb;eb.started = db;});p = (function(cb,db,eb,fb){if ((fb.Tag == 1.000000)) {var gb = fb.Item1;var hb = cb.Compare(db, gb);if ((hb < 0)) {return (new B(db, eb, (new A()), fb, 2));}else{if ((hb == 0)) {return (new C(db, eb));}else{return (new B(db, eb, fb, (new A()), 2));};};}else{if ((fb.Tag == 2.000000)) {var ib = fb.Item2;var jb = fb.Item4;var kb = fb.Item3;var lb = fb.Item1;var mb = fb.Item5;var nb = cb.Compare(db, lb);if ((nb < 0)) {return z(p(cb, db, eb, kb), lb, ib, jb);}else{if ((nb == 0)) {return (new B(db, eb, kb, jb, mb));}else{return z(kb, lb, ib, p(cb, db, eb, jb));};};}else{return (new C(db, eb));};};});q = (function(cb){throw ("enumeration already finished");return null;});r = (function(cb){if ((cb.Tag == 1.000000)) {if ((l(cb).Tag == 1.000000)) {return cb;}else{if ((l(cb).Tag == 2.000000)) {var db = l(cb).Item1;var eb = l(cb).Item3;var fb = l(cb).Item4;var gb = n(cb);var hb = l(cb).Item2;return r(j(eb, j((new C(db, hb)), j(fb, gb))));}else{var ib = n(cb);return r(ib);};};}else{return k();};});s = (function(cb){if (cb.started) {var db = cb.stack;if ((db.Tag == 0.000000)) {return q();}else{if ((l(db).Tag == 1.000000)) {var eb = l(db).Item1;var fb = l(db).Item2;return (new g(eb, fb));}else{throw ("Please report error: Map iterator, unexpected stack for current");return null;};};}else{return y();};});t = (function(cb){if ((cb.Tag == 1.000000)) {return 1;}else{if ((cb.Tag == 2.000000)) {var db = cb.Item5;return db;}else{return 0;};};});u = (function(cb,db,eb,fb){var gb = (new Y(cb, fb));if ((gb.Items[0.000000].Tag == 0.000000)) {if ((gb.Items[1.000000].Tag == 0.000000)) {return (new C(db, eb));}else{var hb = t(cb);var ib = t(fb);var jb;if ((hb < ib)) {jb = ib;}else{jb = hb;};var kb = jb;return (new B(db, eb, cb, fb, (kb + 1)));};}else{var lb = t(cb);var mb = t(fb);var nb;if ((lb < mb)) {nb = mb;}else{nb = lb;};var ob = nb;return (new B(db, eb, cb, fb, (ob + 1)));};});v = (function(cb){var db;db = (new bb(cb));return {get_Current: (function(eb){return (function(fb,eb){return s(fb.i.contents);})(db, eb);}), MoveNext: (function(eb){return (function(fb,eb){return x(fb.i.contents);})(db, eb);}), Reset: (function(eb){return (function(fb,eb){fb.i.contents = w(fb.s);})(db, eb);}), Dispose: (function(eb){return (function(fb,eb){;})(db, eb);})};});w = (function(cb){return (new o(r(j(cb, k())), false));});x = (function(cb){if (cb.started) {var db = cb.stack;if ((db.Tag == 0.000000)) {return false;}else{if ((l(db).Tag == 1.000000)) {var eb = n(db);cb.stack = r(eb);null;return (!m(cb.stack));}else{throw ("Please report error: Map iterator, unexpected stack for moveNext");return null;};};}else{cb.started = true;null;return (!m(cb.stack));};});y = (function(cb){throw ("enumeration not started");return null;});z = (function(cb,db,eb,fb){var gb = t(cb);var hb = t(fb);if ((hb > (gb + 2))) {if ((fb.Tag == 2.000000)) {var ib = fb.Item2;var jb = fb.Item4;var kb = fb.Item3;var lb = fb.Item1;if ((t(kb) > (gb + 1))) {if ((kb.Tag == 2.000000)) {var mb = kb.Item2;var nb = kb.Item4;var ob = kb.Item3;var pb = kb.Item1;return u(u(cb, db, eb, ob), pb, mb, u(nb, lb, ib, jb));}else{throw ("rebalance");return null;};}else{return u(u(cb, db, eb, kb), lb, ib, jb);};}else{throw ("rebalance");return null;};}else{if ((gb > (hb + 2))) {if ((cb.Tag == 2.000000)) {var qb = cb.Item2;var rb = cb.Item4;var sb = cb.Item3;var tb = cb.Item1;if ((t(rb) > (hb + 1))) {if ((rb.Tag == 2.000000)) {var ub = rb.Item2;var vb = rb.Item4;var wb = rb.Item3;var xb = rb.Item1;return u(u(sb, tb, qb, wb), xb, ub, u(vb, db, eb, fb));}else{throw ("re balance");return null;};}else{return u(sb, tb, qb, u(rb, db, eb, fb));};}else{throw ("rebalance");return null;};}else{return u(cb, db, eb, fb);};};});A = (function(){var cb = this;cb.Tag = 0.000000;cb._CaseName = "MapEmpty";});B = (function(Item1,Item2,Item3,Item4,Item5){var hb = this;hb.Tag = 2.000000;hb._CaseName = "MapNode";hb.Item1 = Item1;hb.Item2 = Item2;hb.Item3 = Item3;hb.Item4 = Item4;hb.Item5 = Item5;});C = (function(Item1,Item2){var eb = this;eb.Tag = 1.000000;eb._CaseName = "MapOne";eb.Item1 = Item1;eb.Item2 = Item2;});D = (function(cb,db,eb){return c(eb, cb, db);});E = (function(){return e();});F = (function(cb){return cb.Value;;});G = (function(cb){return cb.Value;;});H = (function(cb){return cb.Value;;});I = (function(cb){return ((cb.Tag == 1.000000) && true);});J = (function(cb,db,eb){var fb = T((function(gb){return (gb != 0);}), S((function(gb){return (function(hb){return cb(gb)(hb);});}), db, eb));if ((fb.Tag == 0.000000)) {return (R(db) - R(eb));}else{var gb = F(fb);return gb;};});K = (function(cb){return Q((function(db){var eb;return L(cb(eb));}));});L = (function(cb){return cb.GetEnumerator();});M = (function(cb){return cb.GetEnumerator();});N = (function(cb,db,eb){return O((function(fb){return (function(gb){return (function(hb){return cb(gb)(hb);});});}), db, eb);});O = (function(cb,db,eb){return P(cb, db, M(eb));});P = (function(cb,db,eb){var fb = {contents: 0};var gb = {contents: db};while (eb.MoveNext()){gb.contents = cb(fb.contents)(gb.contents)(eb.get_Current());null;fb.contents = (fb.contents + 1);null;};return gb.contents;});Q = (function(cb){var db;db = (new b(cb));return {GetEnumerator: (function(eb){return (function(fb,eb){var gb;return fb.factory(gb);})(db, eb);})};});R = (function(cb){return N((function(db){return (function(eb){return (db + 1);});}), 0, cb);});S = (function(cb,db,eb){return K((function(fb){var gb = M(db);var hb = M(eb);var ib;return W((function(jb){if ((gb.MoveNext() && hb.MoveNext())) {var kb;return {Tag: 1.000000, Value: (new X(cb(gb.get_Current())(hb.get_Current()), kb))};}else{return {Tag: 0.000000};};}), ib);}));});T = (function(cb,db){return U((function(eb){return (function(fb){if (cb(fb)) {return {Tag: 1.000000, Value: fb};}else{return {Tag: 0.000000};};});}), db);});U = (function(cb,db){return V(cb, 0, L(db));});V = (function(cb,db,eb){if (eb.MoveNext()) {var fb = cb(db)(eb.get_Current());if ((fb.Tag == 0.000000)) {return V(cb, (db + 1), eb);}else{return fb;};}else{return {Tag: 0.000000};};});W = (function(cb,db){return Q((function(eb){var fb;fb = (new Z(db, cb));return {get_Current: (function(gb){return (function(hb,gb){return hb.current;})(fb, gb);}), MoveNext: (function(gb){return (function(hb,gb){var ib = (function(jb){var kb = H(hb.acc);var lb = hb.unfold(kb);if ((lb.Tag == 1.000000)) {var mb = G(lb).Items[0.000000];var nb = G(lb).Items[1.000000];hb.acc = {Tag: 1.000000, Value: nb};hb.current = mb;return true;}else{hb.acc = {Tag: 0.000000};hb.current = null;return false;};});return (I(hb.acc) && (function(){var jb;return ib(jb);})());})(fb, gb);}), Reset: (function(gb){return (function(hb,gb){hb.acc = {Tag: 1.000000, Value: hb.seed};hb.current = null;})(fb, gb);}), Dispose: (function(gb){return (function(hb,gb){;})(fb, gb);})};}));});X = (function(Item0,Item1){var eb = this;eb.Items = [Item0, Item1];});Y = (function(Item0,Item1){var eb = this;eb.Items = [Item0, Item1];});Z = (function(cb,db){var eb = this;{};eb.seed = cb;eb.unfold = db;eb.acc = {Tag: 1.000000, Value: eb.seed};eb.current = null;});_ = (function(Item1,Item2){var eb = this;eb.Tag = 1.000000;eb._CaseName = "Cons";eb.Item1 = Item1;eb.Item2 = Item2;});ab = (function(){var cb = this;cb.Tag = 0.000000;cb._CaseName = "Nil";});bb = (function(cb){var db = this;{};db.s = cb;db.i = {contents: w(db.s)};});var cb = D(0, 0, E());var db = D(0, 0, E());return (function(eb){return (function(fb){return ((a(eb, fb)) < 0);});})(cb)(db) | |
***** FunScript.Tests.Comparison.obj.ReferenceEquals works with null | |
// Code: | |
var a = null;var b = null;return (a == b) | |
***** FunScript.Tests.Comparison.obj.ReferenceEquals works with objs | |
// Code: | |
var a = {Tag: 1.000000, Value: 1};var b = a;return (a == b) | |
***** FunScript.Tests.Comparison.obj.ReferenceEquals works with objs & null | |
// Code: | |
var a = {Tag: 1.000000, Value: 1};var b = null;return (a == b) | |
***** FunScript.Tests.Comparison.recursive type equality works | |
***** FunScript.Tests.Comparison.recursive type greater than or equal works | |
***** FunScript.Tests.Comparison.recursive type greater than works | |
***** FunScript.Tests.Comparison.recursive type inequality works | |
***** FunScript.Tests.Comparison.recursive type less than or equal works | |
***** FunScript.Tests.Comparison.recursive type less than works | |
***** FunScript.Tests.Comparison.set equality works | |
// Code: | |
var D, C, B, A, z, y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(E,F){return j(v(E), x(E), x(F));});b = (function(E){{};});c = (function(E,F){return (new C(E, F));});d = (function(){return (new D());});e = (function(E){if ((E.Tag == 1.000000)) {var F = E.Item2;var G = E.Item1;return G;}else{throw ("List was empty");return null;};});f = (function(E){if ((E.Tag == 1.000000)) {var F = E.Item2;var G = E.Item1;return F;}else{throw ("List was empty");return null;};});g = (function(E,F,G,H){return (new r(E, F, G, H));});h = (function(E){return (new s(E));});i = (function(E,F,G){if ((G.Tag == 2.000000)) {var H = G.Item;var I = E.Compare(F, H);if ((I < 0)) {return g(F, (new q()), G, 2);}else{if ((I == 0)) {return G;}else{return g(F, G, (new q()), 2);};};}else{if ((G.Tag == 0.000000)) {return h(F);}else{var J = G.Item3;var K = G.Item2;var L = G.Item1;var M = E.Compare(F, L);if ((M < 0)) {return o(i(E, F, K), L, J);}else{if ((M == 0)) {return G;}else{return o(K, L, i(E, F, J));};};};};});j = (function(E,F,G){var H = (new B(F, G));if ((H.Items[0.000000].Tag == 0.000000)) {if ((H.Items[1.000000].Tag == 0.000000)) {return 0;}else{return -1;};}else{if ((H.Items[1.000000].Tag == 0.000000)) {return 1;}else{return k(E, c(F, d()), c(G, d()));};};});k = (function(E,F,G){var H = (new A(F, G));if ((H.Items[0.000000].Tag == 1.000000)) {if ((H.Items[1.000000].Tag == 1.000000)) {if ((e(H.Items[1.000000]).Tag == 2.000000)) {if ((e(H.Items[0.000000]).Tag == 2.000000)) {var I = e(H.Items[0.000000]).Item;var J = e(H.Items[1.000000]).Item;var K = f(H.Items[0.000000]);var L = f(H.Items[1.000000]);var M = E.Compare(I, J);if ((M != 0)) {return M;}else{return k(E, K, L);};}else{if ((e(H.Items[0.000000]).Tag == 1.000000)) {if ((e(H.Items[0.000000]).Item2.Tag == 0.000000)) {var N = e(H.Items[0.000000]).Item2;var O = e(H.Items[0.000000]).Item1;var P = e(H.Items[0.000000]).Item3;var Q = e(H.Items[1.000000]).Item;var R = f(H.Items[0.000000]);var S = f(H.Items[1.000000]);var T = E.Compare(O, Q);if ((T != 0)) {return T;}else{return k(E, c(P, R), c(N, S));};}else{var U = e(H.Items[0.000000]).Item1;var V = e(H.Items[0.000000]).Item2;var W = e(H.Items[0.000000]).Item3;var X = f(H.Items[0.000000]);return k(E, c(V, c(g(U, (new q()), W, 0), X)), G);};}else{var Y = e(H.Items[1.000000]).Item;var Z = f(H.Items[1.000000]);return k(E, F, c((new q()), c(h(Y), Z)));};};}else{if ((e(H.Items[1.000000]).Tag == 1.000000)) {if ((e(H.Items[1.000000]).Item2.Tag == 0.000000)) {if ((e(H.Items[0.000000]).Tag == 2.000000)) {var _ = e(H.Items[0.000000]).Item;var ab = e(H.Items[1.000000]).Item1;var bb = e(H.Items[1.000000]).Item3;var cb = f(H.Items[0.000000]);var db = f(H.Items[1.000000]);var eb = E.Compare(_, ab);if ((eb != 0)) {return eb;}else{return k(E, c((new q()), cb), c(bb, db));};}else{if ((e(H.Items[0.000000]).Tag == 1.000000)) {if ((e(H.Items[0.000000]).Item2.Tag == 0.000000)) {var fb = e(H.Items[0.000000]).Item1;var gb = e(H.Items[0.000000]).Item3;var hb = e(H.Items[1.000000]).Item1;var ib = e(H.Items[1.000000]).Item3;var jb = f(H.Items[0.000000]);var kb = f(H.Items[1.000000]);var lb = E.Compare(fb, hb);if ((lb != 0)) {return lb;}else{return k(E, c(gb, jb), c(ib, kb));};}else{var mb = e(H.Items[0.000000]).Item1;var nb = e(H.Items[0.000000]).Item2;var ob = e(H.Items[0.000000]).Item3;var pb = f(H.Items[0.000000]);return k(E, c(nb, c(g(mb, (new q()), ob, 0), pb)), G);};}else{var qb = e(H.Items[1.000000]).Item1;var rb = e(H.Items[1.000000]).Item2;var sb = e(H.Items[1.000000]).Item3;var tb = f(H.Items[1.000000]);return k(E, F, c(rb, c(g(qb, (new q()), sb, 0), tb)));};};}else{if ((e(H.Items[0.000000]).Tag == 2.000000)) {var ub = e(H.Items[0.000000]).Item;var vb = f(H.Items[0.000000]);return k(E, c((new q()), c(h(ub), vb)), G);}else{if ((e(H.Items[0.000000]).Tag == 1.000000)) {var wb = e(H.Items[0.000000]).Item1;var xb = e(H.Items[0.000000]).Item2;var yb = e(H.Items[0.000000]).Item3;var zb = f(H.Items[0.000000]);return k(E, c(xb, c(g(wb, (new q()), yb, 0), zb)), G);}else{var Ab = e(H.Items[1.000000]).Item1;var Bb = e(H.Items[1.000000]).Item2;var Cb = e(H.Items[1.000000]).Item3;var Db = f(H.Items[1.000000]);return k(E, F, c(Bb, c(g(Ab, (new q()), Cb, 0), Db)));};};};}else{if ((e(H.Items[0.000000]).Tag == 2.000000)) {var Eb = e(H.Items[0.000000]).Item;var Fb = f(H.Items[0.000000]);return k(E, c((new q()), c(h(Eb), Fb)), G);}else{if ((e(H.Items[0.000000]).Tag == 1.000000)) {var Gb = e(H.Items[0.000000]).Item1;var Hb = e(H.Items[0.000000]).Item2;var Ib = e(H.Items[0.000000]).Item3;var Jb = f(H.Items[0.000000]);return k(E, c(Hb, c(g(Gb, (new q()), Ib, 0), Jb)), G);}else{var Kb = f(H.Items[0.000000]);var Lb = f(H.Items[1.000000]);return k(E, Kb, Lb);};};};};}else{return 1;};}else{if ((H.Items[1.000000].Tag == 1.000000)) {return -1;}else{return 0;};};});l = (function(){return 2;});m = (function(E){if ((E.Tag == 2.000000)) {return 1;}else{if ((E.Tag == 1.000000)) {var F = E.Item4;return F;}else{return 0;};};});n = (function(E,F,G){var H = (new B(E, G));if ((H.Items[0.000000].Tag == 0.000000)) {if ((H.Items[1.000000].Tag == 0.000000)) {return h(F);}else{var I = m(E);var J = m(G);var K;if ((I < J)) {K = J;}else{K = I;};var L = K;return g(F, E, G, (L + 1));};}else{var M = m(E);var N = m(G);var O;if ((M < N)) {O = N;}else{O = M;};var P = O;return g(F, E, G, (P + 1));};});o = (function(E,F,G){var H = m(E);var I = m(G);if ((I > (H + p))) {if ((G.Tag == 1.000000)) {var J = G.Item3;var K = G.Item2;var L = G.Item1;if ((m(K) > (H + 1))) {if ((K.Tag == 1.000000)) {var M = K.Item3;var N = K.Item2;var O = K.Item1;return n(n(E, F, N), O, n(M, L, J));}else{throw ("rebalance");return null;};}else{return n(n(E, F, K), L, J);};}else{throw ("rebalance");return null;};}else{if ((H > (I + p))) {if ((E.Tag == 1.000000)) {var P = E.Item3;var Q = E.Item2;var R = E.Item1;if ((m(P) > (I + 1))) {if ((P.Tag == 1.000000)) {var S = P.Item3;var T = P.Item2;var U = P.Item1;return n(n(Q, R, T), U, n(S, F, G));}else{throw ("rebalance");return null;};}else{return n(Q, R, n(P, F, G));};}else{throw ("rebalance");return null;};}else{return n(E, F, G);};};});q = (function(){var E = this;E.Tag = 0.000000;E._CaseName = "SetEmpty";});r = (function(Item1,Item2,Item3,Item4){var I = this;I.Tag = 1.000000;I._CaseName = "SetNode";I.Item1 = Item1;I.Item2 = Item2;I.Item3 = Item3;I.Item4 = Item4;});s = (function(Item){var F = this;F.Tag = 2.000000;F._CaseName = "SetOne";F.Item = Item;});t = (function(E,F){return (new u(v(E), i(v(E), F, x(E))));});u = (function(E,F){var G = this;{};G.comparer_479 = E;G.tree_483 = F;G.serializedData = null;});v = (function(E,F){return E.comparer_479;});w = (function(E){var F = (new b());var G;G = F;return (new u({Compare: (function(H,I){return (function(J,H,I){return (H < I ? -1 : (H == I ? 0 : 1));})(G, H, I);})}, (new q())));});x = (function(E,F){return E.tree_483;});y = (function(E,F){return t(F, E);});z = (function(){return w();});A = (function(Item0,Item1){var G = this;G.Items = [Item0, Item1];});B = (function(Item0,Item1){var G = this;G.Items = [Item0, Item1];});C = (function(Item1,Item2){var G = this;G.Tag = 1.000000;G._CaseName = "Cons";G.Item1 = Item1;G.Item2 = Item2;});D = (function(){var E = this;E.Tag = 0.000000;E._CaseName = "Nil";});p = l();var E = y(0, y(0, z()));var F = y(0, y(0, z()));return (function(G){return (function(H){return ((a(G, H)) == 0);});})(E)(F) | |
***** FunScript.Tests.Comparison.set greater than or equal works | |
// Code: | |
var D, C, B, A, z, y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(E,F){return j(v(E), x(E), x(F));});b = (function(E){{};});c = (function(E,F){return (new C(E, F));});d = (function(){return (new D());});e = (function(E){if ((E.Tag == 1.000000)) {var F = E.Item2;var G = E.Item1;return G;}else{throw ("List was empty");return null;};});f = (function(E){if ((E.Tag == 1.000000)) {var F = E.Item2;var G = E.Item1;return F;}else{throw ("List was empty");return null;};});g = (function(E,F,G,H){return (new r(E, F, G, H));});h = (function(E){return (new s(E));});i = (function(E,F,G){if ((G.Tag == 2.000000)) {var H = G.Item;var I = E.Compare(F, H);if ((I < 0)) {return g(F, (new q()), G, 2);}else{if ((I == 0)) {return G;}else{return g(F, G, (new q()), 2);};};}else{if ((G.Tag == 0.000000)) {return h(F);}else{var J = G.Item3;var K = G.Item2;var L = G.Item1;var M = E.Compare(F, L);if ((M < 0)) {return o(i(E, F, K), L, J);}else{if ((M == 0)) {return G;}else{return o(K, L, i(E, F, J));};};};};});j = (function(E,F,G){var H = (new B(F, G));if ((H.Items[0.000000].Tag == 0.000000)) {if ((H.Items[1.000000].Tag == 0.000000)) {return 0;}else{return -1;};}else{if ((H.Items[1.000000].Tag == 0.000000)) {return 1;}else{return k(E, c(F, d()), c(G, d()));};};});k = (function(E,F,G){var H = (new A(F, G));if ((H.Items[0.000000].Tag == 1.000000)) {if ((H.Items[1.000000].Tag == 1.000000)) {if ((e(H.Items[1.000000]).Tag == 2.000000)) {if ((e(H.Items[0.000000]).Tag == 2.000000)) {var I = e(H.Items[0.000000]).Item;var J = e(H.Items[1.000000]).Item;var K = f(H.Items[0.000000]);var L = f(H.Items[1.000000]);var M = E.Compare(I, J);if ((M != 0)) {return M;}else{return k(E, K, L);};}else{if ((e(H.Items[0.000000]).Tag == 1.000000)) {if ((e(H.Items[0.000000]).Item2.Tag == 0.000000)) {var N = e(H.Items[0.000000]).Item2;var O = e(H.Items[0.000000]).Item1;var P = e(H.Items[0.000000]).Item3;var Q = e(H.Items[1.000000]).Item;var R = f(H.Items[0.000000]);var S = f(H.Items[1.000000]);var T = E.Compare(O, Q);if ((T != 0)) {return T;}else{return k(E, c(P, R), c(N, S));};}else{var U = e(H.Items[0.000000]).Item1;var V = e(H.Items[0.000000]).Item2;var W = e(H.Items[0.000000]).Item3;var X = f(H.Items[0.000000]);return k(E, c(V, c(g(U, (new q()), W, 0), X)), G);};}else{var Y = e(H.Items[1.000000]).Item;var Z = f(H.Items[1.000000]);return k(E, F, c((new q()), c(h(Y), Z)));};};}else{if ((e(H.Items[1.000000]).Tag == 1.000000)) {if ((e(H.Items[1.000000]).Item2.Tag == 0.000000)) {if ((e(H.Items[0.000000]).Tag == 2.000000)) {var _ = e(H.Items[0.000000]).Item;var ab = e(H.Items[1.000000]).Item1;var bb = e(H.Items[1.000000]).Item3;var cb = f(H.Items[0.000000]);var db = f(H.Items[1.000000]);var eb = E.Compare(_, ab);if ((eb != 0)) {return eb;}else{return k(E, c((new q()), cb), c(bb, db));};}else{if ((e(H.Items[0.000000]).Tag == 1.000000)) {if ((e(H.Items[0.000000]).Item2.Tag == 0.000000)) {var fb = e(H.Items[0.000000]).Item1;var gb = e(H.Items[0.000000]).Item3;var hb = e(H.Items[1.000000]).Item1;var ib = e(H.Items[1.000000]).Item3;var jb = f(H.Items[0.000000]);var kb = f(H.Items[1.000000]);var lb = E.Compare(fb, hb);if ((lb != 0)) {return lb;}else{return k(E, c(gb, jb), c(ib, kb));};}else{var mb = e(H.Items[0.000000]).Item1;var nb = e(H.Items[0.000000]).Item2;var ob = e(H.Items[0.000000]).Item3;var pb = f(H.Items[0.000000]);return k(E, c(nb, c(g(mb, (new q()), ob, 0), pb)), G);};}else{var qb = e(H.Items[1.000000]).Item1;var rb = e(H.Items[1.000000]).Item2;var sb = e(H.Items[1.000000]).Item3;var tb = f(H.Items[1.000000]);return k(E, F, c(rb, c(g(qb, (new q()), sb, 0), tb)));};};}else{if ((e(H.Items[0.000000]).Tag == 2.000000)) {var ub = e(H.Items[0.000000]).Item;var vb = f(H.Items[0.000000]);return k(E, c((new q()), c(h(ub), vb)), G);}else{if ((e(H.Items[0.000000]).Tag == 1.000000)) {var wb = e(H.Items[0.000000]).Item1;var xb = e(H.Items[0.000000]).Item2;var yb = e(H.Items[0.000000]).Item3;var zb = f(H.Items[0.000000]);return k(E, c(xb, c(g(wb, (new q()), yb, 0), zb)), G);}else{var Ab = e(H.Items[1.000000]).Item1;var Bb = e(H.Items[1.000000]).Item2;var Cb = e(H.Items[1.000000]).Item3;var Db = f(H.Items[1.000000]);return k(E, F, c(Bb, c(g(Ab, (new q()), Cb, 0), Db)));};};};}else{if ((e(H.Items[0.000000]).Tag == 2.000000)) {var Eb = e(H.Items[0.000000]).Item;var Fb = f(H.Items[0.000000]);return k(E, c((new q()), c(h(Eb), Fb)), G);}else{if ((e(H.Items[0.000000]).Tag == 1.000000)) {var Gb = e(H.Items[0.000000]).Item1;var Hb = e(H.Items[0.000000]).Item2;var Ib = e(H.Items[0.000000]).Item3;var Jb = f(H.Items[0.000000]);return k(E, c(Hb, c(g(Gb, (new q()), Ib, 0), Jb)), G);}else{var Kb = f(H.Items[0.000000]);var Lb = f(H.Items[1.000000]);return k(E, Kb, Lb);};};};};}else{return 1;};}else{if ((H.Items[1.000000].Tag == 1.000000)) {return -1;}else{return 0;};};});l = (function(){return 2;});m = (function(E){if ((E.Tag == 2.000000)) {return 1;}else{if ((E.Tag == 1.000000)) {var F = E.Item4;return F;}else{return 0;};};});n = (function(E,F,G){var H = (new B(E, G));if ((H.Items[0.000000].Tag == 0.000000)) {if ((H.Items[1.000000].Tag == 0.000000)) {return h(F);}else{var I = m(E);var J = m(G);var K;if ((I < J)) {K = J;}else{K = I;};var L = K;return g(F, E, G, (L + 1));};}else{var M = m(E);var N = m(G);var O;if ((M < N)) {O = N;}else{O = M;};var P = O;return g(F, E, G, (P + 1));};});o = (function(E,F,G){var H = m(E);var I = m(G);if ((I > (H + p))) {if ((G.Tag == 1.000000)) {var J = G.Item3;var K = G.Item2;var L = G.Item1;if ((m(K) > (H + 1))) {if ((K.Tag == 1.000000)) {var M = K.Item3;var N = K.Item2;var O = K.Item1;return n(n(E, F, N), O, n(M, L, J));}else{throw ("rebalance");return null;};}else{return n(n(E, F, K), L, J);};}else{throw ("rebalance");return null;};}else{if ((H > (I + p))) {if ((E.Tag == 1.000000)) {var P = E.Item3;var Q = E.Item2;var R = E.Item1;if ((m(P) > (I + 1))) {if ((P.Tag == 1.000000)) {var S = P.Item3;var T = P.Item2;var U = P.Item1;return n(n(Q, R, T), U, n(S, F, G));}else{throw ("rebalance");return null;};}else{return n(Q, R, n(P, F, G));};}else{throw ("rebalance");return null;};}else{return n(E, F, G);};};});q = (function(){var E = this;E.Tag = 0.000000;E._CaseName = "SetEmpty";});r = (function(Item1,Item2,Item3,Item4){var I = this;I.Tag = 1.000000;I._CaseName = "SetNode";I.Item1 = Item1;I.Item2 = Item2;I.Item3 = Item3;I.Item4 = Item4;});s = (function(Item){var F = this;F.Tag = 2.000000;F._CaseName = "SetOne";F.Item = Item;});t = (function(E,F){return (new u(v(E), i(v(E), F, x(E))));});u = (function(E,F){var G = this;{};G.comparer_479 = E;G.tree_483 = F;G.serializedData = null;});v = (function(E,F){return E.comparer_479;});w = (function(E){var F = (new b());var G;G = F;return (new u({Compare: (function(H,I){return (function(J,H,I){return (H < I ? -1 : (H == I ? 0 : 1));})(G, H, I);})}, (new q())));});x = (function(E,F){return E.tree_483;});y = (function(E,F){return t(F, E);});z = (function(){return w();});A = (function(Item0,Item1){var G = this;G.Items = [Item0, Item1];});B = (function(Item0,Item1){var G = this;G.Items = [Item0, Item1];});C = (function(Item1,Item2){var G = this;G.Tag = 1.000000;G._CaseName = "Cons";G.Item1 = Item1;G.Item2 = Item2;});D = (function(){var E = this;E.Tag = 0.000000;E._CaseName = "Nil";});p = l();var E = y(0, y(0, z()));var F = y(0, y(0, z()));return (function(G){return (function(H){return ((a(G, H)) >= 0);});})(E)(F) | |
***** FunScript.Tests.Comparison.set greater than works | |
// Code: | |
var D, C, B, A, z, y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(E,F){return j(v(E), x(E), x(F));});b = (function(E){{};});c = (function(E,F){return (new C(E, F));});d = (function(){return (new D());});e = (function(E){if ((E.Tag == 1.000000)) {var F = E.Item2;var G = E.Item1;return G;}else{throw ("List was empty");return null;};});f = (function(E){if ((E.Tag == 1.000000)) {var F = E.Item2;var G = E.Item1;return F;}else{throw ("List was empty");return null;};});g = (function(E,F,G,H){return (new r(E, F, G, H));});h = (function(E){return (new s(E));});i = (function(E,F,G){if ((G.Tag == 2.000000)) {var H = G.Item;var I = E.Compare(F, H);if ((I < 0)) {return g(F, (new q()), G, 2);}else{if ((I == 0)) {return G;}else{return g(F, G, (new q()), 2);};};}else{if ((G.Tag == 0.000000)) {return h(F);}else{var J = G.Item3;var K = G.Item2;var L = G.Item1;var M = E.Compare(F, L);if ((M < 0)) {return o(i(E, F, K), L, J);}else{if ((M == 0)) {return G;}else{return o(K, L, i(E, F, J));};};};};});j = (function(E,F,G){var H = (new B(F, G));if ((H.Items[0.000000].Tag == 0.000000)) {if ((H.Items[1.000000].Tag == 0.000000)) {return 0;}else{return -1;};}else{if ((H.Items[1.000000].Tag == 0.000000)) {return 1;}else{return k(E, c(F, d()), c(G, d()));};};});k = (function(E,F,G){var H = (new A(F, G));if ((H.Items[0.000000].Tag == 1.000000)) {if ((H.Items[1.000000].Tag == 1.000000)) {if ((e(H.Items[1.000000]).Tag == 2.000000)) {if ((e(H.Items[0.000000]).Tag == 2.000000)) {var I = e(H.Items[0.000000]).Item;var J = e(H.Items[1.000000]).Item;var K = f(H.Items[0.000000]);var L = f(H.Items[1.000000]);var M = E.Compare(I, J);if ((M != 0)) {return M;}else{return k(E, K, L);};}else{if ((e(H.Items[0.000000]).Tag == 1.000000)) {if ((e(H.Items[0.000000]).Item2.Tag == 0.000000)) {var N = e(H.Items[0.000000]).Item2;var O = e(H.Items[0.000000]).Item1;var P = e(H.Items[0.000000]).Item3;var Q = e(H.Items[1.000000]).Item;var R = f(H.Items[0.000000]);var S = f(H.Items[1.000000]);var T = E.Compare(O, Q);if ((T != 0)) {return T;}else{return k(E, c(P, R), c(N, S));};}else{var U = e(H.Items[0.000000]).Item1;var V = e(H.Items[0.000000]).Item2;var W = e(H.Items[0.000000]).Item3;var X = f(H.Items[0.000000]);return k(E, c(V, c(g(U, (new q()), W, 0), X)), G);};}else{var Y = e(H.Items[1.000000]).Item;var Z = f(H.Items[1.000000]);return k(E, F, c((new q()), c(h(Y), Z)));};};}else{if ((e(H.Items[1.000000]).Tag == 1.000000)) {if ((e(H.Items[1.000000]).Item2.Tag == 0.000000)) {if ((e(H.Items[0.000000]).Tag == 2.000000)) {var _ = e(H.Items[0.000000]).Item;var ab = e(H.Items[1.000000]).Item1;var bb = e(H.Items[1.000000]).Item3;var cb = f(H.Items[0.000000]);var db = f(H.Items[1.000000]);var eb = E.Compare(_, ab);if ((eb != 0)) {return eb;}else{return k(E, c((new q()), cb), c(bb, db));};}else{if ((e(H.Items[0.000000]).Tag == 1.000000)) {if ((e(H.Items[0.000000]).Item2.Tag == 0.000000)) {var fb = e(H.Items[0.000000]).Item1;var gb = e(H.Items[0.000000]).Item3;var hb = e(H.Items[1.000000]).Item1;var ib = e(H.Items[1.000000]).Item3;var jb = f(H.Items[0.000000]);var kb = f(H.Items[1.000000]);var lb = E.Compare(fb, hb);if ((lb != 0)) {return lb;}else{return k(E, c(gb, jb), c(ib, kb));};}else{var mb = e(H.Items[0.000000]).Item1;var nb = e(H.Items[0.000000]).Item2;var ob = e(H.Items[0.000000]).Item3;var pb = f(H.Items[0.000000]);return k(E, c(nb, c(g(mb, (new q()), ob, 0), pb)), G);};}else{var qb = e(H.Items[1.000000]).Item1;var rb = e(H.Items[1.000000]).Item2;var sb = e(H.Items[1.000000]).Item3;var tb = f(H.Items[1.000000]);return k(E, F, c(rb, c(g(qb, (new q()), sb, 0), tb)));};};}else{if ((e(H.Items[0.000000]).Tag == 2.000000)) {var ub = e(H.Items[0.000000]).Item;var vb = f(H.Items[0.000000]);return k(E, c((new q()), c(h(ub), vb)), G);}else{if ((e(H.Items[0.000000]).Tag == 1.000000)) {var wb = e(H.Items[0.000000]).Item1;var xb = e(H.Items[0.000000]).Item2;var yb = e(H.Items[0.000000]).Item3;var zb = f(H.Items[0.000000]);return k(E, c(xb, c(g(wb, (new q()), yb, 0), zb)), G);}else{var Ab = e(H.Items[1.000000]).Item1;var Bb = e(H.Items[1.000000]).Item2;var Cb = e(H.Items[1.000000]).Item3;var Db = f(H.Items[1.000000]);return k(E, F, c(Bb, c(g(Ab, (new q()), Cb, 0), Db)));};};};}else{if ((e(H.Items[0.000000]).Tag == 2.000000)) {var Eb = e(H.Items[0.000000]).Item;var Fb = f(H.Items[0.000000]);return k(E, c((new q()), c(h(Eb), Fb)), G);}else{if ((e(H.Items[0.000000]).Tag == 1.000000)) {var Gb = e(H.Items[0.000000]).Item1;var Hb = e(H.Items[0.000000]).Item2;var Ib = e(H.Items[0.000000]).Item3;var Jb = f(H.Items[0.000000]);return k(E, c(Hb, c(g(Gb, (new q()), Ib, 0), Jb)), G);}else{var Kb = f(H.Items[0.000000]);var Lb = f(H.Items[1.000000]);return k(E, Kb, Lb);};};};};}else{return 1;};}else{if ((H.Items[1.000000].Tag == 1.000000)) {return -1;}else{return 0;};};});l = (function(){return 2;});m = (function(E){if ((E.Tag == 2.000000)) {return 1;}else{if ((E.Tag == 1.000000)) {var F = E.Item4;return F;}else{return 0;};};});n = (function(E,F,G){var H = (new B(E, G));if ((H.Items[0.000000].Tag == 0.000000)) {if ((H.Items[1.000000].Tag == 0.000000)) {return h(F);}else{var I = m(E);var J = m(G);var K;if ((I < J)) {K = J;}else{K = I;};var L = K;return g(F, E, G, (L + 1));};}else{var M = m(E);var N = m(G);var O;if ((M < N)) {O = N;}else{O = M;};var P = O;return g(F, E, G, (P + 1));};});o = (function(E,F,G){var H = m(E);var I = m(G);if ((I > (H + p))) {if ((G.Tag == 1.000000)) {var J = G.Item3;var K = G.Item2;var L = G.Item1;if ((m(K) > (H + 1))) {if ((K.Tag == 1.000000)) {var M = K.Item3;var N = K.Item2;var O = K.Item1;return n(n(E, F, N), O, n(M, L, J));}else{throw ("rebalance");return null;};}else{return n(n(E, F, K), L, J);};}else{throw ("rebalance");return null;};}else{if ((H > (I + p))) {if ((E.Tag == 1.000000)) {var P = E.Item3;var Q = E.Item2;var R = E.Item1;if ((m(P) > (I + 1))) {if ((P.Tag == 1.000000)) {var S = P.Item3;var T = P.Item2;var U = P.Item1;return n(n(Q, R, T), U, n(S, F, G));}else{throw ("rebalance");return null;};}else{return n(Q, R, n(P, F, G));};}else{throw ("rebalance");return null;};}else{return n(E, F, G);};};});q = (function(){var E = this;E.Tag = 0.000000;E._CaseName = "SetEmpty";});r = (function(Item1,Item2,Item3,Item4){var I = this;I.Tag = 1.000000;I._CaseName = "SetNode";I.Item1 = Item1;I.Item2 = Item2;I.Item3 = Item3;I.Item4 = Item4;});s = (function(Item){var F = this;F.Tag = 2.000000;F._CaseName = "SetOne";F.Item = Item;});t = (function(E,F){return (new u(v(E), i(v(E), F, x(E))));});u = (function(E,F){var G = this;{};G.comparer_479 = E;G.tree_483 = F;G.serializedData = null;});v = (function(E,F){return E.comparer_479;});w = (function(E){var F = (new b());var G;G = F;return (new u({Compare: (function(H,I){return (function(J,H,I){return (H < I ? -1 : (H == I ? 0 : 1));})(G, H, I);})}, (new q())));});x = (function(E,F){return E.tree_483;});y = (function(E,F){return t(F, E);});z = (function(){return w();});A = (function(Item0,Item1){var G = this;G.Items = [Item0, Item1];});B = (function(Item0,Item1){var G = this;G.Items = [Item0, Item1];});C = (function(Item1,Item2){var G = this;G.Tag = 1.000000;G._CaseName = "Cons";G.Item1 = Item1;G.Item2 = Item2;});D = (function(){var E = this;E.Tag = 0.000000;E._CaseName = "Nil";});p = l();var E = y(0, y(0, z()));var F = y(0, y(0, z()));return (function(G){return (function(H){return ((a(G, H)) > 0);});})(E)(F) | |
***** FunScript.Tests.Comparison.set inequality works | |
// Code: | |
var D, C, B, A, z, y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(E,F){return j(v(E), x(E), x(F));});b = (function(E){{};});c = (function(E,F){return (new C(E, F));});d = (function(){return (new D());});e = (function(E){if ((E.Tag == 1.000000)) {var F = E.Item2;var G = E.Item1;return G;}else{throw ("List was empty");return null;};});f = (function(E){if ((E.Tag == 1.000000)) {var F = E.Item2;var G = E.Item1;return F;}else{throw ("List was empty");return null;};});g = (function(E,F,G,H){return (new r(E, F, G, H));});h = (function(E){return (new s(E));});i = (function(E,F,G){if ((G.Tag == 2.000000)) {var H = G.Item;var I = E.Compare(F, H);if ((I < 0)) {return g(F, (new q()), G, 2);}else{if ((I == 0)) {return G;}else{return g(F, G, (new q()), 2);};};}else{if ((G.Tag == 0.000000)) {return h(F);}else{var J = G.Item3;var K = G.Item2;var L = G.Item1;var M = E.Compare(F, L);if ((M < 0)) {return o(i(E, F, K), L, J);}else{if ((M == 0)) {return G;}else{return o(K, L, i(E, F, J));};};};};});j = (function(E,F,G){var H = (new B(F, G));if ((H.Items[0.000000].Tag == 0.000000)) {if ((H.Items[1.000000].Tag == 0.000000)) {return 0;}else{return -1;};}else{if ((H.Items[1.000000].Tag == 0.000000)) {return 1;}else{return k(E, c(F, d()), c(G, d()));};};});k = (function(E,F,G){var H = (new A(F, G));if ((H.Items[0.000000].Tag == 1.000000)) {if ((H.Items[1.000000].Tag == 1.000000)) {if ((e(H.Items[1.000000]).Tag == 2.000000)) {if ((e(H.Items[0.000000]).Tag == 2.000000)) {var I = e(H.Items[0.000000]).Item;var J = e(H.Items[1.000000]).Item;var K = f(H.Items[0.000000]);var L = f(H.Items[1.000000]);var M = E.Compare(I, J);if ((M != 0)) {return M;}else{return k(E, K, L);};}else{if ((e(H.Items[0.000000]).Tag == 1.000000)) {if ((e(H.Items[0.000000]).Item2.Tag == 0.000000)) {var N = e(H.Items[0.000000]).Item2;var O = e(H.Items[0.000000]).Item1;var P = e(H.Items[0.000000]).Item3;var Q = e(H.Items[1.000000]).Item;var R = f(H.Items[0.000000]);var S = f(H.Items[1.000000]);var T = E.Compare(O, Q);if ((T != 0)) {return T;}else{return k(E, c(P, R), c(N, S));};}else{var U = e(H.Items[0.000000]).Item1;var V = e(H.Items[0.000000]).Item2;var W = e(H.Items[0.000000]).Item3;var X = f(H.Items[0.000000]);return k(E, c(V, c(g(U, (new q()), W, 0), X)), G);};}else{var Y = e(H.Items[1.000000]).Item;var Z = f(H.Items[1.000000]);return k(E, F, c((new q()), c(h(Y), Z)));};};}else{if ((e(H.Items[1.000000]).Tag == 1.000000)) {if ((e(H.Items[1.000000]).Item2.Tag == 0.000000)) {if ((e(H.Items[0.000000]).Tag == 2.000000)) {var _ = e(H.Items[0.000000]).Item;var ab = e(H.Items[1.000000]).Item1;var bb = e(H.Items[1.000000]).Item3;var cb = f(H.Items[0.000000]);var db = f(H.Items[1.000000]);var eb = E.Compare(_, ab);if ((eb != 0)) {return eb;}else{return k(E, c((new q()), cb), c(bb, db));};}else{if ((e(H.Items[0.000000]).Tag == 1.000000)) {if ((e(H.Items[0.000000]).Item2.Tag == 0.000000)) {var fb = e(H.Items[0.000000]).Item1;var gb = e(H.Items[0.000000]).Item3;var hb = e(H.Items[1.000000]).Item1;var ib = e(H.Items[1.000000]).Item3;var jb = f(H.Items[0.000000]);var kb = f(H.Items[1.000000]);var lb = E.Compare(fb, hb);if ((lb != 0)) {return lb;}else{return k(E, c(gb, jb), c(ib, kb));};}else{var mb = e(H.Items[0.000000]).Item1;var nb = e(H.Items[0.000000]).Item2;var ob = e(H.Items[0.000000]).Item3;var pb = f(H.Items[0.000000]);return k(E, c(nb, c(g(mb, (new q()), ob, 0), pb)), G);};}else{var qb = e(H.Items[1.000000]).Item1;var rb = e(H.Items[1.000000]).Item2;var sb = e(H.Items[1.000000]).Item3;var tb = f(H.Items[1.000000]);return k(E, F, c(rb, c(g(qb, (new q()), sb, 0), tb)));};};}else{if ((e(H.Items[0.000000]).Tag == 2.000000)) {var ub = e(H.Items[0.000000]).Item;var vb = f(H.Items[0.000000]);return k(E, c((new q()), c(h(ub), vb)), G);}else{if ((e(H.Items[0.000000]).Tag == 1.000000)) {var wb = e(H.Items[0.000000]).Item1;var xb = e(H.Items[0.000000]).Item2;var yb = e(H.Items[0.000000]).Item3;var zb = f(H.Items[0.000000]);return k(E, c(xb, c(g(wb, (new q()), yb, 0), zb)), G);}else{var Ab = e(H.Items[1.000000]).Item1;var Bb = e(H.Items[1.000000]).Item2;var Cb = e(H.Items[1.000000]).Item3;var Db = f(H.Items[1.000000]);return k(E, F, c(Bb, c(g(Ab, (new q()), Cb, 0), Db)));};};};}else{if ((e(H.Items[0.000000]).Tag == 2.000000)) {var Eb = e(H.Items[0.000000]).Item;var Fb = f(H.Items[0.000000]);return k(E, c((new q()), c(h(Eb), Fb)), G);}else{if ((e(H.Items[0.000000]).Tag == 1.000000)) {var Gb = e(H.Items[0.000000]).Item1;var Hb = e(H.Items[0.000000]).Item2;var Ib = e(H.Items[0.000000]).Item3;var Jb = f(H.Items[0.000000]);return k(E, c(Hb, c(g(Gb, (new q()), Ib, 0), Jb)), G);}else{var Kb = f(H.Items[0.000000]);var Lb = f(H.Items[1.000000]);return k(E, Kb, Lb);};};};};}else{return 1;};}else{if ((H.Items[1.000000].Tag == 1.000000)) {return -1;}else{return 0;};};});l = (function(){return 2;});m = (function(E){if ((E.Tag == 2.000000)) {return 1;}else{if ((E.Tag == 1.000000)) {var F = E.Item4;return F;}else{return 0;};};});n = (function(E,F,G){var H = (new B(E, G));if ((H.Items[0.000000].Tag == 0.000000)) {if ((H.Items[1.000000].Tag == 0.000000)) {return h(F);}else{var I = m(E);var J = m(G);var K;if ((I < J)) {K = J;}else{K = I;};var L = K;return g(F, E, G, (L + 1));};}else{var M = m(E);var N = m(G);var O;if ((M < N)) {O = N;}else{O = M;};var P = O;return g(F, E, G, (P + 1));};});o = (function(E,F,G){var H = m(E);var I = m(G);if ((I > (H + p))) {if ((G.Tag == 1.000000)) {var J = G.Item3;var K = G.Item2;var L = G.Item1;if ((m(K) > (H + 1))) {if ((K.Tag == 1.000000)) {var M = K.Item3;var N = K.Item2;var O = K.Item1;return n(n(E, F, N), O, n(M, L, J));}else{throw ("rebalance");return null;};}else{return n(n(E, F, K), L, J);};}else{throw ("rebalance");return null;};}else{if ((H > (I + p))) {if ((E.Tag == 1.000000)) {var P = E.Item3;var Q = E.Item2;var R = E.Item1;if ((m(P) > (I + 1))) {if ((P.Tag == 1.000000)) {var S = P.Item3;var T = P.Item2;var U = P.Item1;return n(n(Q, R, T), U, n(S, F, G));}else{throw ("rebalance");return null;};}else{return n(Q, R, n(P, F, G));};}else{throw ("rebalance");return null;};}else{return n(E, F, G);};};});q = (function(){var E = this;E.Tag = 0.000000;E._CaseName = "SetEmpty";});r = (function(Item1,Item2,Item3,Item4){var I = this;I.Tag = 1.000000;I._CaseName = "SetNode";I.Item1 = Item1;I.Item2 = Item2;I.Item3 = Item3;I.Item4 = Item4;});s = (function(Item){var F = this;F.Tag = 2.000000;F._CaseName = "SetOne";F.Item = Item;});t = (function(E,F){return (new u(v(E), i(v(E), F, x(E))));});u = (function(E,F){var G = this;{};G.comparer_479 = E;G.tree_483 = F;G.serializedData = null;});v = (function(E,F){return E.comparer_479;});w = (function(E){var F = (new b());var G;G = F;return (new u({Compare: (function(H,I){return (function(J,H,I){return (H < I ? -1 : (H == I ? 0 : 1));})(G, H, I);})}, (new q())));});x = (function(E,F){return E.tree_483;});y = (function(E,F){return t(F, E);});z = (function(){return w();});A = (function(Item0,Item1){var G = this;G.Items = [Item0, Item1];});B = (function(Item0,Item1){var G = this;G.Items = [Item0, Item1];});C = (function(Item1,Item2){var G = this;G.Tag = 1.000000;G._CaseName = "Cons";G.Item1 = Item1;G.Item2 = Item2;});D = (function(){var E = this;E.Tag = 0.000000;E._CaseName = "Nil";});p = l();var E = y(0, y(0, z()));var F = y(0, y(0, z()));return (function(G){return (function(H){return ((a(G, H)) != 0);});})(E)(F) | |
***** FunScript.Tests.Comparison.set less than or equal works | |
// Code: | |
var D, C, B, A, z, y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(E,F){return j(v(E), x(E), x(F));});b = (function(E){{};});c = (function(E,F){return (new C(E, F));});d = (function(){return (new D());});e = (function(E){if ((E.Tag == 1.000000)) {var F = E.Item2;var G = E.Item1;return G;}else{throw ("List was empty");return null;};});f = (function(E){if ((E.Tag == 1.000000)) {var F = E.Item2;var G = E.Item1;return F;}else{throw ("List was empty");return null;};});g = (function(E,F,G,H){return (new r(E, F, G, H));});h = (function(E){return (new s(E));});i = (function(E,F,G){if ((G.Tag == 2.000000)) {var H = G.Item;var I = E.Compare(F, H);if ((I < 0)) {return g(F, (new q()), G, 2);}else{if ((I == 0)) {return G;}else{return g(F, G, (new q()), 2);};};}else{if ((G.Tag == 0.000000)) {return h(F);}else{var J = G.Item3;var K = G.Item2;var L = G.Item1;var M = E.Compare(F, L);if ((M < 0)) {return o(i(E, F, K), L, J);}else{if ((M == 0)) {return G;}else{return o(K, L, i(E, F, J));};};};};});j = (function(E,F,G){var H = (new B(F, G));if ((H.Items[0.000000].Tag == 0.000000)) {if ((H.Items[1.000000].Tag == 0.000000)) {return 0;}else{return -1;};}else{if ((H.Items[1.000000].Tag == 0.000000)) {return 1;}else{return k(E, c(F, d()), c(G, d()));};};});k = (function(E,F,G){var H = (new A(F, G));if ((H.Items[0.000000].Tag == 1.000000)) {if ((H.Items[1.000000].Tag == 1.000000)) {if ((e(H.Items[1.000000]).Tag == 2.000000)) {if ((e(H.Items[0.000000]).Tag == 2.000000)) {var I = e(H.Items[0.000000]).Item;var J = e(H.Items[1.000000]).Item;var K = f(H.Items[0.000000]);var L = f(H.Items[1.000000]);var M = E.Compare(I, J);if ((M != 0)) {return M;}else{return k(E, K, L);};}else{if ((e(H.Items[0.000000]).Tag == 1.000000)) {if ((e(H.Items[0.000000]).Item2.Tag == 0.000000)) {var N = e(H.Items[0.000000]).Item2;var O = e(H.Items[0.000000]).Item1;var P = e(H.Items[0.000000]).Item3;var Q = e(H.Items[1.000000]).Item;var R = f(H.Items[0.000000]);var S = f(H.Items[1.000000]);var T = E.Compare(O, Q);if ((T != 0)) {return T;}else{return k(E, c(P, R), c(N, S));};}else{var U = e(H.Items[0.000000]).Item1;var V = e(H.Items[0.000000]).Item2;var W = e(H.Items[0.000000]).Item3;var X = f(H.Items[0.000000]);return k(E, c(V, c(g(U, (new q()), W, 0), X)), G);};}else{var Y = e(H.Items[1.000000]).Item;var Z = f(H.Items[1.000000]);return k(E, F, c((new q()), c(h(Y), Z)));};};}else{if ((e(H.Items[1.000000]).Tag == 1.000000)) {if ((e(H.Items[1.000000]).Item2.Tag == 0.000000)) {if ((e(H.Items[0.000000]).Tag == 2.000000)) {var _ = e(H.Items[0.000000]).Item;var ab = e(H.Items[1.000000]).Item1;var bb = e(H.Items[1.000000]).Item3;var cb = f(H.Items[0.000000]);var db = f(H.Items[1.000000]);var eb = E.Compare(_, ab);if ((eb != 0)) {return eb;}else{return k(E, c((new q()), cb), c(bb, db));};}else{if ((e(H.Items[0.000000]).Tag == 1.000000)) {if ((e(H.Items[0.000000]).Item2.Tag == 0.000000)) {var fb = e(H.Items[0.000000]).Item1;var gb = e(H.Items[0.000000]).Item3;var hb = e(H.Items[1.000000]).Item1;var ib = e(H.Items[1.000000]).Item3;var jb = f(H.Items[0.000000]);var kb = f(H.Items[1.000000]);var lb = E.Compare(fb, hb);if ((lb != 0)) {return lb;}else{return k(E, c(gb, jb), c(ib, kb));};}else{var mb = e(H.Items[0.000000]).Item1;var nb = e(H.Items[0.000000]).Item2;var ob = e(H.Items[0.000000]).Item3;var pb = f(H.Items[0.000000]);return k(E, c(nb, c(g(mb, (new q()), ob, 0), pb)), G);};}else{var qb = e(H.Items[1.000000]).Item1;var rb = e(H.Items[1.000000]).Item2;var sb = e(H.Items[1.000000]).Item3;var tb = f(H.Items[1.000000]);return k(E, F, c(rb, c(g(qb, (new q()), sb, 0), tb)));};};}else{if ((e(H.Items[0.000000]).Tag == 2.000000)) {var ub = e(H.Items[0.000000]).Item;var vb = f(H.Items[0.000000]);return k(E, c((new q()), c(h(ub), vb)), G);}else{if ((e(H.Items[0.000000]).Tag == 1.000000)) {var wb = e(H.Items[0.000000]).Item1;var xb = e(H.Items[0.000000]).Item2;var yb = e(H.Items[0.000000]).Item3;var zb = f(H.Items[0.000000]);return k(E, c(xb, c(g(wb, (new q()), yb, 0), zb)), G);}else{var Ab = e(H.Items[1.000000]).Item1;var Bb = e(H.Items[1.000000]).Item2;var Cb = e(H.Items[1.000000]).Item3;var Db = f(H.Items[1.000000]);return k(E, F, c(Bb, c(g(Ab, (new q()), Cb, 0), Db)));};};};}else{if ((e(H.Items[0.000000]).Tag == 2.000000)) {var Eb = e(H.Items[0.000000]).Item;var Fb = f(H.Items[0.000000]);return k(E, c((new q()), c(h(Eb), Fb)), G);}else{if ((e(H.Items[0.000000]).Tag == 1.000000)) {var Gb = e(H.Items[0.000000]).Item1;var Hb = e(H.Items[0.000000]).Item2;var Ib = e(H.Items[0.000000]).Item3;var Jb = f(H.Items[0.000000]);return k(E, c(Hb, c(g(Gb, (new q()), Ib, 0), Jb)), G);}else{var Kb = f(H.Items[0.000000]);var Lb = f(H.Items[1.000000]);return k(E, Kb, Lb);};};};};}else{return 1;};}else{if ((H.Items[1.000000].Tag == 1.000000)) {return -1;}else{return 0;};};});l = (function(){return 2;});m = (function(E){if ((E.Tag == 2.000000)) {return 1;}else{if ((E.Tag == 1.000000)) {var F = E.Item4;return F;}else{return 0;};};});n = (function(E,F,G){var H = (new B(E, G));if ((H.Items[0.000000].Tag == 0.000000)) {if ((H.Items[1.000000].Tag == 0.000000)) {return h(F);}else{var I = m(E);var J = m(G);var K;if ((I < J)) {K = J;}else{K = I;};var L = K;return g(F, E, G, (L + 1));};}else{var M = m(E);var N = m(G);var O;if ((M < N)) {O = N;}else{O = M;};var P = O;return g(F, E, G, (P + 1));};});o = (function(E,F,G){var H = m(E);var I = m(G);if ((I > (H + p))) {if ((G.Tag == 1.000000)) {var J = G.Item3;var K = G.Item2;var L = G.Item1;if ((m(K) > (H + 1))) {if ((K.Tag == 1.000000)) {var M = K.Item3;var N = K.Item2;var O = K.Item1;return n(n(E, F, N), O, n(M, L, J));}else{throw ("rebalance");return null;};}else{return n(n(E, F, K), L, J);};}else{throw ("rebalance");return null;};}else{if ((H > (I + p))) {if ((E.Tag == 1.000000)) {var P = E.Item3;var Q = E.Item2;var R = E.Item1;if ((m(P) > (I + 1))) {if ((P.Tag == 1.000000)) {var S = P.Item3;var T = P.Item2;var U = P.Item1;return n(n(Q, R, T), U, n(S, F, G));}else{throw ("rebalance");return null;};}else{return n(Q, R, n(P, F, G));};}else{throw ("rebalance");return null;};}else{return n(E, F, G);};};});q = (function(){var E = this;E.Tag = 0.000000;E._CaseName = "SetEmpty";});r = (function(Item1,Item2,Item3,Item4){var I = this;I.Tag = 1.000000;I._CaseName = "SetNode";I.Item1 = Item1;I.Item2 = Item2;I.Item3 = Item3;I.Item4 = Item4;});s = (function(Item){var F = this;F.Tag = 2.000000;F._CaseName = "SetOne";F.Item = Item;});t = (function(E,F){return (new u(v(E), i(v(E), F, x(E))));});u = (function(E,F){var G = this;{};G.comparer_479 = E;G.tree_483 = F;G.serializedData = null;});v = (function(E,F){return E.comparer_479;});w = (function(E){var F = (new b());var G;G = F;return (new u({Compare: (function(H,I){return (function(J,H,I){return (H < I ? -1 : (H == I ? 0 : 1));})(G, H, I);})}, (new q())));});x = (function(E,F){return E.tree_483;});y = (function(E,F){return t(F, E);});z = (function(){return w();});A = (function(Item0,Item1){var G = this;G.Items = [Item0, Item1];});B = (function(Item0,Item1){var G = this;G.Items = [Item0, Item1];});C = (function(Item1,Item2){var G = this;G.Tag = 1.000000;G._CaseName = "Cons";G.Item1 = Item1;G.Item2 = Item2;});D = (function(){var E = this;E.Tag = 0.000000;E._CaseName = "Nil";});p = l();var E = y(0, y(0, z()));var F = y(0, y(0, z()));return (function(G){return (function(H){return ((a(G, H)) <= 0);});})(E)(F) | |
***** FunScript.Tests.Comparison.set less than works | |
// Code: | |
var D, C, B, A, z, y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(E,F){return j(v(E), x(E), x(F));});b = (function(E){{};});c = (function(E,F){return (new C(E, F));});d = (function(){return (new D());});e = (function(E){if ((E.Tag == 1.000000)) {var F = E.Item2;var G = E.Item1;return G;}else{throw ("List was empty");return null;};});f = (function(E){if ((E.Tag == 1.000000)) {var F = E.Item2;var G = E.Item1;return F;}else{throw ("List was empty");return null;};});g = (function(E,F,G,H){return (new r(E, F, G, H));});h = (function(E){return (new s(E));});i = (function(E,F,G){if ((G.Tag == 2.000000)) {var H = G.Item;var I = E.Compare(F, H);if ((I < 0)) {return g(F, (new q()), G, 2);}else{if ((I == 0)) {return G;}else{return g(F, G, (new q()), 2);};};}else{if ((G.Tag == 0.000000)) {return h(F);}else{var J = G.Item3;var K = G.Item2;var L = G.Item1;var M = E.Compare(F, L);if ((M < 0)) {return o(i(E, F, K), L, J);}else{if ((M == 0)) {return G;}else{return o(K, L, i(E, F, J));};};};};});j = (function(E,F,G){var H = (new B(F, G));if ((H.Items[0.000000].Tag == 0.000000)) {if ((H.Items[1.000000].Tag == 0.000000)) {return 0;}else{return -1;};}else{if ((H.Items[1.000000].Tag == 0.000000)) {return 1;}else{return k(E, c(F, d()), c(G, d()));};};});k = (function(E,F,G){var H = (new A(F, G));if ((H.Items[0.000000].Tag == 1.000000)) {if ((H.Items[1.000000].Tag == 1.000000)) {if ((e(H.Items[1.000000]).Tag == 2.000000)) {if ((e(H.Items[0.000000]).Tag == 2.000000)) {var I = e(H.Items[0.000000]).Item;var J = e(H.Items[1.000000]).Item;var K = f(H.Items[0.000000]);var L = f(H.Items[1.000000]);var M = E.Compare(I, J);if ((M != 0)) {return M;}else{return k(E, K, L);};}else{if ((e(H.Items[0.000000]).Tag == 1.000000)) {if ((e(H.Items[0.000000]).Item2.Tag == 0.000000)) {var N = e(H.Items[0.000000]).Item2;var O = e(H.Items[0.000000]).Item1;var P = e(H.Items[0.000000]).Item3;var Q = e(H.Items[1.000000]).Item;var R = f(H.Items[0.000000]);var S = f(H.Items[1.000000]);var T = E.Compare(O, Q);if ((T != 0)) {return T;}else{return k(E, c(P, R), c(N, S));};}else{var U = e(H.Items[0.000000]).Item1;var V = e(H.Items[0.000000]).Item2;var W = e(H.Items[0.000000]).Item3;var X = f(H.Items[0.000000]);return k(E, c(V, c(g(U, (new q()), W, 0), X)), G);};}else{var Y = e(H.Items[1.000000]).Item;var Z = f(H.Items[1.000000]);return k(E, F, c((new q()), c(h(Y), Z)));};};}else{if ((e(H.Items[1.000000]).Tag == 1.000000)) {if ((e(H.Items[1.000000]).Item2.Tag == 0.000000)) {if ((e(H.Items[0.000000]).Tag == 2.000000)) {var _ = e(H.Items[0.000000]).Item;var ab = e(H.Items[1.000000]).Item1;var bb = e(H.Items[1.000000]).Item3;var cb = f(H.Items[0.000000]);var db = f(H.Items[1.000000]);var eb = E.Compare(_, ab);if ((eb != 0)) {return eb;}else{return k(E, c((new q()), cb), c(bb, db));};}else{if ((e(H.Items[0.000000]).Tag == 1.000000)) {if ((e(H.Items[0.000000]).Item2.Tag == 0.000000)) {var fb = e(H.Items[0.000000]).Item1;var gb = e(H.Items[0.000000]).Item3;var hb = e(H.Items[1.000000]).Item1;var ib = e(H.Items[1.000000]).Item3;var jb = f(H.Items[0.000000]);var kb = f(H.Items[1.000000]);var lb = E.Compare(fb, hb);if ((lb != 0)) {return lb;}else{return k(E, c(gb, jb), c(ib, kb));};}else{var mb = e(H.Items[0.000000]).Item1;var nb = e(H.Items[0.000000]).Item2;var ob = e(H.Items[0.000000]).Item3;var pb = f(H.Items[0.000000]);return k(E, c(nb, c(g(mb, (new q()), ob, 0), pb)), G);};}else{var qb = e(H.Items[1.000000]).Item1;var rb = e(H.Items[1.000000]).Item2;var sb = e(H.Items[1.000000]).Item3;var tb = f(H.Items[1.000000]);return k(E, F, c(rb, c(g(qb, (new q()), sb, 0), tb)));};};}else{if ((e(H.Items[0.000000]).Tag == 2.000000)) {var ub = e(H.Items[0.000000]).Item;var vb = f(H.Items[0.000000]);return k(E, c((new q()), c(h(ub), vb)), G);}else{if ((e(H.Items[0.000000]).Tag == 1.000000)) {var wb = e(H.Items[0.000000]).Item1;var xb = e(H.Items[0.000000]).Item2;var yb = e(H.Items[0.000000]).Item3;var zb = f(H.Items[0.000000]);return k(E, c(xb, c(g(wb, (new q()), yb, 0), zb)), G);}else{var Ab = e(H.Items[1.000000]).Item1;var Bb = e(H.Items[1.000000]).Item2;var Cb = e(H.Items[1.000000]).Item3;var Db = f(H.Items[1.000000]);return k(E, F, c(Bb, c(g(Ab, (new q()), Cb, 0), Db)));};};};}else{if ((e(H.Items[0.000000]).Tag == 2.000000)) {var Eb = e(H.Items[0.000000]).Item;var Fb = f(H.Items[0.000000]);return k(E, c((new q()), c(h(Eb), Fb)), G);}else{if ((e(H.Items[0.000000]).Tag == 1.000000)) {var Gb = e(H.Items[0.000000]).Item1;var Hb = e(H.Items[0.000000]).Item2;var Ib = e(H.Items[0.000000]).Item3;var Jb = f(H.Items[0.000000]);return k(E, c(Hb, c(g(Gb, (new q()), Ib, 0), Jb)), G);}else{var Kb = f(H.Items[0.000000]);var Lb = f(H.Items[1.000000]);return k(E, Kb, Lb);};};};};}else{return 1;};}else{if ((H.Items[1.000000].Tag == 1.000000)) {return -1;}else{return 0;};};});l = (function(){return 2;});m = (function(E){if ((E.Tag == 2.000000)) {return 1;}else{if ((E.Tag == 1.000000)) {var F = E.Item4;return F;}else{return 0;};};});n = (function(E,F,G){var H = (new B(E, G));if ((H.Items[0.000000].Tag == 0.000000)) {if ((H.Items[1.000000].Tag == 0.000000)) {return h(F);}else{var I = m(E);var J = m(G);var K;if ((I < J)) {K = J;}else{K = I;};var L = K;return g(F, E, G, (L + 1));};}else{var M = m(E);var N = m(G);var O;if ((M < N)) {O = N;}else{O = M;};var P = O;return g(F, E, G, (P + 1));};});o = (function(E,F,G){var H = m(E);var I = m(G);if ((I > (H + p))) {if ((G.Tag == 1.000000)) {var J = G.Item3;var K = G.Item2;var L = G.Item1;if ((m(K) > (H + 1))) {if ((K.Tag == 1.000000)) {var M = K.Item3;var N = K.Item2;var O = K.Item1;return n(n(E, F, N), O, n(M, L, J));}else{throw ("rebalance");return null;};}else{return n(n(E, F, K), L, J);};}else{throw ("rebalance");return null;};}else{if ((H > (I + p))) {if ((E.Tag == 1.000000)) {var P = E.Item3;var Q = E.Item2;var R = E.Item1;if ((m(P) > (I + 1))) {if ((P.Tag == 1.000000)) {var S = P.Item3;var T = P.Item2;var U = P.Item1;return n(n(Q, R, T), U, n(S, F, G));}else{throw ("rebalance");return null;};}else{return n(Q, R, n(P, F, G));};}else{throw ("rebalance");return null;};}else{return n(E, F, G);};};});q = (function(){var E = this;E.Tag = 0.000000;E._CaseName = "SetEmpty";});r = (function(Item1,Item2,Item3,Item4){var I = this;I.Tag = 1.000000;I._CaseName = "SetNode";I.Item1 = Item1;I.Item2 = Item2;I.Item3 = Item3;I.Item4 = Item4;});s = (function(Item){var F = this;F.Tag = 2.000000;F._CaseName = "SetOne";F.Item = Item;});t = (function(E,F){return (new u(v(E), i(v(E), F, x(E))));});u = (function(E,F){var G = this;{};G.comparer_479 = E;G.tree_483 = F;G.serializedData = null;});v = (function(E,F){return E.comparer_479;});w = (function(E){var F = (new b());var G;G = F;return (new u({Compare: (function(H,I){return (function(J,H,I){return (H < I ? -1 : (H == I ? 0 : 1));})(G, H, I);})}, (new q())));});x = (function(E,F){return E.tree_483;});y = (function(E,F){return t(F, E);});z = (function(){return w();});A = (function(Item0,Item1){var G = this;G.Items = [Item0, Item1];});B = (function(Item0,Item1){var G = this;G.Items = [Item0, Item1];});C = (function(Item1,Item2){var G = this;G.Tag = 1.000000;G._CaseName = "Cons";G.Item1 = Item1;G.Item2 = Item2;});D = (function(){var E = this;E.Tag = 0.000000;E._CaseName = "Nil";});p = l();var E = y(0, y(0, z()));var F = y(0, y(0, z()));return (function(G){return (function(H){return ((a(G, H)) < 0);});})(E)(F) | |
***** FunScript.Tests.Comparison.structural equality works | |
// Code: | |
var j, i, h, g, f, e, d, c, b, a;a = (function(k){return (function(l){var m = (k.PostCode < l.PostCode ? -1 : (k.PostCode == l.PostCode ? 0 : 1));if ((m != 0)) {return m;}else{return 0;};});});b = (function(k){var l = this;l.PostCode = k;});e = (function(){return 1;});f = (function(){return 0;});g = (function(Item){var l = this;l.Tag = 0.000000;l._CaseName = "Gender";l.Item = Item;});h = (function(k){return (function(l){var m = (k.Tag == 0.000000);var n = (l.Tag == 0.000000);if ((m && n)) {var o = (k.Item < l.Item ? -1 : (k.Item == l.Item ? 0 : 1));if ((o != 0)) {return o;}else{return 0;};}else{if (m) {return -1;}else{if (n) {return 1;}else{throw ("Unknown union case");return null;};};};});});i = (function(k){return (function(l){var m = h(k.Gender)(l.Gender);if ((m != 0)) {return m;}else{var n = (k.Age < l.Age ? -1 : (k.Age == l.Age ? 0 : 1));if ((n != 0)) {return n;}else{var o = a(k.Address)(l.Address);if ((o != 0)) {return o;}else{return 0;};};};});});j = (function(k,l,m){var n = this;n.Gender = k;n.Age = l;n.Address = m;});d = f();c = e();var k;if (true) {k = d;}else{k = c;};var l = (new j((new g(k)), 0, (new b(0))));var m;if (true) {m = d;}else{m = c;};var n = (new j((new g(m)), 0, (new b(0))));return (i(l)(n) == 0) | |
***** FunScript.Tests.Comparison.structural greater than or equal to works | |
// Code: | |
var j, i, h, g, f, e, d, c, b, a;a = (function(k){return (function(l){var m = (k.PostCode < l.PostCode ? -1 : (k.PostCode == l.PostCode ? 0 : 1));if ((m != 0)) {return m;}else{return 0;};});});b = (function(k){var l = this;l.PostCode = k;});e = (function(){return 1;});f = (function(){return 0;});g = (function(Item){var l = this;l.Tag = 0.000000;l._CaseName = "Gender";l.Item = Item;});h = (function(k){return (function(l){var m = (k.Tag == 0.000000);var n = (l.Tag == 0.000000);if ((m && n)) {var o = (k.Item < l.Item ? -1 : (k.Item == l.Item ? 0 : 1));if ((o != 0)) {return o;}else{return 0;};}else{if (m) {return -1;}else{if (n) {return 1;}else{throw ("Unknown union case");return null;};};};});});i = (function(k){return (function(l){var m = h(k.Gender)(l.Gender);if ((m != 0)) {return m;}else{var n = (k.Age < l.Age ? -1 : (k.Age == l.Age ? 0 : 1));if ((n != 0)) {return n;}else{var o = a(k.Address)(l.Address);if ((o != 0)) {return o;}else{return 0;};};};});});j = (function(k,l,m){var n = this;n.Gender = k;n.Age = l;n.Address = m;});d = f();c = e();var k;if (true) {k = d;}else{k = c;};var l = (new j((new g(k)), 0, (new b(0))));var m;if (true) {m = d;}else{m = c;};var n = (new j((new g(m)), 0, (new b(0))));return (i(l)(n) >= 0) | |
***** FunScript.Tests.Comparison.structural greater than works | |
// Code: | |
var j, i, h, g, f, e, d, c, b, a;a = (function(k){return (function(l){var m = (k.PostCode < l.PostCode ? -1 : (k.PostCode == l.PostCode ? 0 : 1));if ((m != 0)) {return m;}else{return 0;};});});b = (function(k){var l = this;l.PostCode = k;});e = (function(){return 1;});f = (function(){return 0;});g = (function(Item){var l = this;l.Tag = 0.000000;l._CaseName = "Gender";l.Item = Item;});h = (function(k){return (function(l){var m = (k.Tag == 0.000000);var n = (l.Tag == 0.000000);if ((m && n)) {var o = (k.Item < l.Item ? -1 : (k.Item == l.Item ? 0 : 1));if ((o != 0)) {return o;}else{return 0;};}else{if (m) {return -1;}else{if (n) {return 1;}else{throw ("Unknown union case");return null;};};};});});i = (function(k){return (function(l){var m = h(k.Gender)(l.Gender);if ((m != 0)) {return m;}else{var n = (k.Age < l.Age ? -1 : (k.Age == l.Age ? 0 : 1));if ((n != 0)) {return n;}else{var o = a(k.Address)(l.Address);if ((o != 0)) {return o;}else{return 0;};};};});});j = (function(k,l,m){var n = this;n.Gender = k;n.Age = l;n.Address = m;});d = f();c = e();var k;if (true) {k = d;}else{k = c;};var l = (new j((new g(k)), 0, (new b(0))));var m;if (true) {m = d;}else{m = c;};var n = (new j((new g(m)), 0, (new b(0))));return (i(l)(n) > 0) | |
***** FunScript.Tests.Comparison.structural inequality works | |
// Code: | |
var j, i, h, g, f, e, d, c, b, a;a = (function(k){return (function(l){var m = (k.PostCode < l.PostCode ? -1 : (k.PostCode == l.PostCode ? 0 : 1));if ((m != 0)) {return m;}else{return 0;};});});b = (function(k){var l = this;l.PostCode = k;});e = (function(){return 1;});f = (function(){return 0;});g = (function(Item){var l = this;l.Tag = 0.000000;l._CaseName = "Gender";l.Item = Item;});h = (function(k){return (function(l){var m = (k.Tag == 0.000000);var n = (l.Tag == 0.000000);if ((m && n)) {var o = (k.Item < l.Item ? -1 : (k.Item == l.Item ? 0 : 1));if ((o != 0)) {return o;}else{return 0;};}else{if (m) {return -1;}else{if (n) {return 1;}else{throw ("Unknown union case");return null;};};};});});i = (function(k){return (function(l){var m = h(k.Gender)(l.Gender);if ((m != 0)) {return m;}else{var n = (k.Age < l.Age ? -1 : (k.Age == l.Age ? 0 : 1));if ((n != 0)) {return n;}else{var o = a(k.Address)(l.Address);if ((o != 0)) {return o;}else{return 0;};};};});});j = (function(k,l,m){var n = this;n.Gender = k;n.Age = l;n.Address = m;});d = f();c = e();var k;if (true) {k = d;}else{k = c;};var l = (new j((new g(k)), 0, (new b(0))));var m;if (true) {m = d;}else{m = c;};var n = (new j((new g(m)), 0, (new b(0))));return (i(l)(n) != 0) | |
***** FunScript.Tests.Comparison.structural less than or equal to works | |
// Code: | |
var j, i, h, g, f, e, d, c, b, a;a = (function(k){return (function(l){var m = (k.PostCode < l.PostCode ? -1 : (k.PostCode == l.PostCode ? 0 : 1));if ((m != 0)) {return m;}else{return 0;};});});b = (function(k){var l = this;l.PostCode = k;});e = (function(){return 1;});f = (function(){return 0;});g = (function(Item){var l = this;l.Tag = 0.000000;l._CaseName = "Gender";l.Item = Item;});h = (function(k){return (function(l){var m = (k.Tag == 0.000000);var n = (l.Tag == 0.000000);if ((m && n)) {var o = (k.Item < l.Item ? -1 : (k.Item == l.Item ? 0 : 1));if ((o != 0)) {return o;}else{return 0;};}else{if (m) {return -1;}else{if (n) {return 1;}else{throw ("Unknown union case");return null;};};};});});i = (function(k){return (function(l){var m = h(k.Gender)(l.Gender);if ((m != 0)) {return m;}else{var n = (k.Age < l.Age ? -1 : (k.Age == l.Age ? 0 : 1));if ((n != 0)) {return n;}else{var o = a(k.Address)(l.Address);if ((o != 0)) {return o;}else{return 0;};};};});});j = (function(k,l,m){var n = this;n.Gender = k;n.Age = l;n.Address = m;});d = f();c = e();var k;if (true) {k = d;}else{k = c;};var l = (new j((new g(k)), 0, (new b(0))));var m;if (true) {m = d;}else{m = c;};var n = (new j((new g(m)), 0, (new b(0))));return (i(l)(n) <= 0) | |
***** FunScript.Tests.Comparison.structural less than works | |
// Code: | |
var j, i, h, g, f, e, d, c, b, a;a = (function(k){return (function(l){var m = (k.PostCode < l.PostCode ? -1 : (k.PostCode == l.PostCode ? 0 : 1));if ((m != 0)) {return m;}else{return 0;};});});b = (function(k){var l = this;l.PostCode = k;});e = (function(){return 1;});f = (function(){return 0;});g = (function(Item){var l = this;l.Tag = 0.000000;l._CaseName = "Gender";l.Item = Item;});h = (function(k){return (function(l){var m = (k.Tag == 0.000000);var n = (l.Tag == 0.000000);if ((m && n)) {var o = (k.Item < l.Item ? -1 : (k.Item == l.Item ? 0 : 1));if ((o != 0)) {return o;}else{return 0;};}else{if (m) {return -1;}else{if (n) {return 1;}else{throw ("Unknown union case");return null;};};};});});i = (function(k){return (function(l){var m = h(k.Gender)(l.Gender);if ((m != 0)) {return m;}else{var n = (k.Age < l.Age ? -1 : (k.Age == l.Age ? 0 : 1));if ((n != 0)) {return n;}else{var o = a(k.Address)(l.Address);if ((o != 0)) {return o;}else{return 0;};};};});});j = (function(k,l,m){var n = this;n.Gender = k;n.Age = l;n.Address = m;});d = f();c = e();var k;if (true) {k = d;}else{k = c;};var l = (new j((new g(k)), 0, (new b(0))));var m;if (true) {m = d;}else{m = c;};var n = (new j((new g(m)), 0, (new b(0))));return (i(l)(n) < 0) | |
***** FunScript.Tests.Comparison.tuple equality works | |
// Code: | |
var b, a;a = (function(Item0,Item1){var e = this;e.Items = [Item0, Item1];});b = (function(c){return (function(d){var e = (c.Items[0.000000] < d.Items[0.000000] ? -1 : (c.Items[0.000000] == d.Items[0.000000] ? 0 : 1));if ((e != 0)) {return e;}else{var f = (c.Items[1.000000] < d.Items[1.000000] ? -1 : (c.Items[1.000000] == d.Items[1.000000] ? 0 : 1));if ((f != 0)) {return f;}else{return 0;};};});});var c = (new a(0, 0));var d = (new a(0, 0));return (function(e){return (function(f){return (b(e)(f) == 0);});})(c)(d) | |
***** FunScript.Tests.Comparison.tuple greater than or equal works | |
// Code: | |
var b, a;a = (function(Item0,Item1){var e = this;e.Items = [Item0, Item1];});b = (function(c){return (function(d){var e = (c.Items[0.000000] < d.Items[0.000000] ? -1 : (c.Items[0.000000] == d.Items[0.000000] ? 0 : 1));if ((e != 0)) {return e;}else{var f = (c.Items[1.000000] < d.Items[1.000000] ? -1 : (c.Items[1.000000] == d.Items[1.000000] ? 0 : 1));if ((f != 0)) {return f;}else{return 0;};};});});var c = (new a(0, 0));var d = (new a(0, 0));return (function(e){return (function(f){return (b(e)(f) >= 0);});})(c)(d) | |
***** FunScript.Tests.Comparison.tuple greater than works | |
// Code: | |
var b, a;a = (function(Item0,Item1){var e = this;e.Items = [Item0, Item1];});b = (function(c){return (function(d){var e = (c.Items[0.000000] < d.Items[0.000000] ? -1 : (c.Items[0.000000] == d.Items[0.000000] ? 0 : 1));if ((e != 0)) {return e;}else{var f = (c.Items[1.000000] < d.Items[1.000000] ? -1 : (c.Items[1.000000] == d.Items[1.000000] ? 0 : 1));if ((f != 0)) {return f;}else{return 0;};};});});var c = (new a(0, 0));var d = (new a(0, 0));return (function(e){return (function(f){return (b(e)(f) > 0);});})(c)(d) | |
***** FunScript.Tests.Comparison.tuple inequality works | |
// Code: | |
var b, a;a = (function(Item0,Item1){var e = this;e.Items = [Item0, Item1];});b = (function(c){return (function(d){var e = (c.Items[0.000000] < d.Items[0.000000] ? -1 : (c.Items[0.000000] == d.Items[0.000000] ? 0 : 1));if ((e != 0)) {return e;}else{var f = (c.Items[1.000000] < d.Items[1.000000] ? -1 : (c.Items[1.000000] == d.Items[1.000000] ? 0 : 1));if ((f != 0)) {return f;}else{return 0;};};});});var c = (new a(0, 0));var d = (new a(0, 0));return (function(e){return (function(f){return (b(e)(f) != 0);});})(c)(d) | |
***** FunScript.Tests.Comparison.tuple less than or equal works | |
// Code: | |
var b, a;a = (function(Item0,Item1){var e = this;e.Items = [Item0, Item1];});b = (function(c){return (function(d){var e = (c.Items[0.000000] < d.Items[0.000000] ? -1 : (c.Items[0.000000] == d.Items[0.000000] ? 0 : 1));if ((e != 0)) {return e;}else{var f = (c.Items[1.000000] < d.Items[1.000000] ? -1 : (c.Items[1.000000] == d.Items[1.000000] ? 0 : 1));if ((f != 0)) {return f;}else{return 0;};};});});var c = (new a(0, 0));var d = (new a(0, 0));return (function(e){return (function(f){return (b(e)(f) <= 0);});})(c)(d) | |
***** FunScript.Tests.Comparison.tuple less than works | |
// Code: | |
var b, a;a = (function(Item0,Item1){var e = this;e.Items = [Item0, Item1];});b = (function(c){return (function(d){var e = (c.Items[0.000000] < d.Items[0.000000] ? -1 : (c.Items[0.000000] == d.Items[0.000000] ? 0 : 1));if ((e != 0)) {return e;}else{var f = (c.Items[1.000000] < d.Items[1.000000] ? -1 : (c.Items[1.000000] == d.Items[1.000000] ? 0 : 1));if ((f != 0)) {return f;}else{return 0;};};});});var c = (new a(0, 0));var d = (new a(0, 0));return (function(e){return (function(f){return (b(e)(f) < 0);});})(c)(d) | |
***** FunScript.Tests.Comparison.unit equality works | |
// Code: | |
var a;var b = a;var c;var d = c;return (b == d) | |
***** FunScript.Tests.Comparison.unit less than works | |
// Code: | |
var a;var b = a;var c;var d = c;return (b < d) | |
***** FunScript.Tests.ControlFlow.Catching any exception works | |
// Code: | |
var a;a = (function(b){var c = this;{};c.message = b;});var b = (function(c){try{if (c) {throw ((function(e){return (new a(e));}));return null;}else{return 1.000000;};}catch(d){return 99.000000;};});return (b(true) + b(false)) | |
***** FunScript.Tests.ControlFlow.For i = 0 to N expressions work | |
// Code: | |
var a = 0.000000;for (var b = 1; b <= 10; b++){a = (a + 1.000000);null;};return a | |
***** FunScript.Tests.ControlFlow.If then else expressions work | |
// Code: | |
var a = true;if (a) {return false;}else{return true;} | |
***** FunScript.Tests.ControlFlow.If then else expressions work inline | |
// Code: | |
var a = (function(b){return b;});var b = true;var c;if (b) {c = "foo";}else{c = "bar";};return a(c) | |
***** FunScript.Tests.ControlFlow.Lambdas inside for loops create closures | |
// Code: | |
var a = (function(b){return 0.000000;});for (var b = 1; b <= 10; b++){(function(c){if ((c == 1)) {a = (function(d){return c;});null;}else{;};})(b);};var c;return a(c) | |
***** FunScript.Tests.ControlFlow.Matching when the matched variable name is re-used in the case works | |
// Code: | |
var f, e, d, c, b, a;a = (function(g,h){return (new e(g, h));});b = (function(){return (new f());});c = (function(g){if ((g.Tag == 1.000000)) {var h = g.Item2;var i = g.Item1;return i;}else{throw ("List was empty");return null;};});d = (function(g){if ((g.Tag == 1.000000)) {var h = g.Item2;var i = g.Item1;return h;}else{throw ("List was empty");return null;};});e = (function(Item1,Item2){var i = this;i.Tag = 1.000000;i._CaseName = "Cons";i.Item1 = Item1;i.Item2 = Item2;});f = (function(){var g = this;g.Tag = 0.000000;g._CaseName = "Nil";});var g = a(1.000000, a(2.000000, a(3.000000, b())));if ((g.Tag == 1.000000)) {var h = d(g);var i = c(g);return i;}else{throw ("never");return null;} | |
***** FunScript.Tests.ControlFlow.While expressions work | |
// Code: | |
var a = 1.000000;while ((a < 10.000000)){a = (a + 1.000000);null;};return a | |
***** FunScript.Tests.DateTimes.DateTime Addition works(0.0d) | |
// Code: | |
var r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(s,t){return c((s.getTime() + r(t)), e(s));});b = (function(s,t,u){return d(s, t, u, 0, 0, 0, 0, 2, 1);});c = (function(s,t){var date = s == null ? new Date() : new Date(s); | |
if (isNaN(date)) { throw "The string was not recognized as a valid DateTime." } | |
date.kind = t; | |
return date;});d = (function(s,t,u,v,w,x,y,z,A){var date = z === A ? new Date(Date.UTC(s, t - 1, u, v, w, x, y)) : new Date(s, t - 1, u, v, w, x, y); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = z; | |
return date;});e = (function(s,t){return s.kind;});f = (function(s,t){return ((s.getTime() + 62135604000000.000000) * q());});g = (function(s,t){return a(s, t);});h = (function(s,t){var u = i(t);var v = (j(m(u)) + 1.000000);var w = (v - s);var x = n(10.000000, w);return (o((t / x)) * x);});i = (function(s){return Math.abs(s);;});j = (function(s){return Math.floor(s);;});k = (function(s){return Math.LN10;;});l = (function(s){return Math.log(s);;});m = (function(s){return (l(s) / k());});n = (function(s,t){return Math.pow(s, t);;});o = (function(s){return Math.round(s);;});p = (function(s){return s;});q = (function(s){return 10000.000000;});r = (function(s,t){return s;});var s = b(2014, 9, 11);var t = p(0.000000);var u = a(s, t);var v = f(u);var w = g(s, t);var x = f(w);if ((v == x)) {return h(5, x);}else{throw ("synonyms don\u0027t match");return null;} | |
***** FunScript.Tests.DateTimes.DateTime Addition works(-1000.0d) | |
// Code: | |
var r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(s,t){return c((s.getTime() + r(t)), e(s));});b = (function(s,t,u){return d(s, t, u, 0, 0, 0, 0, 2, 1);});c = (function(s,t){var date = s == null ? new Date() : new Date(s); | |
if (isNaN(date)) { throw "The string was not recognized as a valid DateTime." } | |
date.kind = t; | |
return date;});d = (function(s,t,u,v,w,x,y,z,A){var date = z === A ? new Date(Date.UTC(s, t - 1, u, v, w, x, y)) : new Date(s, t - 1, u, v, w, x, y); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = z; | |
return date;});e = (function(s,t){return s.kind;});f = (function(s,t){return ((s.getTime() + 62135604000000.000000) * q());});g = (function(s,t){return a(s, t);});h = (function(s,t){var u = i(t);var v = (j(m(u)) + 1.000000);var w = (v - s);var x = n(10.000000, w);return (o((t / x)) * x);});i = (function(s){return Math.abs(s);;});j = (function(s){return Math.floor(s);;});k = (function(s){return Math.LN10;;});l = (function(s){return Math.log(s);;});m = (function(s){return (l(s) / k());});n = (function(s,t){return Math.pow(s, t);;});o = (function(s){return Math.round(s);;});p = (function(s){return s;});q = (function(s){return 10000.000000;});r = (function(s,t){return s;});var s = b(2014, 9, 11);var t = p(-1000.000000);var u = a(s, t);var v = f(u);var w = g(s, t);var x = f(w);if ((v == x)) {return h(5, x);}else{throw ("synonyms don\u0027t match");return null;} | |
***** FunScript.Tests.DateTimes.DateTime Addition works(1000.0d) | |
// Code: | |
var r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(s,t){return c((s.getTime() + r(t)), e(s));});b = (function(s,t,u){return d(s, t, u, 0, 0, 0, 0, 2, 1);});c = (function(s,t){var date = s == null ? new Date() : new Date(s); | |
if (isNaN(date)) { throw "The string was not recognized as a valid DateTime." } | |
date.kind = t; | |
return date;});d = (function(s,t,u,v,w,x,y,z,A){var date = z === A ? new Date(Date.UTC(s, t - 1, u, v, w, x, y)) : new Date(s, t - 1, u, v, w, x, y); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = z; | |
return date;});e = (function(s,t){return s.kind;});f = (function(s,t){return ((s.getTime() + 62135604000000.000000) * q());});g = (function(s,t){return a(s, t);});h = (function(s,t){var u = i(t);var v = (j(m(u)) + 1.000000);var w = (v - s);var x = n(10.000000, w);return (o((t / x)) * x);});i = (function(s){return Math.abs(s);;});j = (function(s){return Math.floor(s);;});k = (function(s){return Math.LN10;;});l = (function(s){return Math.log(s);;});m = (function(s){return (l(s) / k());});n = (function(s,t){return Math.pow(s, t);;});o = (function(s){return Math.round(s);;});p = (function(s){return s;});q = (function(s){return 10000.000000;});r = (function(s,t){return s;});var s = b(2014, 9, 11);var t = p(1000.000000);var u = a(s, t);var v = f(u);var w = g(s, t);var x = f(w);if ((v == x)) {return h(5, x);}else{throw ("synonyms don\u0027t match");return null;} | |
***** FunScript.Tests.DateTimes.DateTime Comparison works(0.0d) | |
// Code: | |
var h, g, f, e, d, c, b, a;a = (function(i,j){return c(i, j);});b = (function(i,j){return f((i.getTime() + j), h(i));});c = (function(i,j){return (i.getTime() < j.getTime() ? -1 : (i.getTime() == j.getTime() ? 0 : 1));});d = (function(i,j){return c(i, j);});e = (function(i,j,k,l,m,n,o){return g(i, j, k, l, m, n, o, 2, 1);});f = (function(i,j){var date = i == null ? new Date() : new Date(i); | |
if (isNaN(date)) { throw "The string was not recognized as a valid DateTime." } | |
date.kind = j; | |
return date;});g = (function(i,j,k,l,m,n,o,p,q){var date = p === q ? new Date(Date.UTC(i, j - 1, k, l, m, n, o)) : new Date(i, j - 1, k, l, m, n, o); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = p; | |
return date;});h = (function(i,j){return i.kind;});var i = e(2014, 10, 9, 13, 23, 30, 234);var j = b(i, 0.000000);var k = (a(i, j));var l = d(i, j);var m = c(i, j);if (((k == l) && (l == m))) {return k;}else{throw ("synonyms don\u0027t match");return null;} | |
***** FunScript.Tests.DateTimes.DateTime Comparison works(-1000.0d) | |
// Code: | |
var h, g, f, e, d, c, b, a;a = (function(i,j){return c(i, j);});b = (function(i,j){return f((i.getTime() + j), h(i));});c = (function(i,j){return (i.getTime() < j.getTime() ? -1 : (i.getTime() == j.getTime() ? 0 : 1));});d = (function(i,j){return c(i, j);});e = (function(i,j,k,l,m,n,o){return g(i, j, k, l, m, n, o, 2, 1);});f = (function(i,j){var date = i == null ? new Date() : new Date(i); | |
if (isNaN(date)) { throw "The string was not recognized as a valid DateTime." } | |
date.kind = j; | |
return date;});g = (function(i,j,k,l,m,n,o,p,q){var date = p === q ? new Date(Date.UTC(i, j - 1, k, l, m, n, o)) : new Date(i, j - 1, k, l, m, n, o); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = p; | |
return date;});h = (function(i,j){return i.kind;});var i = e(2014, 10, 9, 13, 23, 30, 234);var j = b(i, -1000.000000);var k = (a(i, j));var l = d(i, j);var m = c(i, j);if (((k == l) && (l == m))) {return k;}else{throw ("synonyms don\u0027t match");return null;} | |
***** FunScript.Tests.DateTimes.DateTime Comparison works(1000.0d) | |
// Code: | |
var h, g, f, e, d, c, b, a;a = (function(i,j){return c(i, j);});b = (function(i,j){return f((i.getTime() + j), h(i));});c = (function(i,j){return (i.getTime() < j.getTime() ? -1 : (i.getTime() == j.getTime() ? 0 : 1));});d = (function(i,j){return c(i, j);});e = (function(i,j,k,l,m,n,o){return g(i, j, k, l, m, n, o, 2, 1);});f = (function(i,j){var date = i == null ? new Date() : new Date(i); | |
if (isNaN(date)) { throw "The string was not recognized as a valid DateTime." } | |
date.kind = j; | |
return date;});g = (function(i,j,k,l,m,n,o,p,q){var date = p === q ? new Date(Date.UTC(i, j - 1, k, l, m, n, o)) : new Date(i, j - 1, k, l, m, n, o); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = p; | |
return date;});h = (function(i,j){return i.kind;});var i = e(2014, 10, 9, 13, 23, 30, 234);var j = b(i, 1000.000000);var k = (a(i, j));var l = d(i, j);var m = c(i, j);if (((k == l) && (l == m))) {return k;}else{throw ("synonyms don\u0027t match");return null;} | |
***** FunScript.Tests.DateTimes.DateTime constructors work | |
// Code: | |
var j, i, h, g, f, e, d, c, b, a;a = (function(k,l,m){return f(k, l, m, 0, 0, 0, 0, 2, 1);});b = (function(k,l,m,n,o,p){return f(k, l, m, n, o, p, 0, 2, 1);});c = (function(k,l,m,n,o,p,q){return f(k, l, m, n, o, p, q, 2, 1);});d = (function(k,l,m,n,o,p,q,r){return f(k, l, m, n, o, p, q, r, 1);});e = (function(k,l,m,n,o,p,q){return f(k, l, m, n, o, p, 0, q, 1);});f = (function(k,l,m,n,o,p,q,r,s){var date = r === s ? new Date(Date.UTC(k, l - 1, m, n, o, p, q)) : new Date(k, l - 1, m, n, o, p, q); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = r; | |
return date;});g = (function(k,l,m){return k.kind == m ? k['getUTC'+l]() : k['get'+l]();});h = (function(k,l){return g(k, "Date", 1);});i = (function(k,l){return g(k, "Milliseconds", 1);});j = (function(k,l){return g(k, "Seconds", 1);});var k = a(2014, 10, 9);var l = b(2014, 10, 9, 13, 23, 30);var m = e(2014, 10, 9, 13, 23, 30, 1);var n = c(2014, 10, 9, 13, 23, 30, 500);var o = d(2014, 10, 9, 13, 23, 30, 500, 1);return ((((h(k) + j(l)) + j(m)) + i(n)) + i(o)) | |
***** FunScript.Tests.DateTimes.DateTime Equality works(0.0d) | |
// Code: | |
var g, f, e, d, c, b, a;a = (function(h,i){return c(h, i);});b = (function(h,i){return e((h.getTime() + i), g(h));});c = (function(h,i){return (h.getTime() < i.getTime() ? -1 : (h.getTime() == i.getTime() ? 0 : 1));});d = (function(h,i,j,k,l,m,n){return f(h, i, j, k, l, m, n, 2, 1);});e = (function(h,i){var date = h == null ? new Date() : new Date(h); | |
if (isNaN(date)) { throw "The string was not recognized as a valid DateTime." } | |
date.kind = i; | |
return date;});f = (function(h,i,j,k,l,m,n,o,p){var date = o === p ? new Date(Date.UTC(h, i - 1, j, k, l, m, n)) : new Date(h, i - 1, j, k, l, m, n); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = o; | |
return date;});g = (function(h,i){return h.kind;});var h = d(2014, 10, 9, 13, 23, 30, 234);var i = b(h, 0.000000);return ((a(h, i)) == 0) | |
***** FunScript.Tests.DateTimes.DateTime Equality works(-1000.0d) | |
// Code: | |
var g, f, e, d, c, b, a;a = (function(h,i){return c(h, i);});b = (function(h,i){return e((h.getTime() + i), g(h));});c = (function(h,i){return (h.getTime() < i.getTime() ? -1 : (h.getTime() == i.getTime() ? 0 : 1));});d = (function(h,i,j,k,l,m,n){return f(h, i, j, k, l, m, n, 2, 1);});e = (function(h,i){var date = h == null ? new Date() : new Date(h); | |
if (isNaN(date)) { throw "The string was not recognized as a valid DateTime." } | |
date.kind = i; | |
return date;});f = (function(h,i,j,k,l,m,n,o,p){var date = o === p ? new Date(Date.UTC(h, i - 1, j, k, l, m, n)) : new Date(h, i - 1, j, k, l, m, n); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = o; | |
return date;});g = (function(h,i){return h.kind;});var h = d(2014, 10, 9, 13, 23, 30, 234);var i = b(h, -1000.000000);return ((a(h, i)) == 0) | |
***** FunScript.Tests.DateTimes.DateTime Equality works(1000.0d) | |
// Code: | |
var g, f, e, d, c, b, a;a = (function(h,i){return c(h, i);});b = (function(h,i){return e((h.getTime() + i), g(h));});c = (function(h,i){return (h.getTime() < i.getTime() ? -1 : (h.getTime() == i.getTime() ? 0 : 1));});d = (function(h,i,j,k,l,m,n){return f(h, i, j, k, l, m, n, 2, 1);});e = (function(h,i){var date = h == null ? new Date() : new Date(h); | |
if (isNaN(date)) { throw "The string was not recognized as a valid DateTime." } | |
date.kind = i; | |
return date;});f = (function(h,i,j,k,l,m,n,o,p){var date = o === p ? new Date(Date.UTC(h, i - 1, j, k, l, m, n)) : new Date(h, i - 1, j, k, l, m, n); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = o; | |
return date;});g = (function(h,i){return h.kind;});var h = d(2014, 10, 9, 13, 23, 30, 234);var i = b(h, 1000.000000);return ((a(h, i)) == 0) | |
***** FunScript.Tests.DateTimes.DateTime GreaterThan works(0.0d) | |
// Code: | |
var g, f, e, d, c, b, a;a = (function(h,i){return c(h, i);});b = (function(h,i){return e((h.getTime() + i), g(h));});c = (function(h,i){return (h.getTime() < i.getTime() ? -1 : (h.getTime() == i.getTime() ? 0 : 1));});d = (function(h,i,j,k,l,m,n){return f(h, i, j, k, l, m, n, 2, 1);});e = (function(h,i){var date = h == null ? new Date() : new Date(h); | |
if (isNaN(date)) { throw "The string was not recognized as a valid DateTime." } | |
date.kind = i; | |
return date;});f = (function(h,i,j,k,l,m,n,o,p){var date = o === p ? new Date(Date.UTC(h, i - 1, j, k, l, m, n)) : new Date(h, i - 1, j, k, l, m, n); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = o; | |
return date;});g = (function(h,i){return h.kind;});var h = d(2014, 10, 9, 13, 23, 30, 234);var i = b(h, 0.000000);return ((a(h, i)) > 0) | |
***** FunScript.Tests.DateTimes.DateTime GreaterThan works(-1000.0d) | |
// Code: | |
var g, f, e, d, c, b, a;a = (function(h,i){return c(h, i);});b = (function(h,i){return e((h.getTime() + i), g(h));});c = (function(h,i){return (h.getTime() < i.getTime() ? -1 : (h.getTime() == i.getTime() ? 0 : 1));});d = (function(h,i,j,k,l,m,n){return f(h, i, j, k, l, m, n, 2, 1);});e = (function(h,i){var date = h == null ? new Date() : new Date(h); | |
if (isNaN(date)) { throw "The string was not recognized as a valid DateTime." } | |
date.kind = i; | |
return date;});f = (function(h,i,j,k,l,m,n,o,p){var date = o === p ? new Date(Date.UTC(h, i - 1, j, k, l, m, n)) : new Date(h, i - 1, j, k, l, m, n); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = o; | |
return date;});g = (function(h,i){return h.kind;});var h = d(2014, 10, 9, 13, 23, 30, 234);var i = b(h, -1000.000000);return ((a(h, i)) > 0) | |
***** FunScript.Tests.DateTimes.DateTime GreaterThan works(1000.0d) | |
// Code: | |
var g, f, e, d, c, b, a;a = (function(h,i){return c(h, i);});b = (function(h,i){return e((h.getTime() + i), g(h));});c = (function(h,i){return (h.getTime() < i.getTime() ? -1 : (h.getTime() == i.getTime() ? 0 : 1));});d = (function(h,i,j,k,l,m,n){return f(h, i, j, k, l, m, n, 2, 1);});e = (function(h,i){var date = h == null ? new Date() : new Date(h); | |
if (isNaN(date)) { throw "The string was not recognized as a valid DateTime." } | |
date.kind = i; | |
return date;});f = (function(h,i,j,k,l,m,n,o,p){var date = o === p ? new Date(Date.UTC(h, i - 1, j, k, l, m, n)) : new Date(h, i - 1, j, k, l, m, n); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = o; | |
return date;});g = (function(h,i){return h.kind;});var h = d(2014, 10, 9, 13, 23, 30, 234);var i = b(h, 1000.000000);return ((a(h, i)) > 0) | |
***** FunScript.Tests.DateTimes.DateTime Inequality works(0.0d) | |
// Code: | |
var g, f, e, d, c, b, a;a = (function(h,i){return c(h, i);});b = (function(h,i){return e((h.getTime() + i), g(h));});c = (function(h,i){return (h.getTime() < i.getTime() ? -1 : (h.getTime() == i.getTime() ? 0 : 1));});d = (function(h,i,j,k,l,m,n){return f(h, i, j, k, l, m, n, 2, 1);});e = (function(h,i){var date = h == null ? new Date() : new Date(h); | |
if (isNaN(date)) { throw "The string was not recognized as a valid DateTime." } | |
date.kind = i; | |
return date;});f = (function(h,i,j,k,l,m,n,o,p){var date = o === p ? new Date(Date.UTC(h, i - 1, j, k, l, m, n)) : new Date(h, i - 1, j, k, l, m, n); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = o; | |
return date;});g = (function(h,i){return h.kind;});var h = d(2014, 10, 9, 13, 23, 30, 234);var i = b(h, 0.000000);return ((a(h, i)) != 0) | |
***** FunScript.Tests.DateTimes.DateTime Inequality works(-1000.0d) | |
// Code: | |
var g, f, e, d, c, b, a;a = (function(h,i){return c(h, i);});b = (function(h,i){return e((h.getTime() + i), g(h));});c = (function(h,i){return (h.getTime() < i.getTime() ? -1 : (h.getTime() == i.getTime() ? 0 : 1));});d = (function(h,i,j,k,l,m,n){return f(h, i, j, k, l, m, n, 2, 1);});e = (function(h,i){var date = h == null ? new Date() : new Date(h); | |
if (isNaN(date)) { throw "The string was not recognized as a valid DateTime." } | |
date.kind = i; | |
return date;});f = (function(h,i,j,k,l,m,n,o,p){var date = o === p ? new Date(Date.UTC(h, i - 1, j, k, l, m, n)) : new Date(h, i - 1, j, k, l, m, n); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = o; | |
return date;});g = (function(h,i){return h.kind;});var h = d(2014, 10, 9, 13, 23, 30, 234);var i = b(h, -1000.000000);return ((a(h, i)) != 0) | |
***** FunScript.Tests.DateTimes.DateTime Inequality works(1000.0d) | |
// Code: | |
var g, f, e, d, c, b, a;a = (function(h,i){return c(h, i);});b = (function(h,i){return e((h.getTime() + i), g(h));});c = (function(h,i){return (h.getTime() < i.getTime() ? -1 : (h.getTime() == i.getTime() ? 0 : 1));});d = (function(h,i,j,k,l,m,n){return f(h, i, j, k, l, m, n, 2, 1);});e = (function(h,i){var date = h == null ? new Date() : new Date(h); | |
if (isNaN(date)) { throw "The string was not recognized as a valid DateTime." } | |
date.kind = i; | |
return date;});f = (function(h,i,j,k,l,m,n,o,p){var date = o === p ? new Date(Date.UTC(h, i - 1, j, k, l, m, n)) : new Date(h, i - 1, j, k, l, m, n); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = o; | |
return date;});g = (function(h,i){return h.kind;});var h = d(2014, 10, 9, 13, 23, 30, 234);var i = b(h, 1000.000000);return ((a(h, i)) != 0) | |
***** FunScript.Tests.DateTimes.DateTime LessThan works(0.0d) | |
// Code: | |
var g, f, e, d, c, b, a;a = (function(h,i){return c(h, i);});b = (function(h,i){return e((h.getTime() + i), g(h));});c = (function(h,i){return (h.getTime() < i.getTime() ? -1 : (h.getTime() == i.getTime() ? 0 : 1));});d = (function(h,i,j,k,l,m,n){return f(h, i, j, k, l, m, n, 2, 1);});e = (function(h,i){var date = h == null ? new Date() : new Date(h); | |
if (isNaN(date)) { throw "The string was not recognized as a valid DateTime." } | |
date.kind = i; | |
return date;});f = (function(h,i,j,k,l,m,n,o,p){var date = o === p ? new Date(Date.UTC(h, i - 1, j, k, l, m, n)) : new Date(h, i - 1, j, k, l, m, n); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = o; | |
return date;});g = (function(h,i){return h.kind;});var h = d(2014, 10, 9, 13, 23, 30, 234);var i = b(h, 0.000000);return ((a(h, i)) < 0) | |
***** FunScript.Tests.DateTimes.DateTime LessThan works(-1000.0d) | |
// Code: | |
var g, f, e, d, c, b, a;a = (function(h,i){return c(h, i);});b = (function(h,i){return e((h.getTime() + i), g(h));});c = (function(h,i){return (h.getTime() < i.getTime() ? -1 : (h.getTime() == i.getTime() ? 0 : 1));});d = (function(h,i,j,k,l,m,n){return f(h, i, j, k, l, m, n, 2, 1);});e = (function(h,i){var date = h == null ? new Date() : new Date(h); | |
if (isNaN(date)) { throw "The string was not recognized as a valid DateTime." } | |
date.kind = i; | |
return date;});f = (function(h,i,j,k,l,m,n,o,p){var date = o === p ? new Date(Date.UTC(h, i - 1, j, k, l, m, n)) : new Date(h, i - 1, j, k, l, m, n); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = o; | |
return date;});g = (function(h,i){return h.kind;});var h = d(2014, 10, 9, 13, 23, 30, 234);var i = b(h, -1000.000000);return ((a(h, i)) < 0) | |
***** FunScript.Tests.DateTimes.DateTime LessThan works(1000.0d) | |
// Code: | |
var g, f, e, d, c, b, a;a = (function(h,i){return c(h, i);});b = (function(h,i){return e((h.getTime() + i), g(h));});c = (function(h,i){return (h.getTime() < i.getTime() ? -1 : (h.getTime() == i.getTime() ? 0 : 1));});d = (function(h,i,j,k,l,m,n){return f(h, i, j, k, l, m, n, 2, 1);});e = (function(h,i){var date = h == null ? new Date() : new Date(h); | |
if (isNaN(date)) { throw "The string was not recognized as a valid DateTime." } | |
date.kind = i; | |
return date;});f = (function(h,i,j,k,l,m,n,o,p){var date = o === p ? new Date(Date.UTC(h, i - 1, j, k, l, m, n)) : new Date(h, i - 1, j, k, l, m, n); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = o; | |
return date;});g = (function(h,i){return h.kind;});var h = d(2014, 10, 9, 13, 23, 30, 234);var i = b(h, 1000.000000);return ((a(h, i)) < 0) | |
***** FunScript.Tests.DateTimes.DateTime Subtraction with DateTime works(0.0d) | |
// Code: | |
var k, j, i, h, g, f, e, d, c, b, a;a = (function(l,m){return d((l.getTime() + m), f(l));});b = (function(l,m,n,o,p,q,r){return e(l, m, n, o, p, q, r, 2, 1);});c = (function(l,m){return h((l.getTime() - m.getTime()));});d = (function(l,m){var date = l == null ? new Date() : new Date(l); | |
if (isNaN(date)) { throw "The string was not recognized as a valid DateTime." } | |
date.kind = m; | |
return date;});e = (function(l,m,n,o,p,q,r,s,t){var date = s === t ? new Date(Date.UTC(l, m - 1, n, o, p, q, r)) : new Date(l, m - 1, n, o, p, q, r); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = s; | |
return date;});f = (function(l,m){return l.kind;});g = (function(l,m){return c(l, m);});h = (function(l){return l;});i = (function(l,m){return (k(l) * j());});j = (function(l){return 10000.000000;});k = (function(l,m){return l;});var l = b(2014, 10, 9, 13, 23, 30, 234);var m = a(l, 0.000000);var n = c(l, m);var o = i(n);var p = g(l, m);var q = i(p);if ((o == q)) {return q;}else{throw ("synonyms don\u0027t match");return null;} | |
***** FunScript.Tests.DateTimes.DateTime Subtraction with DateTime works(-1000.0d) | |
// Code: | |
var k, j, i, h, g, f, e, d, c, b, a;a = (function(l,m){return d((l.getTime() + m), f(l));});b = (function(l,m,n,o,p,q,r){return e(l, m, n, o, p, q, r, 2, 1);});c = (function(l,m){return h((l.getTime() - m.getTime()));});d = (function(l,m){var date = l == null ? new Date() : new Date(l); | |
if (isNaN(date)) { throw "The string was not recognized as a valid DateTime." } | |
date.kind = m; | |
return date;});e = (function(l,m,n,o,p,q,r,s,t){var date = s === t ? new Date(Date.UTC(l, m - 1, n, o, p, q, r)) : new Date(l, m - 1, n, o, p, q, r); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = s; | |
return date;});f = (function(l,m){return l.kind;});g = (function(l,m){return c(l, m);});h = (function(l){return l;});i = (function(l,m){return (k(l) * j());});j = (function(l){return 10000.000000;});k = (function(l,m){return l;});var l = b(2014, 10, 9, 13, 23, 30, 234);var m = a(l, -1000.000000);var n = c(l, m);var o = i(n);var p = g(l, m);var q = i(p);if ((o == q)) {return q;}else{throw ("synonyms don\u0027t match");return null;} | |
***** FunScript.Tests.DateTimes.DateTime Subtraction with DateTime works(1000.0d) | |
// Code: | |
var k, j, i, h, g, f, e, d, c, b, a;a = (function(l,m){return d((l.getTime() + m), f(l));});b = (function(l,m,n,o,p,q,r){return e(l, m, n, o, p, q, r, 2, 1);});c = (function(l,m){return h((l.getTime() - m.getTime()));});d = (function(l,m){var date = l == null ? new Date() : new Date(l); | |
if (isNaN(date)) { throw "The string was not recognized as a valid DateTime." } | |
date.kind = m; | |
return date;});e = (function(l,m,n,o,p,q,r,s,t){var date = s === t ? new Date(Date.UTC(l, m - 1, n, o, p, q, r)) : new Date(l, m - 1, n, o, p, q, r); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = s; | |
return date;});f = (function(l,m){return l.kind;});g = (function(l,m){return c(l, m);});h = (function(l){return l;});i = (function(l,m){return (k(l) * j());});j = (function(l){return 10000.000000;});k = (function(l,m){return l;});var l = b(2014, 10, 9, 13, 23, 30, 234);var m = a(l, 1000.000000);var n = c(l, m);var o = i(n);var p = g(l, m);var q = i(p);if ((o == q)) {return q;}else{throw ("synonyms don\u0027t match");return null;} | |
***** FunScript.Tests.DateTimes.DateTime Subtraction with TimeSpan works(0.0d) | |
// Code: | |
var r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(s,t,u){return d(s, t, u, 0, 0, 0, 0, 2, 1);});b = (function(s,t){return c((s.getTime() - r(t)), e(s));});c = (function(s,t){var date = s == null ? new Date() : new Date(s); | |
if (isNaN(date)) { throw "The string was not recognized as a valid DateTime." } | |
date.kind = t; | |
return date;});d = (function(s,t,u,v,w,x,y,z,A){var date = z === A ? new Date(Date.UTC(s, t - 1, u, v, w, x, y)) : new Date(s, t - 1, u, v, w, x, y); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = z; | |
return date;});e = (function(s,t){return s.kind;});f = (function(s,t){return ((s.getTime() + 62135604000000.000000) * q());});g = (function(s,t){return b(s, t);});h = (function(s,t){var u = i(t);var v = (j(m(u)) + 1.000000);var w = (v - s);var x = n(10.000000, w);return (o((t / x)) * x);});i = (function(s){return Math.abs(s);;});j = (function(s){return Math.floor(s);;});k = (function(s){return Math.LN10;;});l = (function(s){return Math.log(s);;});m = (function(s){return (l(s) / k());});n = (function(s,t){return Math.pow(s, t);;});o = (function(s){return Math.round(s);;});p = (function(s){return s;});q = (function(s){return 10000.000000;});r = (function(s,t){return s;});var s = a(2014, 9, 11);var t = p(0.000000);var u = b(s, t);var v = f(u);var w = g(s, t);var x = f(w);if ((v == x)) {return h(5, x);}else{throw ("synonyms don\u0027t match");return null;} | |
***** FunScript.Tests.DateTimes.DateTime Subtraction with TimeSpan works(-1000.0d) | |
// Code: | |
var r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(s,t,u){return d(s, t, u, 0, 0, 0, 0, 2, 1);});b = (function(s,t){return c((s.getTime() - r(t)), e(s));});c = (function(s,t){var date = s == null ? new Date() : new Date(s); | |
if (isNaN(date)) { throw "The string was not recognized as a valid DateTime." } | |
date.kind = t; | |
return date;});d = (function(s,t,u,v,w,x,y,z,A){var date = z === A ? new Date(Date.UTC(s, t - 1, u, v, w, x, y)) : new Date(s, t - 1, u, v, w, x, y); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = z; | |
return date;});e = (function(s,t){return s.kind;});f = (function(s,t){return ((s.getTime() + 62135604000000.000000) * q());});g = (function(s,t){return b(s, t);});h = (function(s,t){var u = i(t);var v = (j(m(u)) + 1.000000);var w = (v - s);var x = n(10.000000, w);return (o((t / x)) * x);});i = (function(s){return Math.abs(s);;});j = (function(s){return Math.floor(s);;});k = (function(s){return Math.LN10;;});l = (function(s){return Math.log(s);;});m = (function(s){return (l(s) / k());});n = (function(s,t){return Math.pow(s, t);;});o = (function(s){return Math.round(s);;});p = (function(s){return s;});q = (function(s){return 10000.000000;});r = (function(s,t){return s;});var s = a(2014, 9, 11);var t = p(-1000.000000);var u = b(s, t);var v = f(u);var w = g(s, t);var x = f(w);if ((v == x)) {return h(5, x);}else{throw ("synonyms don\u0027t match");return null;} | |
***** FunScript.Tests.DateTimes.DateTime Subtraction with TimeSpan works(1000.0d) | |
// Code: | |
var r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(s,t,u){return d(s, t, u, 0, 0, 0, 0, 2, 1);});b = (function(s,t){return c((s.getTime() - r(t)), e(s));});c = (function(s,t){var date = s == null ? new Date() : new Date(s); | |
if (isNaN(date)) { throw "The string was not recognized as a valid DateTime." } | |
date.kind = t; | |
return date;});d = (function(s,t,u,v,w,x,y,z,A){var date = z === A ? new Date(Date.UTC(s, t - 1, u, v, w, x, y)) : new Date(s, t - 1, u, v, w, x, y); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = z; | |
return date;});e = (function(s,t){return s.kind;});f = (function(s,t){return ((s.getTime() + 62135604000000.000000) * q());});g = (function(s,t){return b(s, t);});h = (function(s,t){var u = i(t);var v = (j(m(u)) + 1.000000);var w = (v - s);var x = n(10.000000, w);return (o((t / x)) * x);});i = (function(s){return Math.abs(s);;});j = (function(s){return Math.floor(s);;});k = (function(s){return Math.LN10;;});l = (function(s){return Math.log(s);;});m = (function(s){return (l(s) / k());});n = (function(s,t){return Math.pow(s, t);;});o = (function(s){return Math.round(s);;});p = (function(s){return s;});q = (function(s){return 10000.000000;});r = (function(s,t){return s;});var s = a(2014, 9, 11);var t = p(1000.000000);var u = b(s, t);var v = f(u);var w = g(s, t);var x = f(w);if ((v == x)) {return h(5, x);}else{throw ("synonyms don\u0027t match");return null;} | |
***** FunScript.Tests.DateTimes.DateTime.AddDays works(0.0d) | |
// Code: | |
var o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(p,q){return c((p.getTime() + (q * 86400000.000000)), e(p));});b = (function(p,q,r){return d(p, q, r, 0, 0, 0, 0, 2, 1);});c = (function(p,q){var date = p == null ? new Date() : new Date(p); | |
if (isNaN(date)) { throw "The string was not recognized as a valid DateTime." } | |
date.kind = q; | |
return date;});d = (function(p,q,r,s,t,u,v,w,x){var date = w === x ? new Date(Date.UTC(p, q - 1, r, s, t, u, v)) : new Date(p, q - 1, r, s, t, u, v); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = w; | |
return date;});e = (function(p,q){return p.kind;});f = (function(p,q){return ((p.getTime() + 62135604000000.000000) * o());});g = (function(p,q){var r = h(q);var s = (i(l(r)) + 1.000000);var t = (s - p);var u = m(10.000000, t);return (n((q / u)) * u);});h = (function(p){return Math.abs(p);;});i = (function(p){return Math.floor(p);;});j = (function(p){return Math.LN10;;});k = (function(p){return Math.log(p);;});l = (function(p){return (k(p) / j());});m = (function(p,q){return Math.pow(p, q);;});n = (function(p){return Math.round(p);;});o = (function(p){return 10000.000000;});var p = b(2014, 9, 11);var q = a(p, 0.000000);return g(5, f(q)) | |
***** FunScript.Tests.DateTimes.DateTime.AddDays works(-100.0d) | |
// Code: | |
var o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(p,q){return c((p.getTime() + (q * 86400000.000000)), e(p));});b = (function(p,q,r){return d(p, q, r, 0, 0, 0, 0, 2, 1);});c = (function(p,q){var date = p == null ? new Date() : new Date(p); | |
if (isNaN(date)) { throw "The string was not recognized as a valid DateTime." } | |
date.kind = q; | |
return date;});d = (function(p,q,r,s,t,u,v,w,x){var date = w === x ? new Date(Date.UTC(p, q - 1, r, s, t, u, v)) : new Date(p, q - 1, r, s, t, u, v); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = w; | |
return date;});e = (function(p,q){return p.kind;});f = (function(p,q){return ((p.getTime() + 62135604000000.000000) * o());});g = (function(p,q){var r = h(q);var s = (i(l(r)) + 1.000000);var t = (s - p);var u = m(10.000000, t);return (n((q / u)) * u);});h = (function(p){return Math.abs(p);;});i = (function(p){return Math.floor(p);;});j = (function(p){return Math.LN10;;});k = (function(p){return Math.log(p);;});l = (function(p){return (k(p) / j());});m = (function(p,q){return Math.pow(p, q);;});n = (function(p){return Math.round(p);;});o = (function(p){return 10000.000000;});var p = b(2014, 9, 11);var q = a(p, -100.000000);return g(5, f(q)) | |
***** FunScript.Tests.DateTimes.DateTime.AddDays works(100.0d) | |
// Code: | |
var o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(p,q){return c((p.getTime() + (q * 86400000.000000)), e(p));});b = (function(p,q,r){return d(p, q, r, 0, 0, 0, 0, 2, 1);});c = (function(p,q){var date = p == null ? new Date() : new Date(p); | |
if (isNaN(date)) { throw "The string was not recognized as a valid DateTime." } | |
date.kind = q; | |
return date;});d = (function(p,q,r,s,t,u,v,w,x){var date = w === x ? new Date(Date.UTC(p, q - 1, r, s, t, u, v)) : new Date(p, q - 1, r, s, t, u, v); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = w; | |
return date;});e = (function(p,q){return p.kind;});f = (function(p,q){return ((p.getTime() + 62135604000000.000000) * o());});g = (function(p,q){var r = h(q);var s = (i(l(r)) + 1.000000);var t = (s - p);var u = m(10.000000, t);return (n((q / u)) * u);});h = (function(p){return Math.abs(p);;});i = (function(p){return Math.floor(p);;});j = (function(p){return Math.LN10;;});k = (function(p){return Math.log(p);;});l = (function(p){return (k(p) / j());});m = (function(p,q){return Math.pow(p, q);;});n = (function(p){return Math.round(p);;});o = (function(p){return 10000.000000;});var p = b(2014, 9, 11);var q = a(p, 100.000000);return g(5, f(q)) | |
***** FunScript.Tests.DateTimes.DateTime.AddHours works(0.0d) | |
// Code: | |
var o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(p,q){return c((p.getTime() + (q * 3600000.000000)), e(p));});b = (function(p,q,r){return d(p, q, r, 0, 0, 0, 0, 2, 1);});c = (function(p,q){var date = p == null ? new Date() : new Date(p); | |
if (isNaN(date)) { throw "The string was not recognized as a valid DateTime." } | |
date.kind = q; | |
return date;});d = (function(p,q,r,s,t,u,v,w,x){var date = w === x ? new Date(Date.UTC(p, q - 1, r, s, t, u, v)) : new Date(p, q - 1, r, s, t, u, v); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = w; | |
return date;});e = (function(p,q){return p.kind;});f = (function(p,q){return ((p.getTime() + 62135604000000.000000) * o());});g = (function(p,q){var r = h(q);var s = (i(l(r)) + 1.000000);var t = (s - p);var u = m(10.000000, t);return (n((q / u)) * u);});h = (function(p){return Math.abs(p);;});i = (function(p){return Math.floor(p);;});j = (function(p){return Math.LN10;;});k = (function(p){return Math.log(p);;});l = (function(p){return (k(p) / j());});m = (function(p,q){return Math.pow(p, q);;});n = (function(p){return Math.round(p);;});o = (function(p){return 10000.000000;});var p = b(2014, 9, 11);var q = a(p, 0.000000);return g(5, f(q)) | |
***** FunScript.Tests.DateTimes.DateTime.AddHours works(-100.0d) | |
// Code: | |
var o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(p,q){return c((p.getTime() + (q * 3600000.000000)), e(p));});b = (function(p,q,r){return d(p, q, r, 0, 0, 0, 0, 2, 1);});c = (function(p,q){var date = p == null ? new Date() : new Date(p); | |
if (isNaN(date)) { throw "The string was not recognized as a valid DateTime." } | |
date.kind = q; | |
return date;});d = (function(p,q,r,s,t,u,v,w,x){var date = w === x ? new Date(Date.UTC(p, q - 1, r, s, t, u, v)) : new Date(p, q - 1, r, s, t, u, v); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = w; | |
return date;});e = (function(p,q){return p.kind;});f = (function(p,q){return ((p.getTime() + 62135604000000.000000) * o());});g = (function(p,q){var r = h(q);var s = (i(l(r)) + 1.000000);var t = (s - p);var u = m(10.000000, t);return (n((q / u)) * u);});h = (function(p){return Math.abs(p);;});i = (function(p){return Math.floor(p);;});j = (function(p){return Math.LN10;;});k = (function(p){return Math.log(p);;});l = (function(p){return (k(p) / j());});m = (function(p,q){return Math.pow(p, q);;});n = (function(p){return Math.round(p);;});o = (function(p){return 10000.000000;});var p = b(2014, 9, 11);var q = a(p, -100.000000);return g(5, f(q)) | |
***** FunScript.Tests.DateTimes.DateTime.AddHours works(100.0d) | |
// Code: | |
var o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(p,q){return c((p.getTime() + (q * 3600000.000000)), e(p));});b = (function(p,q,r){return d(p, q, r, 0, 0, 0, 0, 2, 1);});c = (function(p,q){var date = p == null ? new Date() : new Date(p); | |
if (isNaN(date)) { throw "The string was not recognized as a valid DateTime." } | |
date.kind = q; | |
return date;});d = (function(p,q,r,s,t,u,v,w,x){var date = w === x ? new Date(Date.UTC(p, q - 1, r, s, t, u, v)) : new Date(p, q - 1, r, s, t, u, v); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = w; | |
return date;});e = (function(p,q){return p.kind;});f = (function(p,q){return ((p.getTime() + 62135604000000.000000) * o());});g = (function(p,q){var r = h(q);var s = (i(l(r)) + 1.000000);var t = (s - p);var u = m(10.000000, t);return (n((q / u)) * u);});h = (function(p){return Math.abs(p);;});i = (function(p){return Math.floor(p);;});j = (function(p){return Math.LN10;;});k = (function(p){return Math.log(p);;});l = (function(p){return (k(p) / j());});m = (function(p,q){return Math.pow(p, q);;});n = (function(p){return Math.round(p);;});o = (function(p){return 10000.000000;});var p = b(2014, 9, 11);var q = a(p, 100.000000);return g(5, f(q)) | |
***** FunScript.Tests.DateTimes.DateTime.AddMilliseconds works(0.0d) | |
// Code: | |
var o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(p,q){return c((p.getTime() + q), e(p));});b = (function(p,q,r){return d(p, q, r, 0, 0, 0, 0, 2, 1);});c = (function(p,q){var date = p == null ? new Date() : new Date(p); | |
if (isNaN(date)) { throw "The string was not recognized as a valid DateTime." } | |
date.kind = q; | |
return date;});d = (function(p,q,r,s,t,u,v,w,x){var date = w === x ? new Date(Date.UTC(p, q - 1, r, s, t, u, v)) : new Date(p, q - 1, r, s, t, u, v); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = w; | |
return date;});e = (function(p,q){return p.kind;});f = (function(p,q){return ((p.getTime() + 62135604000000.000000) * o());});g = (function(p,q){var r = h(q);var s = (i(l(r)) + 1.000000);var t = (s - p);var u = m(10.000000, t);return (n((q / u)) * u);});h = (function(p){return Math.abs(p);;});i = (function(p){return Math.floor(p);;});j = (function(p){return Math.LN10;;});k = (function(p){return Math.log(p);;});l = (function(p){return (k(p) / j());});m = (function(p,q){return Math.pow(p, q);;});n = (function(p){return Math.round(p);;});o = (function(p){return 10000.000000;});var p = b(2014, 9, 11);var q = a(p, 0.000000);return g(5, f(q)) | |
***** FunScript.Tests.DateTimes.DateTime.AddMilliseconds works(-100.0d) | |
// Code: | |
var o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(p,q){return c((p.getTime() + q), e(p));});b = (function(p,q,r){return d(p, q, r, 0, 0, 0, 0, 2, 1);});c = (function(p,q){var date = p == null ? new Date() : new Date(p); | |
if (isNaN(date)) { throw "The string was not recognized as a valid DateTime." } | |
date.kind = q; | |
return date;});d = (function(p,q,r,s,t,u,v,w,x){var date = w === x ? new Date(Date.UTC(p, q - 1, r, s, t, u, v)) : new Date(p, q - 1, r, s, t, u, v); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = w; | |
return date;});e = (function(p,q){return p.kind;});f = (function(p,q){return ((p.getTime() + 62135604000000.000000) * o());});g = (function(p,q){var r = h(q);var s = (i(l(r)) + 1.000000);var t = (s - p);var u = m(10.000000, t);return (n((q / u)) * u);});h = (function(p){return Math.abs(p);;});i = (function(p){return Math.floor(p);;});j = (function(p){return Math.LN10;;});k = (function(p){return Math.log(p);;});l = (function(p){return (k(p) / j());});m = (function(p,q){return Math.pow(p, q);;});n = (function(p){return Math.round(p);;});o = (function(p){return 10000.000000;});var p = b(2014, 9, 11);var q = a(p, -100.000000);return g(5, f(q)) | |
***** FunScript.Tests.DateTimes.DateTime.AddMilliseconds works(100.0d) | |
// Code: | |
var o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(p,q){return c((p.getTime() + q), e(p));});b = (function(p,q,r){return d(p, q, r, 0, 0, 0, 0, 2, 1);});c = (function(p,q){var date = p == null ? new Date() : new Date(p); | |
if (isNaN(date)) { throw "The string was not recognized as a valid DateTime." } | |
date.kind = q; | |
return date;});d = (function(p,q,r,s,t,u,v,w,x){var date = w === x ? new Date(Date.UTC(p, q - 1, r, s, t, u, v)) : new Date(p, q - 1, r, s, t, u, v); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = w; | |
return date;});e = (function(p,q){return p.kind;});f = (function(p,q){return ((p.getTime() + 62135604000000.000000) * o());});g = (function(p,q){var r = h(q);var s = (i(l(r)) + 1.000000);var t = (s - p);var u = m(10.000000, t);return (n((q / u)) * u);});h = (function(p){return Math.abs(p);;});i = (function(p){return Math.floor(p);;});j = (function(p){return Math.LN10;;});k = (function(p){return Math.log(p);;});l = (function(p){return (k(p) / j());});m = (function(p,q){return Math.pow(p, q);;});n = (function(p){return Math.round(p);;});o = (function(p){return 10000.000000;});var p = b(2014, 9, 11);var q = a(p, 100.000000);return g(5, f(q)) | |
***** FunScript.Tests.DateTimes.DateTime.AddMinutes works(0.0d) | |
// Code: | |
var o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(p,q){return c((p.getTime() + (q * 60000.000000)), e(p));});b = (function(p,q,r){return d(p, q, r, 0, 0, 0, 0, 2, 1);});c = (function(p,q){var date = p == null ? new Date() : new Date(p); | |
if (isNaN(date)) { throw "The string was not recognized as a valid DateTime." } | |
date.kind = q; | |
return date;});d = (function(p,q,r,s,t,u,v,w,x){var date = w === x ? new Date(Date.UTC(p, q - 1, r, s, t, u, v)) : new Date(p, q - 1, r, s, t, u, v); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = w; | |
return date;});e = (function(p,q){return p.kind;});f = (function(p,q){return ((p.getTime() + 62135604000000.000000) * o());});g = (function(p,q){var r = h(q);var s = (i(l(r)) + 1.000000);var t = (s - p);var u = m(10.000000, t);return (n((q / u)) * u);});h = (function(p){return Math.abs(p);;});i = (function(p){return Math.floor(p);;});j = (function(p){return Math.LN10;;});k = (function(p){return Math.log(p);;});l = (function(p){return (k(p) / j());});m = (function(p,q){return Math.pow(p, q);;});n = (function(p){return Math.round(p);;});o = (function(p){return 10000.000000;});var p = b(2014, 9, 11);var q = a(p, 0.000000);return g(5, f(q)) | |
***** FunScript.Tests.DateTimes.DateTime.AddMinutes works(-100.0d) | |
// Code: | |
var o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(p,q){return c((p.getTime() + (q * 60000.000000)), e(p));});b = (function(p,q,r){return d(p, q, r, 0, 0, 0, 0, 2, 1);});c = (function(p,q){var date = p == null ? new Date() : new Date(p); | |
if (isNaN(date)) { throw "The string was not recognized as a valid DateTime." } | |
date.kind = q; | |
return date;});d = (function(p,q,r,s,t,u,v,w,x){var date = w === x ? new Date(Date.UTC(p, q - 1, r, s, t, u, v)) : new Date(p, q - 1, r, s, t, u, v); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = w; | |
return date;});e = (function(p,q){return p.kind;});f = (function(p,q){return ((p.getTime() + 62135604000000.000000) * o());});g = (function(p,q){var r = h(q);var s = (i(l(r)) + 1.000000);var t = (s - p);var u = m(10.000000, t);return (n((q / u)) * u);});h = (function(p){return Math.abs(p);;});i = (function(p){return Math.floor(p);;});j = (function(p){return Math.LN10;;});k = (function(p){return Math.log(p);;});l = (function(p){return (k(p) / j());});m = (function(p,q){return Math.pow(p, q);;});n = (function(p){return Math.round(p);;});o = (function(p){return 10000.000000;});var p = b(2014, 9, 11);var q = a(p, -100.000000);return g(5, f(q)) | |
***** FunScript.Tests.DateTimes.DateTime.AddMinutes works(100.0d) | |
// Code: | |
var o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(p,q){return c((p.getTime() + (q * 60000.000000)), e(p));});b = (function(p,q,r){return d(p, q, r, 0, 0, 0, 0, 2, 1);});c = (function(p,q){var date = p == null ? new Date() : new Date(p); | |
if (isNaN(date)) { throw "The string was not recognized as a valid DateTime." } | |
date.kind = q; | |
return date;});d = (function(p,q,r,s,t,u,v,w,x){var date = w === x ? new Date(Date.UTC(p, q - 1, r, s, t, u, v)) : new Date(p, q - 1, r, s, t, u, v); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = w; | |
return date;});e = (function(p,q){return p.kind;});f = (function(p,q){return ((p.getTime() + 62135604000000.000000) * o());});g = (function(p,q){var r = h(q);var s = (i(l(r)) + 1.000000);var t = (s - p);var u = m(10.000000, t);return (n((q / u)) * u);});h = (function(p){return Math.abs(p);;});i = (function(p){return Math.floor(p);;});j = (function(p){return Math.LN10;;});k = (function(p){return Math.log(p);;});l = (function(p){return (k(p) / j());});m = (function(p,q){return Math.pow(p, q);;});n = (function(p){return Math.round(p);;});o = (function(p){return 10000.000000;});var p = b(2014, 9, 11);var q = a(p, 100.000000);return g(5, f(q)) | |
***** FunScript.Tests.DateTimes.DateTime.AddMonths works(-100) | |
// Code: | |
var q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(r,s){var t = (m(r) + s);var u;if ((t > 12)) {var v = (t % 12);var w = p((t / 12.000000));u = (new q(v, w));}else{if ((t < 1)) {var x = (12 + (t % 12));var y;if ((x == 12)) {y = -1.000000;}else{y = 0.000000;};var z = (y + p((t / 12.000000)));u = (new q(x, z));}else{u = (new q(t, 0.000000));};};var A = u;var B = A.Items[1.000000];var C = A.Items[0.000000];var D = (o(r) + B);var E = b(D, C);var F;if ((h(r) < E)) {F = h(r);}else{F = E;};var G = F;return e(D, C, G, i(r), l(r), n(r), k(r), j(r), 1);});b = (function(r,s){return f(r)[(s - 1)];});c = (function(r,s,t){return e(r, s, t, 0, 0, 0, 0, 2, 1);});d = (function(r){return ((r % 4 == 0) && (r % 100 != 0)) || (r % 400 == 0);});e = (function(r,s,t,u,v,w,x,y,z){var date = y === z ? new Date(Date.UTC(r, s - 1, t, u, v, w, x)) : new Date(r, s - 1, t, u, v, w, x); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = y; | |
return date;});f = (function(r){if (d(r)) {return [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];}else{return [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];};});g = (function(r,s,t){return r.kind == t ? r['getUTC'+s]() : r['get'+s]();});h = (function(r,s){return g(r, "Date", 1);});i = (function(r,s){return g(r, "Hours", 1);});j = (function(r,s){return r.kind;});k = (function(r,s){return g(r, "Milliseconds", 1);});l = (function(r,s){return g(r, "Minutes", 1);});m = (function(r,s){return (g(r, "Month", 1) + 1);});n = (function(r,s){return g(r, "Seconds", 1);});o = (function(r,s){return g(r, "FullYear", 1);});p = (function(r){return Math.floor(r);;});q = (function(Item0,Item1){var t = this;t.Items = [Item0, Item1];});var r = c(2016, 1, 31);var s = a(r, -100);return ((o(s) + m(s)) + h(s)) | |
***** FunScript.Tests.DateTimes.DateTime.AddMonths works(-20) | |
// Code: | |
var q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(r,s){var t = (m(r) + s);var u;if ((t > 12)) {var v = (t % 12);var w = p((t / 12.000000));u = (new q(v, w));}else{if ((t < 1)) {var x = (12 + (t % 12));var y;if ((x == 12)) {y = -1.000000;}else{y = 0.000000;};var z = (y + p((t / 12.000000)));u = (new q(x, z));}else{u = (new q(t, 0.000000));};};var A = u;var B = A.Items[1.000000];var C = A.Items[0.000000];var D = (o(r) + B);var E = b(D, C);var F;if ((h(r) < E)) {F = h(r);}else{F = E;};var G = F;return e(D, C, G, i(r), l(r), n(r), k(r), j(r), 1);});b = (function(r,s){return f(r)[(s - 1)];});c = (function(r,s,t){return e(r, s, t, 0, 0, 0, 0, 2, 1);});d = (function(r){return ((r % 4 == 0) && (r % 100 != 0)) || (r % 400 == 0);});e = (function(r,s,t,u,v,w,x,y,z){var date = y === z ? new Date(Date.UTC(r, s - 1, t, u, v, w, x)) : new Date(r, s - 1, t, u, v, w, x); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = y; | |
return date;});f = (function(r){if (d(r)) {return [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];}else{return [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];};});g = (function(r,s,t){return r.kind == t ? r['getUTC'+s]() : r['get'+s]();});h = (function(r,s){return g(r, "Date", 1);});i = (function(r,s){return g(r, "Hours", 1);});j = (function(r,s){return r.kind;});k = (function(r,s){return g(r, "Milliseconds", 1);});l = (function(r,s){return g(r, "Minutes", 1);});m = (function(r,s){return (g(r, "Month", 1) + 1);});n = (function(r,s){return g(r, "Seconds", 1);});o = (function(r,s){return g(r, "FullYear", 1);});p = (function(r){return Math.floor(r);;});q = (function(Item0,Item1){var t = this;t.Items = [Item0, Item1];});var r = c(2016, 1, 31);var s = a(r, -20);return ((o(s) + m(s)) + h(s)) | |
***** FunScript.Tests.DateTimes.DateTime.AddMonths works(-5) | |
// Code: | |
var q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(r,s){var t = (m(r) + s);var u;if ((t > 12)) {var v = (t % 12);var w = p((t / 12.000000));u = (new q(v, w));}else{if ((t < 1)) {var x = (12 + (t % 12));var y;if ((x == 12)) {y = -1.000000;}else{y = 0.000000;};var z = (y + p((t / 12.000000)));u = (new q(x, z));}else{u = (new q(t, 0.000000));};};var A = u;var B = A.Items[1.000000];var C = A.Items[0.000000];var D = (o(r) + B);var E = b(D, C);var F;if ((h(r) < E)) {F = h(r);}else{F = E;};var G = F;return e(D, C, G, i(r), l(r), n(r), k(r), j(r), 1);});b = (function(r,s){return f(r)[(s - 1)];});c = (function(r,s,t){return e(r, s, t, 0, 0, 0, 0, 2, 1);});d = (function(r){return ((r % 4 == 0) && (r % 100 != 0)) || (r % 400 == 0);});e = (function(r,s,t,u,v,w,x,y,z){var date = y === z ? new Date(Date.UTC(r, s - 1, t, u, v, w, x)) : new Date(r, s - 1, t, u, v, w, x); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = y; | |
return date;});f = (function(r){if (d(r)) {return [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];}else{return [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];};});g = (function(r,s,t){return r.kind == t ? r['getUTC'+s]() : r['get'+s]();});h = (function(r,s){return g(r, "Date", 1);});i = (function(r,s){return g(r, "Hours", 1);});j = (function(r,s){return r.kind;});k = (function(r,s){return g(r, "Milliseconds", 1);});l = (function(r,s){return g(r, "Minutes", 1);});m = (function(r,s){return (g(r, "Month", 1) + 1);});n = (function(r,s){return g(r, "Seconds", 1);});o = (function(r,s){return g(r, "FullYear", 1);});p = (function(r){return Math.floor(r);;});q = (function(Item0,Item1){var t = this;t.Items = [Item0, Item1];});var r = c(2016, 1, 31);var s = a(r, -5);return ((o(s) + m(s)) + h(s)) | |
***** FunScript.Tests.DateTimes.DateTime.AddMonths works(-1) | |
// Code: | |
var q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(r,s){var t = (m(r) + s);var u;if ((t > 12)) {var v = (t % 12);var w = p((t / 12.000000));u = (new q(v, w));}else{if ((t < 1)) {var x = (12 + (t % 12));var y;if ((x == 12)) {y = -1.000000;}else{y = 0.000000;};var z = (y + p((t / 12.000000)));u = (new q(x, z));}else{u = (new q(t, 0.000000));};};var A = u;var B = A.Items[1.000000];var C = A.Items[0.000000];var D = (o(r) + B);var E = b(D, C);var F;if ((h(r) < E)) {F = h(r);}else{F = E;};var G = F;return e(D, C, G, i(r), l(r), n(r), k(r), j(r), 1);});b = (function(r,s){return f(r)[(s - 1)];});c = (function(r,s,t){return e(r, s, t, 0, 0, 0, 0, 2, 1);});d = (function(r){return ((r % 4 == 0) && (r % 100 != 0)) || (r % 400 == 0);});e = (function(r,s,t,u,v,w,x,y,z){var date = y === z ? new Date(Date.UTC(r, s - 1, t, u, v, w, x)) : new Date(r, s - 1, t, u, v, w, x); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = y; | |
return date;});f = (function(r){if (d(r)) {return [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];}else{return [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];};});g = (function(r,s,t){return r.kind == t ? r['getUTC'+s]() : r['get'+s]();});h = (function(r,s){return g(r, "Date", 1);});i = (function(r,s){return g(r, "Hours", 1);});j = (function(r,s){return r.kind;});k = (function(r,s){return g(r, "Milliseconds", 1);});l = (function(r,s){return g(r, "Minutes", 1);});m = (function(r,s){return (g(r, "Month", 1) + 1);});n = (function(r,s){return g(r, "Seconds", 1);});o = (function(r,s){return g(r, "FullYear", 1);});p = (function(r){return Math.floor(r);;});q = (function(Item0,Item1){var t = this;t.Items = [Item0, Item1];});var r = c(2016, 1, 31);var s = a(r, -1);return ((o(s) + m(s)) + h(s)) | |
***** FunScript.Tests.DateTimes.DateTime.AddMonths works(0) | |
// Code: | |
var q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(r,s){var t = (m(r) + s);var u;if ((t > 12)) {var v = (t % 12);var w = p((t / 12.000000));u = (new q(v, w));}else{if ((t < 1)) {var x = (12 + (t % 12));var y;if ((x == 12)) {y = -1.000000;}else{y = 0.000000;};var z = (y + p((t / 12.000000)));u = (new q(x, z));}else{u = (new q(t, 0.000000));};};var A = u;var B = A.Items[1.000000];var C = A.Items[0.000000];var D = (o(r) + B);var E = b(D, C);var F;if ((h(r) < E)) {F = h(r);}else{F = E;};var G = F;return e(D, C, G, i(r), l(r), n(r), k(r), j(r), 1);});b = (function(r,s){return f(r)[(s - 1)];});c = (function(r,s,t){return e(r, s, t, 0, 0, 0, 0, 2, 1);});d = (function(r){return ((r % 4 == 0) && (r % 100 != 0)) || (r % 400 == 0);});e = (function(r,s,t,u,v,w,x,y,z){var date = y === z ? new Date(Date.UTC(r, s - 1, t, u, v, w, x)) : new Date(r, s - 1, t, u, v, w, x); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = y; | |
return date;});f = (function(r){if (d(r)) {return [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];}else{return [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];};});g = (function(r,s,t){return r.kind == t ? r['getUTC'+s]() : r['get'+s]();});h = (function(r,s){return g(r, "Date", 1);});i = (function(r,s){return g(r, "Hours", 1);});j = (function(r,s){return r.kind;});k = (function(r,s){return g(r, "Milliseconds", 1);});l = (function(r,s){return g(r, "Minutes", 1);});m = (function(r,s){return (g(r, "Month", 1) + 1);});n = (function(r,s){return g(r, "Seconds", 1);});o = (function(r,s){return g(r, "FullYear", 1);});p = (function(r){return Math.floor(r);;});q = (function(Item0,Item1){var t = this;t.Items = [Item0, Item1];});var r = c(2016, 1, 31);var s = a(r, 0);return ((o(s) + m(s)) + h(s)) | |
***** FunScript.Tests.DateTimes.DateTime.AddMonths works(1) | |
// Code: | |
var q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(r,s){var t = (m(r) + s);var u;if ((t > 12)) {var v = (t % 12);var w = p((t / 12.000000));u = (new q(v, w));}else{if ((t < 1)) {var x = (12 + (t % 12));var y;if ((x == 12)) {y = -1.000000;}else{y = 0.000000;};var z = (y + p((t / 12.000000)));u = (new q(x, z));}else{u = (new q(t, 0.000000));};};var A = u;var B = A.Items[1.000000];var C = A.Items[0.000000];var D = (o(r) + B);var E = b(D, C);var F;if ((h(r) < E)) {F = h(r);}else{F = E;};var G = F;return e(D, C, G, i(r), l(r), n(r), k(r), j(r), 1);});b = (function(r,s){return f(r)[(s - 1)];});c = (function(r,s,t){return e(r, s, t, 0, 0, 0, 0, 2, 1);});d = (function(r){return ((r % 4 == 0) && (r % 100 != 0)) || (r % 400 == 0);});e = (function(r,s,t,u,v,w,x,y,z){var date = y === z ? new Date(Date.UTC(r, s - 1, t, u, v, w, x)) : new Date(r, s - 1, t, u, v, w, x); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = y; | |
return date;});f = (function(r){if (d(r)) {return [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];}else{return [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];};});g = (function(r,s,t){return r.kind == t ? r['getUTC'+s]() : r['get'+s]();});h = (function(r,s){return g(r, "Date", 1);});i = (function(r,s){return g(r, "Hours", 1);});j = (function(r,s){return r.kind;});k = (function(r,s){return g(r, "Milliseconds", 1);});l = (function(r,s){return g(r, "Minutes", 1);});m = (function(r,s){return (g(r, "Month", 1) + 1);});n = (function(r,s){return g(r, "Seconds", 1);});o = (function(r,s){return g(r, "FullYear", 1);});p = (function(r){return Math.floor(r);;});q = (function(Item0,Item1){var t = this;t.Items = [Item0, Item1];});var r = c(2016, 1, 31);var s = a(r, 1);return ((o(s) + m(s)) + h(s)) | |
***** FunScript.Tests.DateTimes.DateTime.AddMonths works(5) | |
// Code: | |
var q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(r,s){var t = (m(r) + s);var u;if ((t > 12)) {var v = (t % 12);var w = p((t / 12.000000));u = (new q(v, w));}else{if ((t < 1)) {var x = (12 + (t % 12));var y;if ((x == 12)) {y = -1.000000;}else{y = 0.000000;};var z = (y + p((t / 12.000000)));u = (new q(x, z));}else{u = (new q(t, 0.000000));};};var A = u;var B = A.Items[1.000000];var C = A.Items[0.000000];var D = (o(r) + B);var E = b(D, C);var F;if ((h(r) < E)) {F = h(r);}else{F = E;};var G = F;return e(D, C, G, i(r), l(r), n(r), k(r), j(r), 1);});b = (function(r,s){return f(r)[(s - 1)];});c = (function(r,s,t){return e(r, s, t, 0, 0, 0, 0, 2, 1);});d = (function(r){return ((r % 4 == 0) && (r % 100 != 0)) || (r % 400 == 0);});e = (function(r,s,t,u,v,w,x,y,z){var date = y === z ? new Date(Date.UTC(r, s - 1, t, u, v, w, x)) : new Date(r, s - 1, t, u, v, w, x); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = y; | |
return date;});f = (function(r){if (d(r)) {return [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];}else{return [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];};});g = (function(r,s,t){return r.kind == t ? r['getUTC'+s]() : r['get'+s]();});h = (function(r,s){return g(r, "Date", 1);});i = (function(r,s){return g(r, "Hours", 1);});j = (function(r,s){return r.kind;});k = (function(r,s){return g(r, "Milliseconds", 1);});l = (function(r,s){return g(r, "Minutes", 1);});m = (function(r,s){return (g(r, "Month", 1) + 1);});n = (function(r,s){return g(r, "Seconds", 1);});o = (function(r,s){return g(r, "FullYear", 1);});p = (function(r){return Math.floor(r);;});q = (function(Item0,Item1){var t = this;t.Items = [Item0, Item1];});var r = c(2016, 1, 31);var s = a(r, 5);return ((o(s) + m(s)) + h(s)) | |
***** FunScript.Tests.DateTimes.DateTime.AddMonths works(6) | |
// Code: | |
var q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(r,s){var t = (m(r) + s);var u;if ((t > 12)) {var v = (t % 12);var w = p((t / 12.000000));u = (new q(v, w));}else{if ((t < 1)) {var x = (12 + (t % 12));var y;if ((x == 12)) {y = -1.000000;}else{y = 0.000000;};var z = (y + p((t / 12.000000)));u = (new q(x, z));}else{u = (new q(t, 0.000000));};};var A = u;var B = A.Items[1.000000];var C = A.Items[0.000000];var D = (o(r) + B);var E = b(D, C);var F;if ((h(r) < E)) {F = h(r);}else{F = E;};var G = F;return e(D, C, G, i(r), l(r), n(r), k(r), j(r), 1);});b = (function(r,s){return f(r)[(s - 1)];});c = (function(r,s,t){return e(r, s, t, 0, 0, 0, 0, 2, 1);});d = (function(r){return ((r % 4 == 0) && (r % 100 != 0)) || (r % 400 == 0);});e = (function(r,s,t,u,v,w,x,y,z){var date = y === z ? new Date(Date.UTC(r, s - 1, t, u, v, w, x)) : new Date(r, s - 1, t, u, v, w, x); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = y; | |
return date;});f = (function(r){if (d(r)) {return [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];}else{return [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];};});g = (function(r,s,t){return r.kind == t ? r['getUTC'+s]() : r['get'+s]();});h = (function(r,s){return g(r, "Date", 1);});i = (function(r,s){return g(r, "Hours", 1);});j = (function(r,s){return r.kind;});k = (function(r,s){return g(r, "Milliseconds", 1);});l = (function(r,s){return g(r, "Minutes", 1);});m = (function(r,s){return (g(r, "Month", 1) + 1);});n = (function(r,s){return g(r, "Seconds", 1);});o = (function(r,s){return g(r, "FullYear", 1);});p = (function(r){return Math.floor(r);;});q = (function(Item0,Item1){var t = this;t.Items = [Item0, Item1];});var r = c(2016, 1, 31);var s = a(r, 6);return ((o(s) + m(s)) + h(s)) | |
***** FunScript.Tests.DateTimes.DateTime.AddMonths works(20) | |
// Code: | |
var q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(r,s){var t = (m(r) + s);var u;if ((t > 12)) {var v = (t % 12);var w = p((t / 12.000000));u = (new q(v, w));}else{if ((t < 1)) {var x = (12 + (t % 12));var y;if ((x == 12)) {y = -1.000000;}else{y = 0.000000;};var z = (y + p((t / 12.000000)));u = (new q(x, z));}else{u = (new q(t, 0.000000));};};var A = u;var B = A.Items[1.000000];var C = A.Items[0.000000];var D = (o(r) + B);var E = b(D, C);var F;if ((h(r) < E)) {F = h(r);}else{F = E;};var G = F;return e(D, C, G, i(r), l(r), n(r), k(r), j(r), 1);});b = (function(r,s){return f(r)[(s - 1)];});c = (function(r,s,t){return e(r, s, t, 0, 0, 0, 0, 2, 1);});d = (function(r){return ((r % 4 == 0) && (r % 100 != 0)) || (r % 400 == 0);});e = (function(r,s,t,u,v,w,x,y,z){var date = y === z ? new Date(Date.UTC(r, s - 1, t, u, v, w, x)) : new Date(r, s - 1, t, u, v, w, x); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = y; | |
return date;});f = (function(r){if (d(r)) {return [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];}else{return [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];};});g = (function(r,s,t){return r.kind == t ? r['getUTC'+s]() : r['get'+s]();});h = (function(r,s){return g(r, "Date", 1);});i = (function(r,s){return g(r, "Hours", 1);});j = (function(r,s){return r.kind;});k = (function(r,s){return g(r, "Milliseconds", 1);});l = (function(r,s){return g(r, "Minutes", 1);});m = (function(r,s){return (g(r, "Month", 1) + 1);});n = (function(r,s){return g(r, "Seconds", 1);});o = (function(r,s){return g(r, "FullYear", 1);});p = (function(r){return Math.floor(r);;});q = (function(Item0,Item1){var t = this;t.Items = [Item0, Item1];});var r = c(2016, 1, 31);var s = a(r, 20);return ((o(s) + m(s)) + h(s)) | |
***** FunScript.Tests.DateTimes.DateTime.AddMonths works(100) | |
// Code: | |
var q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(r,s){var t = (m(r) + s);var u;if ((t > 12)) {var v = (t % 12);var w = p((t / 12.000000));u = (new q(v, w));}else{if ((t < 1)) {var x = (12 + (t % 12));var y;if ((x == 12)) {y = -1.000000;}else{y = 0.000000;};var z = (y + p((t / 12.000000)));u = (new q(x, z));}else{u = (new q(t, 0.000000));};};var A = u;var B = A.Items[1.000000];var C = A.Items[0.000000];var D = (o(r) + B);var E = b(D, C);var F;if ((h(r) < E)) {F = h(r);}else{F = E;};var G = F;return e(D, C, G, i(r), l(r), n(r), k(r), j(r), 1);});b = (function(r,s){return f(r)[(s - 1)];});c = (function(r,s,t){return e(r, s, t, 0, 0, 0, 0, 2, 1);});d = (function(r){return ((r % 4 == 0) && (r % 100 != 0)) || (r % 400 == 0);});e = (function(r,s,t,u,v,w,x,y,z){var date = y === z ? new Date(Date.UTC(r, s - 1, t, u, v, w, x)) : new Date(r, s - 1, t, u, v, w, x); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = y; | |
return date;});f = (function(r){if (d(r)) {return [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];}else{return [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];};});g = (function(r,s,t){return r.kind == t ? r['getUTC'+s]() : r['get'+s]();});h = (function(r,s){return g(r, "Date", 1);});i = (function(r,s){return g(r, "Hours", 1);});j = (function(r,s){return r.kind;});k = (function(r,s){return g(r, "Milliseconds", 1);});l = (function(r,s){return g(r, "Minutes", 1);});m = (function(r,s){return (g(r, "Month", 1) + 1);});n = (function(r,s){return g(r, "Seconds", 1);});o = (function(r,s){return g(r, "FullYear", 1);});p = (function(r){return Math.floor(r);;});q = (function(Item0,Item1){var t = this;t.Items = [Item0, Item1];});var r = c(2016, 1, 31);var s = a(r, 100);return ((o(s) + m(s)) + h(s)) | |
***** FunScript.Tests.DateTimes.DateTime.AddSeconds works(0.0d) | |
// Code: | |
var o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(p,q){return c((p.getTime() + (q * 1000.000000)), e(p));});b = (function(p,q,r){return d(p, q, r, 0, 0, 0, 0, 2, 1);});c = (function(p,q){var date = p == null ? new Date() : new Date(p); | |
if (isNaN(date)) { throw "The string was not recognized as a valid DateTime." } | |
date.kind = q; | |
return date;});d = (function(p,q,r,s,t,u,v,w,x){var date = w === x ? new Date(Date.UTC(p, q - 1, r, s, t, u, v)) : new Date(p, q - 1, r, s, t, u, v); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = w; | |
return date;});e = (function(p,q){return p.kind;});f = (function(p,q){return ((p.getTime() + 62135604000000.000000) * o());});g = (function(p,q){var r = h(q);var s = (i(l(r)) + 1.000000);var t = (s - p);var u = m(10.000000, t);return (n((q / u)) * u);});h = (function(p){return Math.abs(p);;});i = (function(p){return Math.floor(p);;});j = (function(p){return Math.LN10;;});k = (function(p){return Math.log(p);;});l = (function(p){return (k(p) / j());});m = (function(p,q){return Math.pow(p, q);;});n = (function(p){return Math.round(p);;});o = (function(p){return 10000.000000;});var p = b(2014, 9, 11);var q = a(p, 0.000000);return g(5, f(q)) | |
***** FunScript.Tests.DateTimes.DateTime.AddSeconds works(-100.0d) | |
// Code: | |
var o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(p,q){return c((p.getTime() + (q * 1000.000000)), e(p));});b = (function(p,q,r){return d(p, q, r, 0, 0, 0, 0, 2, 1);});c = (function(p,q){var date = p == null ? new Date() : new Date(p); | |
if (isNaN(date)) { throw "The string was not recognized as a valid DateTime." } | |
date.kind = q; | |
return date;});d = (function(p,q,r,s,t,u,v,w,x){var date = w === x ? new Date(Date.UTC(p, q - 1, r, s, t, u, v)) : new Date(p, q - 1, r, s, t, u, v); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = w; | |
return date;});e = (function(p,q){return p.kind;});f = (function(p,q){return ((p.getTime() + 62135604000000.000000) * o());});g = (function(p,q){var r = h(q);var s = (i(l(r)) + 1.000000);var t = (s - p);var u = m(10.000000, t);return (n((q / u)) * u);});h = (function(p){return Math.abs(p);;});i = (function(p){return Math.floor(p);;});j = (function(p){return Math.LN10;;});k = (function(p){return Math.log(p);;});l = (function(p){return (k(p) / j());});m = (function(p,q){return Math.pow(p, q);;});n = (function(p){return Math.round(p);;});o = (function(p){return 10000.000000;});var p = b(2014, 9, 11);var q = a(p, -100.000000);return g(5, f(q)) | |
***** FunScript.Tests.DateTimes.DateTime.AddSeconds works(100.0d) | |
// Code: | |
var o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(p,q){return c((p.getTime() + (q * 1000.000000)), e(p));});b = (function(p,q,r){return d(p, q, r, 0, 0, 0, 0, 2, 1);});c = (function(p,q){var date = p == null ? new Date() : new Date(p); | |
if (isNaN(date)) { throw "The string was not recognized as a valid DateTime." } | |
date.kind = q; | |
return date;});d = (function(p,q,r,s,t,u,v,w,x){var date = w === x ? new Date(Date.UTC(p, q - 1, r, s, t, u, v)) : new Date(p, q - 1, r, s, t, u, v); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = w; | |
return date;});e = (function(p,q){return p.kind;});f = (function(p,q){return ((p.getTime() + 62135604000000.000000) * o());});g = (function(p,q){var r = h(q);var s = (i(l(r)) + 1.000000);var t = (s - p);var u = m(10.000000, t);return (n((q / u)) * u);});h = (function(p){return Math.abs(p);;});i = (function(p){return Math.floor(p);;});j = (function(p){return Math.LN10;;});k = (function(p){return Math.log(p);;});l = (function(p){return (k(p) / j());});m = (function(p,q){return Math.pow(p, q);;});n = (function(p){return Math.round(p);;});o = (function(p){return 10000.000000;});var p = b(2014, 9, 11);var q = a(p, 100.000000);return g(5, f(q)) | |
***** FunScript.Tests.DateTimes.DateTime.AddTicks works(0L) | |
// Code: | |
var o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(p,q){return c((p.getTime() + (q / o())), e(p));});b = (function(p,q,r){return d(p, q, r, 0, 0, 0, 0, 2, 1);});c = (function(p,q){var date = p == null ? new Date() : new Date(p); | |
if (isNaN(date)) { throw "The string was not recognized as a valid DateTime." } | |
date.kind = q; | |
return date;});d = (function(p,q,r,s,t,u,v,w,x){var date = w === x ? new Date(Date.UTC(p, q - 1, r, s, t, u, v)) : new Date(p, q - 1, r, s, t, u, v); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = w; | |
return date;});e = (function(p,q){return p.kind;});f = (function(p,q){return ((p.getTime() + 62135604000000.000000) * o());});g = (function(p,q){var r = h(q);var s = (i(l(r)) + 1.000000);var t = (s - p);var u = m(10.000000, t);return (n((q / u)) * u);});h = (function(p){return Math.abs(p);;});i = (function(p){return Math.floor(p);;});j = (function(p){return Math.LN10;;});k = (function(p){return Math.log(p);;});l = (function(p){return (k(p) / j());});m = (function(p,q){return Math.pow(p, q);;});n = (function(p){return Math.round(p);;});o = (function(p){return 10000.000000;});var p = b(2014, 9, 11);var q = a(p, 0.000000);return g(5, f(q)) | |
***** FunScript.Tests.DateTimes.DateTime.AddTicks works(-100000L) | |
// Code: | |
var o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(p,q){return c((p.getTime() + (q / o())), e(p));});b = (function(p,q,r){return d(p, q, r, 0, 0, 0, 0, 2, 1);});c = (function(p,q){var date = p == null ? new Date() : new Date(p); | |
if (isNaN(date)) { throw "The string was not recognized as a valid DateTime." } | |
date.kind = q; | |
return date;});d = (function(p,q,r,s,t,u,v,w,x){var date = w === x ? new Date(Date.UTC(p, q - 1, r, s, t, u, v)) : new Date(p, q - 1, r, s, t, u, v); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = w; | |
return date;});e = (function(p,q){return p.kind;});f = (function(p,q){return ((p.getTime() + 62135604000000.000000) * o());});g = (function(p,q){var r = h(q);var s = (i(l(r)) + 1.000000);var t = (s - p);var u = m(10.000000, t);return (n((q / u)) * u);});h = (function(p){return Math.abs(p);;});i = (function(p){return Math.floor(p);;});j = (function(p){return Math.LN10;;});k = (function(p){return Math.log(p);;});l = (function(p){return (k(p) / j());});m = (function(p,q){return Math.pow(p, q);;});n = (function(p){return Math.round(p);;});o = (function(p){return 10000.000000;});var p = b(2014, 9, 11);var q = a(p, -100000.000000);return g(5, f(q)) | |
***** FunScript.Tests.DateTimes.DateTime.AddTicks works(100000L) | |
// Code: | |
var o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(p,q){return c((p.getTime() + (q / o())), e(p));});b = (function(p,q,r){return d(p, q, r, 0, 0, 0, 0, 2, 1);});c = (function(p,q){var date = p == null ? new Date() : new Date(p); | |
if (isNaN(date)) { throw "The string was not recognized as a valid DateTime." } | |
date.kind = q; | |
return date;});d = (function(p,q,r,s,t,u,v,w,x){var date = w === x ? new Date(Date.UTC(p, q - 1, r, s, t, u, v)) : new Date(p, q - 1, r, s, t, u, v); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = w; | |
return date;});e = (function(p,q){return p.kind;});f = (function(p,q){return ((p.getTime() + 62135604000000.000000) * o());});g = (function(p,q){var r = h(q);var s = (i(l(r)) + 1.000000);var t = (s - p);var u = m(10.000000, t);return (n((q / u)) * u);});h = (function(p){return Math.abs(p);;});i = (function(p){return Math.floor(p);;});j = (function(p){return Math.LN10;;});k = (function(p){return Math.log(p);;});l = (function(p){return (k(p) / j());});m = (function(p,q){return Math.pow(p, q);;});n = (function(p){return Math.round(p);;});o = (function(p){return 10000.000000;});var p = b(2014, 9, 11);var q = a(p, 100000.000000);return g(5, f(q)) | |
***** FunScript.Tests.DateTimes.DateTime.AddYears works(0) | |
// Code: | |
var o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(p,q){var r = m(p);var s = (o(p) + q);var t = b(s, r);var u;if ((h(p) < t)) {u = h(p);}else{u = t;};var v = u;return e(s, r, v, i(p), l(p), n(p), k(p), j(p), 1);});b = (function(p,q){return f(p)[(q - 1)];});c = (function(p,q,r){return e(p, q, r, 0, 0, 0, 0, 2, 1);});d = (function(p){return ((p % 4 == 0) && (p % 100 != 0)) || (p % 400 == 0);});e = (function(p,q,r,s,t,u,v,w,x){var date = w === x ? new Date(Date.UTC(p, q - 1, r, s, t, u, v)) : new Date(p, q - 1, r, s, t, u, v); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = w; | |
return date;});f = (function(p){if (d(p)) {return [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];}else{return [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];};});g = (function(p,q,r){return p.kind == r ? p['getUTC'+q]() : p['get'+q]();});h = (function(p,q){return g(p, "Date", 1);});i = (function(p,q){return g(p, "Hours", 1);});j = (function(p,q){return p.kind;});k = (function(p,q){return g(p, "Milliseconds", 1);});l = (function(p,q){return g(p, "Minutes", 1);});m = (function(p,q){return (g(p, "Month", 1) + 1);});n = (function(p,q){return g(p, "Seconds", 1);});o = (function(p,q){return g(p, "FullYear", 1);});var p = c(2016, 2, 29);var q = a(p, 0);return (m(q) + h(q)) | |
***** FunScript.Tests.DateTimes.DateTime.AddYears works(-100) | |
// Code: | |
var o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(p,q){var r = m(p);var s = (o(p) + q);var t = b(s, r);var u;if ((h(p) < t)) {u = h(p);}else{u = t;};var v = u;return e(s, r, v, i(p), l(p), n(p), k(p), j(p), 1);});b = (function(p,q){return f(p)[(q - 1)];});c = (function(p,q,r){return e(p, q, r, 0, 0, 0, 0, 2, 1);});d = (function(p){return ((p % 4 == 0) && (p % 100 != 0)) || (p % 400 == 0);});e = (function(p,q,r,s,t,u,v,w,x){var date = w === x ? new Date(Date.UTC(p, q - 1, r, s, t, u, v)) : new Date(p, q - 1, r, s, t, u, v); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = w; | |
return date;});f = (function(p){if (d(p)) {return [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];}else{return [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];};});g = (function(p,q,r){return p.kind == r ? p['getUTC'+q]() : p['get'+q]();});h = (function(p,q){return g(p, "Date", 1);});i = (function(p,q){return g(p, "Hours", 1);});j = (function(p,q){return p.kind;});k = (function(p,q){return g(p, "Milliseconds", 1);});l = (function(p,q){return g(p, "Minutes", 1);});m = (function(p,q){return (g(p, "Month", 1) + 1);});n = (function(p,q){return g(p, "Seconds", 1);});o = (function(p,q){return g(p, "FullYear", 1);});var p = c(2016, 2, 29);var q = a(p, -100);return (m(q) + h(q)) | |
***** FunScript.Tests.DateTimes.DateTime.AddYears works(-1) | |
// Code: | |
var o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(p,q){var r = m(p);var s = (o(p) + q);var t = b(s, r);var u;if ((h(p) < t)) {u = h(p);}else{u = t;};var v = u;return e(s, r, v, i(p), l(p), n(p), k(p), j(p), 1);});b = (function(p,q){return f(p)[(q - 1)];});c = (function(p,q,r){return e(p, q, r, 0, 0, 0, 0, 2, 1);});d = (function(p){return ((p % 4 == 0) && (p % 100 != 0)) || (p % 400 == 0);});e = (function(p,q,r,s,t,u,v,w,x){var date = w === x ? new Date(Date.UTC(p, q - 1, r, s, t, u, v)) : new Date(p, q - 1, r, s, t, u, v); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = w; | |
return date;});f = (function(p){if (d(p)) {return [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];}else{return [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];};});g = (function(p,q,r){return p.kind == r ? p['getUTC'+q]() : p['get'+q]();});h = (function(p,q){return g(p, "Date", 1);});i = (function(p,q){return g(p, "Hours", 1);});j = (function(p,q){return p.kind;});k = (function(p,q){return g(p, "Milliseconds", 1);});l = (function(p,q){return g(p, "Minutes", 1);});m = (function(p,q){return (g(p, "Month", 1) + 1);});n = (function(p,q){return g(p, "Seconds", 1);});o = (function(p,q){return g(p, "FullYear", 1);});var p = c(2016, 2, 29);var q = a(p, -1);return (m(q) + h(q)) | |
***** FunScript.Tests.DateTimes.DateTime.AddYears works(1) | |
// Code: | |
var o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(p,q){var r = m(p);var s = (o(p) + q);var t = b(s, r);var u;if ((h(p) < t)) {u = h(p);}else{u = t;};var v = u;return e(s, r, v, i(p), l(p), n(p), k(p), j(p), 1);});b = (function(p,q){return f(p)[(q - 1)];});c = (function(p,q,r){return e(p, q, r, 0, 0, 0, 0, 2, 1);});d = (function(p){return ((p % 4 == 0) && (p % 100 != 0)) || (p % 400 == 0);});e = (function(p,q,r,s,t,u,v,w,x){var date = w === x ? new Date(Date.UTC(p, q - 1, r, s, t, u, v)) : new Date(p, q - 1, r, s, t, u, v); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = w; | |
return date;});f = (function(p){if (d(p)) {return [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];}else{return [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];};});g = (function(p,q,r){return p.kind == r ? p['getUTC'+q]() : p['get'+q]();});h = (function(p,q){return g(p, "Date", 1);});i = (function(p,q){return g(p, "Hours", 1);});j = (function(p,q){return p.kind;});k = (function(p,q){return g(p, "Milliseconds", 1);});l = (function(p,q){return g(p, "Minutes", 1);});m = (function(p,q){return (g(p, "Month", 1) + 1);});n = (function(p,q){return g(p, "Seconds", 1);});o = (function(p,q){return g(p, "FullYear", 1);});var p = c(2016, 2, 29);var q = a(p, 1);return (m(q) + h(q)) | |
***** FunScript.Tests.DateTimes.DateTime.AddYears works(100) | |
// Code: | |
var o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(p,q){var r = m(p);var s = (o(p) + q);var t = b(s, r);var u;if ((h(p) < t)) {u = h(p);}else{u = t;};var v = u;return e(s, r, v, i(p), l(p), n(p), k(p), j(p), 1);});b = (function(p,q){return f(p)[(q - 1)];});c = (function(p,q,r){return e(p, q, r, 0, 0, 0, 0, 2, 1);});d = (function(p){return ((p % 4 == 0) && (p % 100 != 0)) || (p % 400 == 0);});e = (function(p,q,r,s,t,u,v,w,x){var date = w === x ? new Date(Date.UTC(p, q - 1, r, s, t, u, v)) : new Date(p, q - 1, r, s, t, u, v); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = w; | |
return date;});f = (function(p){if (d(p)) {return [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];}else{return [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];};});g = (function(p,q,r){return p.kind == r ? p['getUTC'+q]() : p['get'+q]();});h = (function(p,q){return g(p, "Date", 1);});i = (function(p,q){return g(p, "Hours", 1);});j = (function(p,q){return p.kind;});k = (function(p,q){return g(p, "Milliseconds", 1);});l = (function(p,q){return g(p, "Minutes", 1);});m = (function(p,q){return (g(p, "Month", 1) + 1);});n = (function(p,q){return g(p, "Seconds", 1);});o = (function(p,q){return g(p, "FullYear", 1);});var p = c(2016, 2, 29);var q = a(p, 100);return (m(q) + h(q)) | |
***** FunScript.Tests.DateTimes.DateTime.Date works | |
// Code: | |
var i, h, g, f, e, d, c, b, a;a = (function(j,k,l,m,n,o){return b(j, k, l, m, n, o, 0, 2, 1);});b = (function(j,k,l,m,n,o,p,q,r){var date = q === r ? new Date(Date.UTC(j, k - 1, l, m, n, o, p)) : new Date(j, k - 1, l, m, n, o, p); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = q; | |
return date;});c = (function(j,k,l){return j.kind == l ? j['getUTC'+k]() : j['get'+k]();});d = (function(j,k){return b(i(j), h(j), e(j), 0, 0, 0, 0, g(j), 1);});e = (function(j,k){return c(j, "Date", 1);});f = (function(j,k){return c(j, "Hours", 1);});g = (function(j,k){return j.kind;});h = (function(j,k){return (c(j, "Month", 1) + 1);});i = (function(j,k){return c(j, "FullYear", 1);});var j = a(2014, 10, 9, 13, 23, 30);var k = d(j);return (f(j) + f(k)) | |
***** FunScript.Tests.DateTimes.DateTime.Day works | |
// Code: | |
var d, c, b, a;a = (function(e,f,g,h,i,j,k){return b(e, f, g, h, i, j, 0, k, 1);});b = (function(e,f,g,h,i,j,k,l,m){var date = l === m ? new Date(Date.UTC(e, f - 1, g, h, i, j, k)) : new Date(e, f - 1, g, h, i, j, k); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = l; | |
return date;});c = (function(e,f,g){return e.kind == g ? e['getUTC'+f]() : e['get'+f]();});d = (function(e,f){return c(e, "Date", 1);});var e = a(2014, 10, 9, 13, 23, 30, 2);var f = a(2014, 10, 9, 13, 23, 30, 1);return (d(e) + d(f)) | |
***** FunScript.Tests.DateTimes.DateTime.DayOfWeek works | |
// Code: | |
var d, c, b, a;a = (function(e,f,g){return b(e, f, g, 0, 0, 0, 0, 2, 1);});b = (function(e,f,g,h,i,j,k,l,m){var date = l === m ? new Date(Date.UTC(e, f - 1, g, h, i, j, k)) : new Date(e, f - 1, g, h, i, j, k); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = l; | |
return date;});c = (function(e,f,g){return e.kind == g ? e['getUTC'+f]() : e['get'+f]();});d = (function(e,f){return c(e, "Day", 1);});var e = a(2014, 10, 9);return d(e) | |
***** FunScript.Tests.DateTimes.DateTime.DayOfYear works | |
// Code: | |
var y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(z){return z.length;;});b = (function(z){var A = this;{};A.factory = z;});c = (function(z,A,B){return e(z, A, B, 0, 0, 0, 0, 2, 1);});d = (function(z){return ((z % 4 == 0) && (z % 100 != 0)) || (z % 400 == 0);});e = (function(z,A,B,C,D,E,F,G,H){var date = G === H ? new Date(Date.UTC(z, A - 1, B, C, D, E, F)) : new Date(z, A - 1, B, C, D, E, F); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = G; | |
return date;});f = (function(z){if (d(z)) {return [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];}else{return [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];};});g = (function(z,A,B){return z.kind == B ? z['getUTC'+A]() : z['get'+A]();});h = (function(z,A){return g(z, "Date", 1);});i = (function(z,A){var B = (function(C){return (function(D){return (C + D);});});var C = h(z);return (function(D){return q(B, C, D);})(v((j(z) - 1), u(f(k(z)))));});j = (function(z,A){return (g(z, "Month", 1) + 1);});k = (function(z,A){return g(z, "FullYear", 1);});l = (function(z){return z.Value;;});m = (function(z){return z.Value;;});n = (function(z){return ((z.Tag == 1.000000) && true);});o = (function(z){return t((function(A){var B;return p(z(B));}));});p = (function(z){return z.GetEnumerator();});q = (function(z,A,B){return r((function(C){return (function(D){return (function(E){return z(D)(E);});});}), A, B);});r = (function(z,A,B){return s(z, A, p(B));});s = (function(z,A,B){var C = {contents: 0};var D = {contents: A};while (B.MoveNext()){D.contents = z(C.contents)(D.contents)(B.get_Current());null;C.contents = (C.contents + 1);null;};return D.contents;});t = (function(z){var A;A = (new b(z));return {GetEnumerator: (function(B){return (function(C,B){var D;return C.factory(D);})(A, B);})};});u = (function(z){return w((function(A){if ((A < a(z))) {return {Tag: 1.000000, Value: (new x(z[A], (A + 1)))};}else{return {Tag: 0.000000};};}), 0);});v = (function(z,A){return o((function(B){var C = p(A);return w((function(D){if (((D < z) && C.MoveNext())) {return {Tag: 1.000000, Value: (new x(C.get_Current(), (D + 1)))};}else{return {Tag: 0.000000};};}), 0);}));});w = (function(z,A){return t((function(B){var C;C = (new y(A, z));return {get_Current: (function(D){return (function(E,D){return E.current;})(C, D);}), MoveNext: (function(D){return (function(E,D){var F = (function(G){var H = l(E.acc);var I = E.unfold(H);if ((I.Tag == 1.000000)) {var J = m(I).Items[0.000000];var K = m(I).Items[1.000000];E.acc = {Tag: 1.000000, Value: K};E.current = J;return true;}else{E.acc = {Tag: 0.000000};E.current = null;return false;};});return (n(E.acc) && (function(){var G;return F(G);})());})(C, D);}), Reset: (function(D){return (function(E,D){E.acc = {Tag: 1.000000, Value: E.seed};E.current = null;})(C, D);}), Dispose: (function(D){return (function(E,D){;})(C, D);})};}));});x = (function(Item0,Item1){var B = this;B.Items = [Item0, Item1];});y = (function(z,A){var B = this;{};B.seed = z;B.unfold = A;B.acc = {Tag: 1.000000, Value: B.seed};B.current = null;});var z = c(2014, 10, 9);return i(z) | |
***** FunScript.Tests.DateTimes.DateTime.DaysInMonth works(2016,2) | |
// Code: | |
var c, b, a;a = (function(d,e){return c(d)[(e - 1)];});b = (function(d){return ((d % 4 == 0) && (d % 100 != 0)) || (d % 400 == 0);});c = (function(d){if (b(d)) {return [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];}else{return [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];};});return a(2016, 2) | |
***** FunScript.Tests.DateTimes.DateTime.DaysInMonth works(2014,4) | |
// Code: | |
var c, b, a;a = (function(d,e){return c(d)[(e - 1)];});b = (function(d){return ((d % 4 == 0) && (d % 100 != 0)) || (d % 400 == 0);});c = (function(d){if (b(d)) {return [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];}else{return [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];};});return a(2014, 4) | |
***** FunScript.Tests.DateTimes.DateTime.DaysInMonth works(2014,2) | |
// Code: | |
var c, b, a;a = (function(d,e){return c(d)[(e - 1)];});b = (function(d){return ((d % 4 == 0) && (d % 100 != 0)) || (d % 400 == 0);});c = (function(d){if (b(d)) {return [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];}else{return [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];};});return a(2014, 2) | |
***** FunScript.Tests.DateTimes.DateTime.DaysInMonth works(2014,1) | |
// Code: | |
var c, b, a;a = (function(d,e){return c(d)[(e - 1)];});b = (function(d){return ((d % 4 == 0) && (d % 100 != 0)) || (d % 400 == 0);});c = (function(d){if (b(d)) {return [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];}else{return [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];};});return a(2014, 1) | |
***** FunScript.Tests.DateTimes.DateTime.Hour works | |
// Code: | |
var d, c, b, a;a = (function(e,f,g,h,i,j,k){return b(e, f, g, h, i, j, 0, k, 1);});b = (function(e,f,g,h,i,j,k,l,m){var date = l === m ? new Date(Date.UTC(e, f - 1, g, h, i, j, k)) : new Date(e, f - 1, g, h, i, j, k); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = l; | |
return date;});c = (function(e,f,g){return e.kind == g ? e['getUTC'+f]() : e['get'+f]();});d = (function(e,f){return c(e, "Hours", 1);});var e = a(2014, 10, 9, 13, 23, 30, 2);var f = a(2014, 10, 9, 13, 23, 30, 1);return (d(e) + d(f)) | |
***** FunScript.Tests.DateTimes.DateTime.IsLeapYear works(2016) | |
// Code: | |
var a;a = (function(b){return ((b % 4 == 0) && (b % 100 != 0)) || (b % 400 == 0);});return a(2016) | |
***** FunScript.Tests.DateTimes.DateTime.IsLeapYear works(2014) | |
// Code: | |
var a;a = (function(b){return ((b % 4 == 0) && (b % 100 != 0)) || (b % 400 == 0);});return a(2014) | |
***** FunScript.Tests.DateTimes.DateTime.Kind works | |
// Code: | |
var c, b, a;a = (function(d,e,f,g,h,i,j){return b(d, e, f, g, h, i, 0, j, 1);});b = (function(d,e,f,g,h,i,j,k,l){var date = k === l ? new Date(Date.UTC(d, e - 1, f, g, h, i, j)) : new Date(d, e - 1, f, g, h, i, j); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = k; | |
return date;});c = (function(d,e){return d.kind;});var d = a(2014, 10, 9, 13, 23, 30, 2);var e = a(2014, 10, 9, 13, 23, 30, 1);return (c(d) + c(e)) | |
***** FunScript.Tests.DateTimes.DateTime.MaxValue works | |
// Code: | |
var b, a;a = (function(c,d){var date = c == null ? new Date() : new Date(c); | |
if (isNaN(date)) { throw "The string was not recognized as a valid DateTime." } | |
date.kind = d; | |
return date;});b = (function(c){return a(8640000000000000.000000, 1);});var c = b();return 0.000000 | |
***** FunScript.Tests.DateTimes.DateTime.Millisecond works | |
// Code: | |
var d, c, b, a;a = (function(e,f,g,h,i,j,k){return b(e, f, g, h, i, j, k, 2, 1);});b = (function(e,f,g,h,i,j,k,l,m){var date = l === m ? new Date(Date.UTC(e, f - 1, g, h, i, j, k)) : new Date(e, f - 1, g, h, i, j, k); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = l; | |
return date;});c = (function(e,f,g){return e.kind == g ? e['getUTC'+f]() : e['get'+f]();});d = (function(e,f){return c(e, "Milliseconds", 1);});var e = a(2014, 10, 9, 13, 23, 30, 999);return d(e) | |
***** FunScript.Tests.DateTimes.DateTime.Minute works | |
// Code: | |
var d, c, b, a;a = (function(e,f,g,h,i,j,k){return b(e, f, g, h, i, j, 0, k, 1);});b = (function(e,f,g,h,i,j,k,l,m){var date = l === m ? new Date(Date.UTC(e, f - 1, g, h, i, j, k)) : new Date(e, f - 1, g, h, i, j, k); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = l; | |
return date;});c = (function(e,f,g){return e.kind == g ? e['getUTC'+f]() : e['get'+f]();});d = (function(e,f){return c(e, "Minutes", 1);});var e = a(2014, 10, 9, 13, 23, 30, 2);var f = a(2014, 10, 9, 13, 23, 30, 1);return (d(e) + d(f)) | |
***** FunScript.Tests.DateTimes.DateTime.MinValue works | |
// Code: | |
var b, a;a = (function(c,d){var date = c == null ? new Date() : new Date(c); | |
if (isNaN(date)) { throw "The string was not recognized as a valid DateTime." } | |
date.kind = d; | |
return date;});b = (function(c){return a((-8640000000000000.000000), 1);});var c = b();return 0.000000 | |
***** FunScript.Tests.DateTimes.DateTime.Month works | |
// Code: | |
var d, c, b, a;a = (function(e,f,g,h,i,j,k){return b(e, f, g, h, i, j, 0, k, 1);});b = (function(e,f,g,h,i,j,k,l,m){var date = l === m ? new Date(Date.UTC(e, f - 1, g, h, i, j, k)) : new Date(e, f - 1, g, h, i, j, k); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = l; | |
return date;});c = (function(e,f,g){return e.kind == g ? e['getUTC'+f]() : e['get'+f]();});d = (function(e,f){return (c(e, "Month", 1) + 1);});var e = a(2014, 10, 9, 13, 23, 30, 2);var f = a(2014, 10, 9, 13, 23, 30, 1);return (d(e) + d(f)) | |
***** FunScript.Tests.DateTimes.DateTime.Now works | |
// Code: | |
var d, c, b, a;a = (function(e,f){var date = e == null ? new Date() : new Date(e); | |
if (isNaN(date)) { throw "The string was not recognized as a valid DateTime." } | |
date.kind = f; | |
return date;});b = (function(e,f,g){return e.kind == g ? e['getUTC'+f]() : e['get'+f]();});c = (function(e,f){return b(e, "Hours", 1);});d = (function(e){return a(null, 2);});var e = d();return c(e) | |
***** FunScript.Tests.DateTimes.DateTime.Parse works | |
// Code: | |
var h, g, f, e, d, c, b, a;a = (function(i){return b(i, 2);});b = (function(i,j){var date = i == null ? new Date() : new Date(i); | |
if (isNaN(date)) { throw "The string was not recognized as a valid DateTime." } | |
date.kind = j; | |
return date;});c = (function(i,j,k){return i.kind == k ? i['getUTC'+j]() : i['get'+j]();});d = (function(i,j){return c(i, "Date", 1);});e = (function(i,j){return c(i, "Hours", 1);});f = (function(i,j){return c(i, "Minutes", 1);});g = (function(i,j){return (c(i, "Month", 1) + 1);});h = (function(i,j){return c(i, "FullYear", 1);});var i = a("9/10/2014 1:50:34 PM");return ((((h(i) + g(i)) + d(i)) + e(i)) + f(i)) | |
***** FunScript.Tests.DateTimes.DateTime.Second works | |
// Code: | |
var d, c, b, a;a = (function(e,f,g,h,i,j){return b(e, f, g, h, i, j, 0, 2, 1);});b = (function(e,f,g,h,i,j,k,l,m){var date = l === m ? new Date(Date.UTC(e, f - 1, g, h, i, j, k)) : new Date(e, f - 1, g, h, i, j, k); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = l; | |
return date;});c = (function(e,f,g){return e.kind == g ? e['getUTC'+f]() : e['get'+f]();});d = (function(e,f){return c(e, "Seconds", 1);});var e = a(2014, 9, 11, 0, 0, 30);var f = a(2014, 9, 11, 0, 0, 59);return (d(e) + d(f)) | |
***** FunScript.Tests.DateTimes.DateTime.Ticks works | |
// Code: | |
var l, k, j, i, h, g, f, e, d, c, b, a;a = (function(m,n,o,p,q,r,s){return b(m, n, o, p, q, r, s, 2, 1);});b = (function(m,n,o,p,q,r,s,t,u){var date = t === u ? new Date(Date.UTC(m, n - 1, o, p, q, r, s)) : new Date(m, n - 1, o, p, q, r, s); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = t; | |
return date;});c = (function(m,n){return ((m.getTime() + 62135604000000.000000) * l());});d = (function(m,n){var o = e(n);var p = (f(i(o)) + 1.000000);var q = (p - m);var r = j(10.000000, q);return (k((n / r)) * r);});e = (function(m){return Math.abs(m);;});f = (function(m){return Math.floor(m);;});g = (function(m){return Math.LN10;;});h = (function(m){return Math.log(m);;});i = (function(m){return (h(m) / g());});j = (function(m,n){return Math.pow(m, n);;});k = (function(m){return Math.round(m);;});l = (function(m){return 10000.000000;});var m = a(2014, 10, 9, 13, 23, 30, 999);return d(5, c(m)) | |
***** FunScript.Tests.DateTimes.DateTime.Today works | |
// Code: | |
var k, j, i, h, g, f, e, d, c, b, a;a = (function(l,m){var date = l == null ? new Date() : new Date(l); | |
if (isNaN(date)) { throw "The string was not recognized as a valid DateTime." } | |
date.kind = m; | |
return date;});b = (function(l,m,n,o,p,q,r,s,t){var date = s === t ? new Date(Date.UTC(l, m - 1, n, o, p, q, r)) : new Date(l, m - 1, n, o, p, q, r); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = s; | |
return date;});c = (function(l,m,n){return l.kind == n ? l['getUTC'+m]() : l['get'+m]();});d = (function(l,m){return b(k(l), h(l), e(l), 0, 0, 0, 0, g(l), 1);});e = (function(l,m){return c(l, "Date", 1);});f = (function(l,m){return c(l, "Hours", 1);});g = (function(l,m){return l.kind;});h = (function(l,m){return (c(l, "Month", 1) + 1);});i = (function(l){return a(null, 2);});j = (function(l){return d(i());});k = (function(l,m){return c(l, "FullYear", 1);});var l = j();return (e(l) + f(l)) | |
***** FunScript.Tests.DateTimes.DateTime.ToLocalTime works | |
// Code: | |
var f, e, d, c, b, a;a = (function(g,h,i,j,k,l,m){return d(g, h, i, j, k, l, 0, m, 1);});b = (function(g,h){return c(g, 2);});c = (function(g,h){if (g.kind == h) { return g } else { var newDate = new Date(g.getTime()); newDate.kind = h; return newDate };});d = (function(g,h,i,j,k,l,m,n,o){var date = n === o ? new Date(Date.UTC(g, h - 1, i, j, k, l, m)) : new Date(g, h - 1, i, j, k, l, m); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = n; | |
return date;});e = (function(g,h,i){return g.kind == i ? g['getUTC'+h]() : g['get'+h]();});f = (function(g,h){return e(g, "Hours", 1);});var g = a(2014, 10, 9, 13, 23, 30, 1);var h = b(g);return (f(g) + f(h)) | |
***** FunScript.Tests.DateTimes.DateTime.ToLongDateString works | |
// Code: | |
var c, b, a;a = (function(d,e,f,g,h,i){return c(d, e, f, g, h, i, 0, 2, 1);});b = (function(d,e){return d['to'+"Date"+'String']();});c = (function(d,e,f,g,h,i,j,k,l){var date = k === l ? new Date(Date.UTC(d, e - 1, f, g, h, i, j)) : new Date(d, e - 1, f, g, h, i, j); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = k; | |
return date;});var d = a(2014, 9, 11, 16, 37, 0);var e = b(d);return (e.length > 0) | |
***** FunScript.Tests.DateTimes.DateTime.ToLongTimeString works | |
// Code: | |
var c, b, a;a = (function(d,e,f,g,h,i){return c(d, e, f, g, h, i, 0, 2, 1);});b = (function(d,e){return d['to'+"LocaleTime"+'String']();});c = (function(d,e,f,g,h,i,j,k,l){var date = k === l ? new Date(Date.UTC(d, e - 1, f, g, h, i, j)) : new Date(d, e - 1, f, g, h, i, j); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = k; | |
return date;});var d = a(2014, 9, 11, 16, 37, 0);var e = b(d);return (e.length > 0) | |
***** FunScript.Tests.DateTimes.DateTime.ToShortDateString works | |
// Code: | |
var c, b, a;a = (function(d,e,f,g,h,i){return c(d, e, f, g, h, i, 0, 2, 1);});b = (function(d,e){return d['to'+"LocaleDate"+'String']();});c = (function(d,e,f,g,h,i,j,k,l){var date = k === l ? new Date(Date.UTC(d, e - 1, f, g, h, i, j)) : new Date(d, e - 1, f, g, h, i, j); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = k; | |
return date;});var d = a(2014, 9, 11, 16, 37, 0);var e = b(d);return (e.length > 0) | |
***** FunScript.Tests.DateTimes.DateTime.ToShortTimeString works | |
// Code: | |
var c, b, a;a = (function(d,e,f,g,h,i){return c(d, e, f, g, h, i, 0, 2, 1);});b = (function(d,e){return d.toLocaleTimeString().replace(/:\d\d(?!:)/, '');});c = (function(d,e,f,g,h,i,j,k,l){var date = k === l ? new Date(Date.UTC(d, e - 1, f, g, h, i, j)) : new Date(d, e - 1, f, g, h, i, j); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = k; | |
return date;});var d = a(2014, 9, 11, 16, 37, 0);var e = b(d);return (e.length > 0) | |
***** FunScript.Tests.DateTimes.DateTime.ToUniversalTime works | |
// Code: | |
var f, e, d, c, b, a;a = (function(g,h,i,j,k,l,m){return d(g, h, i, j, k, l, 0, m, 1);});b = (function(g,h){return c(g, 1);});c = (function(g,h){if (g.kind == h) { return g } else { var newDate = new Date(g.getTime()); newDate.kind = h; return newDate };});d = (function(g,h,i,j,k,l,m,n,o){var date = n === o ? new Date(Date.UTC(g, h - 1, i, j, k, l, m)) : new Date(g, h - 1, i, j, k, l, m); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = n; | |
return date;});e = (function(g,h,i){return g.kind == i ? g['getUTC'+h]() : g['get'+h]();});f = (function(g,h){return e(g, "Hours", 1);});var g = a(2014, 10, 9, 13, 23, 30, 2);var h = b(g);return (f(g) + f(h)) | |
***** FunScript.Tests.DateTimes.DateTime.UtcNow works | |
// Code: | |
var d, c, b, a;a = (function(e,f){var date = e == null ? new Date() : new Date(e); | |
if (isNaN(date)) { throw "The string was not recognized as a valid DateTime." } | |
date.kind = f; | |
return date;});b = (function(e,f,g){return e.kind == g ? e['getUTC'+f]() : e['get'+f]();});c = (function(e,f){return b(e, "Hours", 1);});d = (function(e){return a(null, 1);});var e = d();return c(e) | |
***** FunScript.Tests.DateTimes.DateTime.Year works | |
// Code: | |
var d, c, b, a;a = (function(e,f,g,h,i,j,k){return b(e, f, g, h, i, j, 0, k, 1);});b = (function(e,f,g,h,i,j,k,l,m){var date = l === m ? new Date(Date.UTC(e, f - 1, g, h, i, j, k)) : new Date(e, f - 1, g, h, i, j, k); | |
if (isNaN(date)) { throw "The parameters describe an un-representable DateTime." } | |
date.kind = l; | |
return date;});c = (function(e,f,g){return e.kind == g ? e['getUTC'+f]() : e['get'+f]();});d = (function(e,f){return c(e, "FullYear", 1);});var e = a(2014, 10, 9, 13, 23, 30, 2);var f = a(2014, 10, 9, 13, 23, 30, 1);return (d(e) + d(f)) | |
***** FunScript.Tests.DateTimes.TimeSpan Addition works(0.0d,0.0d) | |
// Code: | |
var d, c, b, a;a = (function(e,f){return b((c(e) + c(f)));});b = (function(e){return e;});c = (function(e,f){return e;});d = (function(e,f){return a(e, f);});var e = b(0.000000);var f = b(0.000000);var g = a(e, f);var h = c(g);var i = d(e, f);var j = c(i);if ((h == j)) {return h;}else{throw ("synonyms don\u0027t match");return null;} | |
***** FunScript.Tests.DateTimes.TimeSpan Addition works(-2000.0d,0.0d) | |
// Code: | |
var d, c, b, a;a = (function(e,f){return b((c(e) + c(f)));});b = (function(e){return e;});c = (function(e,f){return e;});d = (function(e,f){return a(e, f);});var e = b(-2000.000000);var f = b(0.000000);var g = a(e, f);var h = c(g);var i = d(e, f);var j = c(i);if ((h == j)) {return h;}else{throw ("synonyms don\u0027t match");return null;} | |
***** FunScript.Tests.DateTimes.TimeSpan Addition works(0.0d,1000.0d) | |
// Code: | |
var d, c, b, a;a = (function(e,f){return b((c(e) + c(f)));});b = (function(e){return e;});c = (function(e,f){return e;});d = (function(e,f){return a(e, f);});var e = b(0.000000);var f = b(1000.000000);var g = a(e, f);var h = c(g);var i = d(e, f);var j = c(i);if ((h == j)) {return h;}else{throw ("synonyms don\u0027t match");return null;} | |
***** FunScript.Tests.DateTimes.TimeSpan Addition works(-200.0d,-300.0d) | |
// Code: | |
var d, c, b, a;a = (function(e,f){return b((c(e) + c(f)));});b = (function(e){return e;});c = (function(e,f){return e;});d = (function(e,f){return a(e, f);});var e = b(-200.000000);var f = b(-300.000000);var g = a(e, f);var h = c(g);var i = d(e, f);var j = c(i);if ((h == j)) {return h;}else{throw ("synonyms don\u0027t match");return null;} | |
***** FunScript.Tests.DateTimes.TimeSpan Addition works(-2000.0d,1000.0d) | |
// Code: | |
var d, c, b, a;a = (function(e,f){return b((c(e) + c(f)));});b = (function(e){return e;});c = (function(e,f){return e;});d = (function(e,f){return a(e, f);});var e = b(-2000.000000);var f = b(1000.000000);var g = a(e, f);var h = c(g);var i = d(e, f);var j = c(i);if ((h == j)) {return h;}else{throw ("synonyms don\u0027t match");return null;} | |
***** FunScript.Tests.DateTimes.TimeSpan Addition works(200.0d,-1000.0d) | |
// Code: | |
var d, c, b, a;a = (function(e,f){return b((c(e) + c(f)));});b = (function(e){return e;});c = (function(e,f){return e;});d = (function(e,f){return a(e, f);});var e = b(200.000000);var f = b(-1000.000000);var g = a(e, f);var h = c(g);var i = d(e, f);var j = c(i);if ((h == j)) {return h;}else{throw ("synonyms don\u0027t match");return null;} | |
***** FunScript.Tests.DateTimes.TimeSpan Addition works(1000.0d,2000.0d) | |
// Code: | |
var d, c, b, a;a = (function(e,f){return b((c(e) + c(f)));});b = (function(e){return e;});c = (function(e,f){return e;});d = (function(e,f){return a(e, f);});var e = b(1000.000000);var f = b(2000.000000);var g = a(e, f);var h = c(g);var i = d(e, f);var j = c(i);if ((h == j)) {return h;}else{throw ("synonyms don\u0027t match");return null;} | |
***** FunScript.Tests.DateTimes.TimeSpan Comparison works(0.0d,0.0d) | |
// Code: | |
var d, c, b, a;a = (function(e,f){return (d(e) < d(f) ? -1 : (d(e) == d(f) ? 0 : 1));});b = (function(e,f){return a(e, f);});c = (function(e){return e;});d = (function(e,f){return e;});var e = c(0.000000);var f = c(0.000000);var g = (e < f ? -1 : (e == f ? 0 : 1));var h = b(e, f);var i = a(e, f);if (((g == h) && (h == i))) {return g;}else{throw ("synonyms don\u0027t match");return null;} | |
***** FunScript.Tests.DateTimes.TimeSpan Comparison works(1000.0d,1000.0d) | |
// Code: | |
var d, c, b, a;a = (function(e,f){return (d(e) < d(f) ? -1 : (d(e) == d(f) ? 0 : 1));});b = (function(e,f){return a(e, f);});c = (function(e){return e;});d = (function(e,f){return e;});var e = c(1000.000000);var f = c(1000.000000);var g = (e < f ? -1 : (e == f ? 0 : 1));var h = b(e, f);var i = a(e, f);if (((g == h) && (h == i))) {return g;}else{throw ("synonyms don\u0027t match");return null;} | |
***** FunScript.Tests.DateTimes.TimeSpan Comparison works(0.0d,1000.0d) | |
// Code: | |
var d, c, b, a;a = (function(e,f){return (d(e) < d(f) ? -1 : (d(e) == d(f) ? 0 : 1));});b = (function(e,f){return a(e, f);});c = (function(e){return e;});d = (function(e,f){return e;});var e = c(0.000000);var f = c(1000.000000);var g = (e < f ? -1 : (e == f ? 0 : 1));var h = b(e, f);var i = a(e, f);if (((g == h) && (h == i))) {return g;}else{throw ("synonyms don\u0027t match");return null;} | |
***** FunScript.Tests.DateTimes.TimeSpan Comparison works(200.0d,-200.0d) | |
// Code: | |
var d, c, b, a;a = (function(e,f){return (d(e) < d(f) ? -1 : (d(e) == d(f) ? 0 : 1));});b = (function(e,f){return a(e, f);});c = (function(e){return e;});d = (function(e,f){return e;});var e = c(200.000000);var f = c(-200.000000);var g = (e < f ? -1 : (e == f ? 0 : 1));var h = b(e, f);var i = a(e, f);if (((g == h) && (h == i))) {return g;}else{throw ("synonyms don\u0027t match");return null;} | |
***** FunScript.Tests.DateTimes.TimeSpan Comparison works(-2000.0d,-2000.0d) | |
// Code: | |
var d, c, b, a;a = (function(e,f){return (d(e) < d(f) ? -1 : (d(e) == d(f) ? 0 : 1));});b = (function(e,f){return a(e, f);});c = (function(e){return e;});d = (function(e,f){return e;});var e = c(-2000.000000);var f = c(-2000.000000);var g = (e < f ? -1 : (e == f ? 0 : 1));var h = b(e, f);var i = a(e, f);if (((g == h) && (h == i))) {return g;}else{throw ("synonyms don\u0027t match");return null;} | |
***** FunScript.Tests.DateTimes.TimeSpan Comparison works(2000.0d,1000.0d) | |
// Code: | |
var d, c, b, a;a = (function(e,f){return (d(e) < d(f) ? -1 : (d(e) == d(f) ? 0 : 1));});b = (function(e,f){return a(e, f);});c = (function(e){return e;});d = (function(e,f){return e;});var e = c(2000.000000);var f = c(1000.000000);var g = (e < f ? -1 : (e == f ? 0 : 1));var h = b(e, f);var i = a(e, f);if (((g == h) && (h == i))) {return g;}else{throw ("synonyms don\u0027t match");return null;} | |
***** FunScript.Tests.DateTimes.TimeSpan Comparison works(1000.0d,2000.0d) | |
// Code: | |
var d, c, b, a;a = (function(e,f){return (d(e) < d(f) ? -1 : (d(e) == d(f) ? 0 : 1));});b = (function(e,f){return a(e, f);});c = (function(e){return e;});d = (function(e,f){return e;});var e = c(1000.000000);var f = c(2000.000000);var g = (e < f ? -1 : (e == f ? 0 : 1));var h = b(e, f);var i = a(e, f);if (((g == h) && (h == i))) {return g;}else{throw ("synonyms don\u0027t match");return null;} | |
***** FunScript.Tests.DateTimes.TimeSpan components work | |
// Code: | |
var h, g, f, e, d, c, b, a;a = (function(i){return Math.floor(i);;});b = (function(i){return i;});c = (function(i,j){return a((h(i) / 86400000.000000));});d = (function(i,j){return a(((h(i) % 86400000.000000) / 3600000.000000));});e = (function(i,j){return a((h(i) % 1000.000000));});f = (function(i,j){return a(((h(i) % 3600000.000000) / 60000.000000));});g = (function(i,j){return a(((h(i) % 60000.000000) / 1000.000000));});h = (function(i,j){return i;});var i = b(96441615.000000);return ((((c(i) + d(i)) + f(i)) + g(i)) + e(i)) | |
***** FunScript.Tests.DateTimes.TimeSpan constructors work | |
// Code: | |
var g, f, e, d, c, b, a;a = (function(h,i,j,k){return b(h, i, j, k, 0);});b = (function(h,i,j,k,l){return d((((((h * 86400000.000000) + (i * 3600000.000000)) + (j * 60000.000000)) + (k * 1000.000000)) + l));});c = (function(h,i,j){return b(0, h, i, j, 0);});d = (function(h){return h;});e = (function(h){return d((h / f()));});f = (function(h){return 10000.000000;});g = (function(h,i){return h;});var h = e(20000.000000);var i = c(3, 3, 3);var j = a(5, 5, 5, 5);var k = b(7, 7, 7, 7, 7);return (((g(h) + g(i)) + g(j)) + g(k)) | |
***** FunScript.Tests.DateTimes.TimeSpan Equality works(-2000.0d,-2000.0d) | |
// Code: | |
var a;a = (function(b){return b;});var b = a(-2000.000000);var c = a(-2000.000000);return (b == c) | |
***** FunScript.Tests.DateTimes.TimeSpan Equality works(2000.0d,1000.0d) | |
// Code: | |
var a;a = (function(b){return b;});var b = a(2000.000000);var c = a(1000.000000);return (b == c) | |
***** FunScript.Tests.DateTimes.TimeSpan Equality works(1000.0d,2000.0d) | |
// Code: | |
var a;a = (function(b){return b;});var b = a(1000.000000);var c = a(2000.000000);return (b == c) | |
***** FunScript.Tests.DateTimes.TimeSpan GreaterThan works(-2000.0d,-2000.0d) | |
// Code: | |
var a;a = (function(b){return b;});var b = a(-2000.000000);var c = a(-2000.000000);return (b > c) | |
***** FunScript.Tests.DateTimes.TimeSpan GreaterThan works(2000.0d,1000.0d) | |
// Code: | |
var a;a = (function(b){return b;});var b = a(2000.000000);var c = a(1000.000000);return (b > c) | |
***** FunScript.Tests.DateTimes.TimeSpan GreaterThan works(1000.0d,2000.0d) | |
// Code: | |
var a;a = (function(b){return b;});var b = a(1000.000000);var c = a(2000.000000);return (b > c) | |
***** FunScript.Tests.DateTimes.TimeSpan Inequality works(-2000.0d,-2000.0d) | |
// Code: | |
var a;a = (function(b){return b;});var b = a(-2000.000000);var c = a(-2000.000000);return (b != c) | |
***** FunScript.Tests.DateTimes.TimeSpan Inequality works(2000.0d,1000.0d) | |
// Code: | |
var a;a = (function(b){return b;});var b = a(2000.000000);var c = a(1000.000000);return (b != c) | |
***** FunScript.Tests.DateTimes.TimeSpan Inequality works(1000.0d,2000.0d) | |
// Code: | |
var a;a = (function(b){return b;});var b = a(1000.000000);var c = a(2000.000000);return (b != c) | |
***** FunScript.Tests.DateTimes.TimeSpan LessThan works(-2000.0d,-2000.0d) | |
// Code: | |
var a;a = (function(b){return b;});var b = a(-2000.000000);var c = a(-2000.000000);return (b < c) | |
***** FunScript.Tests.DateTimes.TimeSpan LessThan works(2000.0d,1000.0d) | |
// Code: | |
var a;a = (function(b){return b;});var b = a(2000.000000);var c = a(1000.000000);return (b < c) | |
***** FunScript.Tests.DateTimes.TimeSpan LessThan works(1000.0d,2000.0d) | |
// Code: | |
var a;a = (function(b){return b;});var b = a(1000.000000);var c = a(2000.000000);return (b < c) | |
***** FunScript.Tests.DateTimes.TimeSpan static creation works | |
// Code: | |
var h, g, f, e, d, c, b, a;a = (function(i){return c((i * 86400000.000000));});b = (function(i){return c((i * 3600000.000000));});c = (function(i){return i;});d = (function(i){return c((i * 60000.000000));});e = (function(i){return c((i * 1000.000000));});f = (function(i){return c((i / g()));});g = (function(i){return 10000.000000;});h = (function(i,j){return i;});var i = f(20000.000000);var j = c(2.000000);var k = a(2.000000);var l = b(2.000000);var m = d(2.000000);var n = e(2.000000);return (((((h(i) + h(j)) + h(k)) + h(l)) + h(m)) + h(n)) | |
***** FunScript.Tests.DateTimes.TimeSpan Subtraction works(0.0d,0.0d) | |
// Code: | |
var d, c, b, a;a = (function(e){return e;});b = (function(e,f){return a((c(e) - c(f)));});c = (function(e,f){return e;});d = (function(e,f){return b(e, f);});var e = a(0.000000);var f = a(0.000000);var g = b(e, f);var h = c(g);var i = d(e, f);var j = c(i);if ((h == j)) {return h;}else{throw ("synonyms don\u0027t match");return null;} | |
***** FunScript.Tests.DateTimes.TimeSpan Subtraction works(1000.0d,1000.0d) | |
// Code: | |
var d, c, b, a;a = (function(e){return e;});b = (function(e,f){return a((c(e) - c(f)));});c = (function(e,f){return e;});d = (function(e,f){return b(e, f);});var e = a(1000.000000);var f = a(1000.000000);var g = b(e, f);var h = c(g);var i = d(e, f);var j = c(i);if ((h == j)) {return h;}else{throw ("synonyms don\u0027t match");return null;} | |
***** FunScript.Tests.DateTimes.TimeSpan Subtraction works(0.0d,1000.0d) | |
// Code: | |
var d, c, b, a;a = (function(e){return e;});b = (function(e,f){return a((c(e) - c(f)));});c = (function(e,f){return e;});d = (function(e,f){return b(e, f);});var e = a(0.000000);var f = a(1000.000000);var g = b(e, f);var h = c(g);var i = d(e, f);var j = c(i);if ((h == j)) {return h;}else{throw ("synonyms don\u0027t match");return null;} | |
***** FunScript.Tests.DateTimes.TimeSpan Subtraction works(200.0d,-300.0d) | |
// Code: | |
var d, c, b, a;a = (function(e){return e;});b = (function(e,f){return a((c(e) - c(f)));});c = (function(e,f){return e;});d = (function(e,f){return b(e, f);});var e = a(200.000000);var f = a(-300.000000);var g = b(e, f);var h = c(g);var i = d(e, f);var j = c(i);if ((h == j)) {return h;}else{throw ("synonyms don\u0027t match");return null;} | |
***** FunScript.Tests.DateTimes.TimeSpan Subtraction works(-2000.0d,1000.0d) | |
// Code: | |
var d, c, b, a;a = (function(e){return e;});b = (function(e,f){return a((c(e) - c(f)));});c = (function(e,f){return e;});d = (function(e,f){return b(e, f);});var e = a(-2000.000000);var f = a(1000.000000);var g = b(e, f);var h = c(g);var i = d(e, f);var j = c(i);if ((h == j)) {return h;}else{throw ("synonyms don\u0027t match");return null;} | |
***** FunScript.Tests.DateTimes.TimeSpan Subtraction works(2000.0d,-2000.0d) | |
// Code: | |
var d, c, b, a;a = (function(e){return e;});b = (function(e,f){return a((c(e) - c(f)));});c = (function(e,f){return e;});d = (function(e,f){return b(e, f);});var e = a(2000.000000);var f = a(-2000.000000);var g = b(e, f);var h = c(g);var i = d(e, f);var j = c(i);if ((h == j)) {return h;}else{throw ("synonyms don\u0027t match");return null;} | |
***** FunScript.Tests.DateTimes.TimeSpan Subtraction works(1000.0d,2000.0d) | |
// Code: | |
var d, c, b, a;a = (function(e){return e;});b = (function(e,f){return a((c(e) - c(f)));});c = (function(e,f){return e;});d = (function(e,f){return b(e, f);});var e = a(1000.000000);var f = a(2000.000000);var g = b(e, f);var h = c(g);var i = d(e, f);var j = c(i);if ((h == j)) {return h;}else{throw ("synonyms don\u0027t match");return null;} | |
***** FunScript.Tests.DateTimes.TimeSpan totals work | |
// Code: | |
var g, f, e, d, c, b, a;a = (function(h){return Math.floor(h);;});b = (function(h){return h;});c = (function(h,i){return (e(h) / 86400000.000000);});d = (function(h,i){return (e(h) / 3600000.000000);});e = (function(h,i){return h;});f = (function(h,i){return (e(h) / 60000.000000);});g = (function(h,i){return (e(h) / 1000.000000);});var h = b(96441615.000000);return a((((c(h) + d(h)) + f(h)) + g(h))) | |
***** FunScript.Tests.DateTimes.TimeSpan.Duration works(0.0d) | |
// Code: | |
var d, c, b, a;a = (function(e){return Math.abs(e);;});b = (function(e,f){return c(a(d(e)));});c = (function(e){return e;});d = (function(e,f){return e;});var e = c(0.000000);var f = b(e);return d(f) | |
***** FunScript.Tests.DateTimes.TimeSpan.Duration works(-1.0d) | |
// Code: | |
var d, c, b, a;a = (function(e){return Math.abs(e);;});b = (function(e,f){return c(a(d(e)));});c = (function(e){return e;});d = (function(e,f){return e;});var e = c(-1.000000);var f = b(e);return d(f) | |
***** FunScript.Tests.DateTimes.TimeSpan.Duration works(1.0d) | |
// Code: | |
var d, c, b, a;a = (function(e){return Math.abs(e);;});b = (function(e,f){return c(a(d(e)));});c = (function(e){return e;});d = (function(e,f){return e;});var e = c(1.000000);var f = b(e);return d(f) | |
***** FunScript.Tests.DateTimes.TimeSpan.Negate works(0.0d) | |
// Code: | |
var c, b, a;a = (function(d){return d;});b = (function(d,e){return a((-c(d)));});c = (function(d,e){return d;});var d = a(0.000000);var e = b(d);return c(e) | |
***** FunScript.Tests.DateTimes.TimeSpan.Negate works(-1.0d) | |
// Code: | |
var c, b, a;a = (function(d){return d;});b = (function(d,e){return a((-c(d)));});c = (function(d,e){return d;});var d = a(-1.000000);var e = b(d);return c(e) | |
***** FunScript.Tests.DateTimes.TimeSpan.Negate works(1.0d) | |
// Code: | |
var c, b, a;a = (function(d){return d;});b = (function(d,e){return a((-c(d)));});c = (function(d,e){return d;});var d = a(1.000000);var e = b(d);return c(e) | |
***** FunScript.Tests.DateTimes.TimeSpan.Ticks works | |
// Code: | |
var e, d, c, b, a;a = (function(f){return f;});b = (function(f){return a((f / d()));});c = (function(f,g){return (e(f) * d());});d = (function(f){return 10000.000000;});e = (function(f,g){return f;});var f = b(20000.000000);return c(f) | |
***** FunScript.Tests.Dictionaries.Dictionary creation from IDictionary works | |
// Code: | |
var z, y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(A){var B = this;{};B.factory = A;});b = (function(A){var B = this;{};B.factory = A;});c = (function(A,B,C){if (A[B] === undefined) { A[B] = C } else { throw 'Key already exists' };});d = (function(A){var B = {};var C = A.GetEnumerator();try{while (C.MoveNext()){var D = C.get_Current();var E = D.Items[1.000000];var F = D.Items[0.000000];c(B, F, E);};}finally{if (false) {C.Dispose();}else{;};};return B;});e = (function(A){return A.Value;;});f = (function(A){return A.Value;;});g = (function(A){return A.Value;;});h = (function(A){return A.Value;;});i = (function(A){return ((A.Tag == 1.000000) && true);});j = (function(A){return ((A.Tag == 1.000000) && true);});k = (function(A,B,C){var D = 0;return t((function(E){if ((((B > D) && (E <= C)) || ((B < D) && (E >= C)))) {return {Tag: 1.000000, Value: (new v(E, (E + B)))};}else{return {Tag: 0.000000};};}), A);});l = (function(A,B){return k(A, 1, B);});m = (function(A){return q((function(B){var C;return o(A(C));}));});n = (function(A){return A.GetEnumerator();});o = (function(A){return A.GetEnumerator();});p = (function(A){var B;B = (new a(A));return {GetEnumerator: (function(C){return (function(D,C){var E;return D.factory(E);})(B, C);})};});q = (function(A){var B;B = (new b(A));return {GetEnumerator: (function(C){return (function(D,C){var E;return D.factory(E);})(B, C);})};});r = (function(A,B){return m((function(C){return s((function(D){if (D.MoveNext()) {return {Tag: 1.000000, Value: (new x(A(D.get_Current()), D))};}else{return {Tag: 0.000000};};}), n(B));}));});s = (function(A,B){return q((function(C){var D;D = (new y(B, A));return {get_Current: (function(E){return (function(F,E){return F.current;})(D, E);}), MoveNext: (function(E){return (function(F,E){var G = (function(H){var I = e(F.acc);var J = F.unfold(I);if ((J.Tag == 1.000000)) {var K = h(J).Items[0.000000];var L = h(J).Items[1.000000];F.acc = {Tag: 1.000000, Value: L};F.current = K;return true;}else{F.acc = {Tag: 0.000000};F.current = null;return false;};});return (i(F.acc) && (function(){var H;return G(H);})());})(D, E);}), Reset: (function(E){return (function(F,E){F.acc = {Tag: 1.000000, Value: F.seed};F.current = null;})(D, E);}), Dispose: (function(E){return (function(F,E){;})(D, E);})};}));});t = (function(A,B){return p((function(C){var D;D = (new z(B, A));return {get_Current: (function(E){return (function(F,E){return F.current;})(D, E);}), MoveNext: (function(E){return (function(F,E){var G = (function(H){var I = f(F.acc);var J = F.unfold(I);if ((J.Tag == 1.000000)) {var K = g(J).Items[0.000000];var L = g(J).Items[1.000000];F.acc = {Tag: 1.000000, Value: L};F.current = K;return true;}else{F.acc = {Tag: 0.000000};F.current = null;return false;};});return (j(F.acc) && (function(){var H;return G(H);})());})(D, E);}), Reset: (function(E){return (function(F,E){F.acc = {Tag: 1.000000, Value: F.seed};F.current = null;})(D, E);}), Dispose: (function(E){return (function(F,E){;})(D, E);})};}));});u = (function(A,B){return A.replace(/\{(\d+)(,-?\d+)?(?:\:(.+?))?\}/g, function(match, number, alignment, format) { | |
var rep = match; | |
if (B[number] !== undefined) { | |
rep = B[number]; | |
if (format !== undefined) { | |
if (typeof rep === 'number') { | |
switch (format.substring(0,1)) { | |
case "f": case "F": return format.length > 1 ? rep.toFixed(format.substring(1)) : rep.toFixed(2); | |
case "g": case "G": return format.length > 1 ? rep.toPrecision(format.substring(1)) : rep.toPrecision(); | |
case "e": case "E": return format.length > 1 ? rep.toExponential(format.substring(1)) : rep.toExponential(); | |
case "p": case "P": return (format.length > 1 ? (rep * 100).toFixed(format.substring(1)) : (rep * 100).toFixed(2)) + " %"; | |
} | |
} | |
else if (rep instanceof Date) { | |
if (format.length === 1) { | |
switch (format) { | |
case "D": return rep.toDateString(); | |
case "T": return rep.toLocaleTimeString(); | |
case "d": return rep.toLocaleDateString(); | |
case "t": return rep.toLocaleTimeString().replace(/:\d\d(?!:)/, ''); | |
} | |
} | |
return format.replace(/(\w)\1*/g, function (match2) { | |
var rep2 = match2; | |
switch (match2.substring(0,1)) { | |
case "y": rep2 = match2.length < 4 ? rep.getFullYear() % 100 : rep.getFullYear(); break; | |
case "h": rep2 = rep.getHours() > 12 ? rep.getHours() % 12 : rep.getHours(); break; | |
case "M": rep2 = rep.getMonth() + 1; break; | |
case "d": rep2 = rep.getDate(); break; | |
case "H": rep2 = rep.getHours(); break; | |
case "m": rep2 = rep.getMinutes(); break; | |
case "s": rep2 = rep.getSeconds(); break; | |
} | |
if (rep2 !== match2 && rep2 < 10 && match2.length > 1) { rep2 = "0" + rep2; } | |
return rep2; | |
}) | |
} | |
} | |
} | |
return rep; | |
});});v = (function(Item0,Item1){var C = this;C.Items = [Item0, Item1];});w = (function(Item0,Item1){var C = this;C.Items = [Item0, Item1];});x = (function(Item0,Item1){var C = this;C.Items = [Item0, Item1];});y = (function(A,B){var C = this;{};C.seed = A;C.unfold = B;C.acc = {Tag: 1.000000, Value: C.seed};C.current = null;});z = (function(A,B){var C = this;{};C.seed = A;C.unfold = B;C.acc = {Tag: 1.000000, Value: C.seed};C.current = null;});var A = d(m((function(B){return r((function(C){return (new w(C.toString(), (C * C)));}), l(1, 10));})));var B = Object.keys(A).length;var C = A;c(C, "100", 100);return u("IDictionary Count: {0} - Dictionary Count: {1}", [B, Object.keys(C).length]).toLowerCase() | |
***** FunScript.Tests.Dictionaries.Dictionary creation with size works | |
// Code: | |
var a;a = (function(b){return {};});var b = a(5);return true | |
***** FunScript.Tests.Dictionaries.Dictionary creation works | |
// Code: | |
var a = {};return true | |
***** FunScript.Tests.Dictionaries.Dictionary folding works | |
// Code: | |
var A, z, y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(B){return B.length;;});b = (function(B){var C = this;{};C.factory = B;});c = (function(B){var C = this;{};C.factory = B;});d = (function(B,C){var D = this;{};D.key = B;D.value = C;});e = (function(B,C){return B.value;});f = (function(B,C,D){if (B[C] === undefined) { B[C] = D } else { throw 'Key already exists' };});g = (function(B){var C = Object.keys(B);return w((function(D){if ((D < a(C))) {var E = C[D];return {Tag: 1.000000, Value: (new y((new d(E, B[E])), (D + 1)))};}else{return {Tag: 0.000000};};}), 0);});h = (function(B){return B.Value;;});i = (function(B){return B.Value;;});j = (function(B){return B.Value;;});k = (function(B){return B.Value;;});l = (function(B){return ((B.Tag == 1.000000) && true);});m = (function(B){return ((B.Tag == 1.000000) && true);});n = (function(B,C,D){var E = 0;return v((function(F){if ((((C > E) && (F <= D)) || ((C < E) && (F >= D)))) {return {Tag: 1.000000, Value: (new x(F, (F + C)))};}else{return {Tag: 0.000000};};}), B);});o = (function(B,C){return n(B, 1, C);});p = (function(B){return B.GetEnumerator();});q = (function(B,C,D){return r((function(E){return (function(F){return (function(G){return B(F)(G);});});}), C, D);});r = (function(B,C,D){return s(B, C, p(D));});s = (function(B,C,D){var E = {contents: 0};var F = {contents: C};while (D.MoveNext()){F.contents = B(E.contents)(F.contents)(D.get_Current());null;E.contents = (E.contents + 1);null;};return F.contents;});t = (function(B){var C;C = (new b(B));return {GetEnumerator: (function(D){return (function(E,D){var F;return E.factory(F);})(C, D);})};});u = (function(B){var C;C = (new c(B));return {GetEnumerator: (function(D){return (function(E,D){var F;return E.factory(F);})(C, D);})};});v = (function(B,C){return t((function(D){var E;E = (new z(C, B));return {get_Current: (function(F){return (function(G,F){return G.current;})(E, F);}), MoveNext: (function(F){return (function(G,F){var H = (function(I){var J = h(G.acc);var K = G.unfold(J);if ((K.Tag == 1.000000)) {var L = j(K).Items[0.000000];var M = j(K).Items[1.000000];G.acc = {Tag: 1.000000, Value: M};G.current = L;return true;}else{G.acc = {Tag: 0.000000};G.current = null;return false;};});return (l(G.acc) && (function(){var I;return H(I);})());})(E, F);}), Reset: (function(F){return (function(G,F){G.acc = {Tag: 1.000000, Value: G.seed};G.current = null;})(E, F);}), Dispose: (function(F){return (function(G,F){;})(E, F);})};}));});w = (function(B,C){return u((function(D){var E;E = (new A(C, B));return {get_Current: (function(F){return (function(G,F){return G.current;})(E, F);}), MoveNext: (function(F){return (function(G,F){var H = (function(I){var J = i(G.acc);var K = G.unfold(J);if ((K.Tag == 1.000000)) {var L = k(K).Items[0.000000];var M = k(K).Items[1.000000];G.acc = {Tag: 1.000000, Value: M};G.current = L;return true;}else{G.acc = {Tag: 0.000000};G.current = null;return false;};});return (m(G.acc) && (function(){var I;return H(I);})());})(E, F);}), Reset: (function(F){return (function(G,F){G.acc = {Tag: 1.000000, Value: G.seed};G.current = null;})(E, F);}), Dispose: (function(F){return (function(G,F){;})(E, F);})};}));});x = (function(Item0,Item1){var D = this;D.Items = [Item0, Item1];});y = (function(Item0,Item1){var D = this;D.Items = [Item0, Item1];});z = (function(B,C){var D = this;{};D.seed = B;D.unfold = C;D.acc = {Tag: 1.000000, Value: D.seed};D.current = null;});A = (function(B,C){var D = this;{};D.seed = B;D.unfold = C;D.acc = {Tag: 1.000000, Value: D.seed};D.current = null;});var B = {};var C = o(1.000000, 10.000000);var D = C.GetEnumerator();try{while (D.MoveNext()){var E = D.get_Current();f(B, E, (E * E));};}finally{if (false) {D.Dispose();}else{;};};var F = (function(G){return (function(H){return (G + e(H));});});var G = 0.000000;return (function(H){return q(F, G, g(H));})(B) | |
***** FunScript.Tests.Dictionaries.Dictionary indexer getter works | |
// Code: | |
var a;a = (function(b,c,d){if (b[c] === undefined) { b[c] = d } else { throw 'Key already exists' };});var b = {};a(b, "A", "Hello");a(b, "B", 2);return b["B"].toString() | |
***** FunScript.Tests.Dictionaries.Dictionary iteration works | |
// Code: | |
var w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(x){return x.length;;});b = (function(x){var y = this;{};y.factory = x;});c = (function(x){var y = this;{};y.factory = x;});d = (function(x,y){var z = this;{};z.key = x;z.value = y;});e = (function(x,y){return x.value;});f = (function(x,y,z){if (x[y] === undefined) { x[y] = z } else { throw 'Key already exists' };});g = (function(x){var y = Object.keys(x);return s((function(z){if ((z < a(y))) {var A = y[z];return {Tag: 1.000000, Value: (new u((new d(A, x[A])), (z + 1)))};}else{return {Tag: 0.000000};};}), 0);});h = (function(x){return x.Value;;});i = (function(x){return x.Value;;});j = (function(x){return x.Value;;});k = (function(x){return x.Value;;});l = (function(x){return ((x.Tag == 1.000000) && true);});m = (function(x){return ((x.Tag == 1.000000) && true);});n = (function(x,y,z){var A = 0;return r((function(B){if ((((y > A) && (B <= z)) || ((y < A) && (B >= z)))) {return {Tag: 1.000000, Value: (new t(B, (B + y)))};}else{return {Tag: 0.000000};};}), x);});o = (function(x,y){return n(x, 1, y);});p = (function(x){var y;y = (new b(x));return {GetEnumerator: (function(z){return (function(A,z){var B;return A.factory(B);})(y, z);})};});q = (function(x){var y;y = (new c(x));return {GetEnumerator: (function(z){return (function(A,z){var B;return A.factory(B);})(y, z);})};});r = (function(x,y){return p((function(z){var A;A = (new v(y, x));return {get_Current: (function(B){return (function(C,B){return C.current;})(A, B);}), MoveNext: (function(B){return (function(C,B){var D = (function(E){var F = h(C.acc);var G = C.unfold(F);if ((G.Tag == 1.000000)) {var H = j(G).Items[0.000000];var I = j(G).Items[1.000000];C.acc = {Tag: 1.000000, Value: I};C.current = H;return true;}else{C.acc = {Tag: 0.000000};C.current = null;return false;};});return (l(C.acc) && (function(){var E;return D(E);})());})(A, B);}), Reset: (function(B){return (function(C,B){C.acc = {Tag: 1.000000, Value: C.seed};C.current = null;})(A, B);}), Dispose: (function(B){return (function(C,B){;})(A, B);})};}));});s = (function(x,y){return q((function(z){var A;A = (new w(y, x));return {get_Current: (function(B){return (function(C,B){return C.current;})(A, B);}), MoveNext: (function(B){return (function(C,B){var D = (function(E){var F = i(C.acc);var G = C.unfold(F);if ((G.Tag == 1.000000)) {var H = k(G).Items[0.000000];var I = k(G).Items[1.000000];C.acc = {Tag: 1.000000, Value: I};C.current = H;return true;}else{C.acc = {Tag: 0.000000};C.current = null;return false;};});return (m(C.acc) && (function(){var E;return D(E);})());})(A, B);}), Reset: (function(B){return (function(C,B){C.acc = {Tag: 1.000000, Value: C.seed};C.current = null;})(A, B);}), Dispose: (function(B){return (function(C,B){;})(A, B);})};}));});t = (function(Item0,Item1){var z = this;z.Items = [Item0, Item1];});u = (function(Item0,Item1){var z = this;z.Items = [Item0, Item1];});v = (function(x,y){var z = this;{};z.seed = x;z.unfold = y;z.acc = {Tag: 1.000000, Value: z.seed};z.current = null;});w = (function(x,y){var z = this;{};z.seed = x;z.unfold = y;z.acc = {Tag: 1.000000, Value: z.seed};z.current = null;});var x = {};var y = o(1.000000, 10.000000);var z = y.GetEnumerator();try{while (z.MoveNext()){var A = z.get_Current();f(x, A, (A * A));};}finally{if (false) {z.Dispose();}else{;};};var B = {contents: 0.000000};var C = g(x).GetEnumerator();try{while (C.MoveNext()){var D = C.get_Current();B.contents = (e(D) + B.contents);null;};}finally{C.Dispose();};return (B.contents + x[1.000000]) | |
***** FunScript.Tests.Dictionaries.Dictionary.Add works | |
// Code: | |
var a;a = (function(b,c,d){if (b[c] === undefined) { b[c] = d } else { throw 'Key already exists' };});var b = {};a(b, "A", "Hello");a(b, "B", "World!");return Object.keys(b).length | |
***** FunScript.Tests.Dictionaries.Dictionary.Clear works | |
// Code: | |
var a;a = (function(b,c,d){if (b[c] === undefined) { b[c] = d } else { throw 'Key already exists' };});var b = {};a(b, "A", 1);a(b, "B", 2);(b = {});return Object.keys(b).length | |
***** FunScript.Tests.Dictionaries.Dictionary.ContainsKey works("C") | |
// Code: | |
var a;a = (function(b,c,d){if (b[c] === undefined) { b[c] = d } else { throw 'Key already exists' };});var b = {};a(b, "A", "Hello");a(b, "B", "World!");return (b["C"] !== undefined) | |
***** FunScript.Tests.Dictionaries.Dictionary.ContainsKey works("A") | |
// Code: | |
var a;a = (function(b,c,d){if (b[c] === undefined) { b[c] = d } else { throw 'Key already exists' };});var b = {};a(b, "A", "Hello");a(b, "B", "World!");return (b["A"] !== undefined) | |
***** FunScript.Tests.Dictionaries.Dictionary.ContainsValue works("Everybody!") | |
// Code: | |
var b, a;a = (function(c,d,e){if (c[d] === undefined) { c[d] = e } else { throw 'Key already exists' };});b = (function(c,d){for (var key in c) { if (c[key] === d) { return true } } return false;});var c = {};a(c, "A", "Hello");a(c, "B", "World!");return b(c, "Everybody!") | |
***** FunScript.Tests.Dictionaries.Dictionary.ContainsValue works("Hello") | |
// Code: | |
var b, a;a = (function(c,d,e){if (c[d] === undefined) { c[d] = e } else { throw 'Key already exists' };});b = (function(c,d){for (var key in c) { if (c[key] === d) { return true } } return false;});var c = {};a(c, "A", "Hello");a(c, "B", "World!");return b(c, "Hello") | |
***** FunScript.Tests.Dictionaries.Dictionary.Count works | |
// Code: | |
var k, j, i, h, g, f, e, d, c, b, a;a = (function(l){var m = this;{};m.factory = l;});b = (function(l,m,n){if (l[m] === undefined) { l[m] = n } else { throw 'Key already exists' };});c = (function(l){return l.Value;;});d = (function(l){return l.Value;;});e = (function(l){return ((l.Tag == 1.000000) && true);});f = (function(l,m,n){var o = 0;return i((function(p){if ((((m > o) && (p <= n)) || ((m < o) && (p >= n)))) {return {Tag: 1.000000, Value: (new j(p, (p + m)))};}else{return {Tag: 0.000000};};}), l);});g = (function(l,m){return f(l, 1, m);});h = (function(l){var m;m = (new a(l));return {GetEnumerator: (function(n){return (function(o,n){var p;return o.factory(p);})(m, n);})};});i = (function(l,m){return h((function(n){var o;o = (new k(m, l));return {get_Current: (function(p){return (function(q,p){return q.current;})(o, p);}), MoveNext: (function(p){return (function(q,p){var r = (function(s){var t = c(q.acc);var u = q.unfold(t);if ((u.Tag == 1.000000)) {var v = d(u).Items[0.000000];var w = d(u).Items[1.000000];q.acc = {Tag: 1.000000, Value: w};q.current = v;return true;}else{q.acc = {Tag: 0.000000};q.current = null;return false;};});return (e(q.acc) && (function(){var s;return r(s);})());})(o, p);}), Reset: (function(p){return (function(q,p){q.acc = {Tag: 1.000000, Value: q.seed};q.current = null;})(o, p);}), Dispose: (function(p){return (function(q,p){;})(o, p);})};}));});j = (function(Item0,Item1){var n = this;n.Items = [Item0, Item1];});k = (function(l,m){var n = this;{};n.seed = l;n.unfold = m;n.acc = {Tag: 1.000000, Value: n.seed};n.current = null;});var l = {};var m = g(1.000000, 10.000000);var n = m.GetEnumerator();try{while (n.MoveNext()){var o = n.get_Current();b(l, o, (o * o));};}finally{if (false) {n.Dispose();}else{;};};return Object.keys(l).length | |
***** FunScript.Tests.Dictionaries.Dictionary.Keys works | |
// Code: | |
var o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(p){return p.length;;});b = (function(p){var q = this;{};q.factory = p;});c = (function(p,q,r){if (p[q] === undefined) { p[q] = r } else { throw 'Key already exists' };});d = (function(p){var q = p;return m((function(r){if ((r < a(q))) {return {Tag: 1.000000, Value: (new n(q[r], (r + 1)))};}else{return {Tag: 0.000000};};}), 0);});e = (function(p){return p.Value;;});f = (function(p){return p.Value;;});g = (function(p){return ((p.Tag == 1.000000) && true);});h = (function(p){return p.GetEnumerator();});i = (function(p,q,r){return j((function(s){return (function(t){return (function(u){return p(t)(u);});});}), q, r);});j = (function(p,q,r){return k(p, q, h(r));});k = (function(p,q,r){var s = {contents: 0};var t = {contents: q};while (r.MoveNext()){t.contents = p(s.contents)(t.contents)(r.get_Current());null;s.contents = (s.contents + 1);null;};return t.contents;});l = (function(p){var q;q = (new b(p));return {GetEnumerator: (function(r){return (function(s,r){var t;return s.factory(t);})(q, r);})};});m = (function(p,q){return l((function(r){var s;s = (new o(q, p));return {get_Current: (function(t){return (function(u,t){return u.current;})(s, t);}), MoveNext: (function(t){return (function(u,t){var v = (function(w){var x = e(u.acc);var y = u.unfold(x);if ((y.Tag == 1.000000)) {var z = f(y).Items[0.000000];var A = f(y).Items[1.000000];u.acc = {Tag: 1.000000, Value: A};u.current = z;return true;}else{u.acc = {Tag: 0.000000};u.current = null;return false;};});return (g(u.acc) && (function(){var w;return v(w);})());})(s, t);}), Reset: (function(t){return (function(u,t){u.acc = {Tag: 1.000000, Value: u.seed};u.current = null;})(s, t);}), Dispose: (function(t){return (function(u,t){;})(s, t);})};}));});n = (function(Item0,Item1){var r = this;r.Items = [Item0, Item1];});o = (function(p,q){var r = this;{};r.seed = p;r.unfold = q;r.acc = {Tag: 1.000000, Value: r.seed};r.current = null;});var p = {};c(p, "A", 1);c(p, "B", 2);var q = (function(r){return (function(s){return (r + p[s]);});});var r = 0;return (function(s){return i(q, r, d(s));})(Object.keys(p)) | |
***** FunScript.Tests.Dictionaries.Dictionary.Remove works("C") | |
// Code: | |
var c, b, a;a = (function(d,e,f){if (d[e] === undefined) { d[e] = f } else { throw 'Key already exists' };});b = (function(d,e){if (d[e] !== undefined) { delete d[e]; return true; } else { return false; };});c = (function(d,e){return d.replace(/\{(\d+)(,-?\d+)?(?:\:(.+?))?\}/g, function(match, number, alignment, format) { | |
var rep = match; | |
if (e[number] !== undefined) { | |
rep = e[number]; | |
if (format !== undefined) { | |
if (typeof rep === 'number') { | |
switch (format.substring(0,1)) { | |
case "f": case "F": return format.length > 1 ? rep.toFixed(format.substring(1)) : rep.toFixed(2); | |
case "g": case "G": return format.length > 1 ? rep.toPrecision(format.substring(1)) : rep.toPrecision(); | |
case "e": case "E": return format.length > 1 ? rep.toExponential(format.substring(1)) : rep.toExponential(); | |
case "p": case "P": return (format.length > 1 ? (rep * 100).toFixed(format.substring(1)) : (rep * 100).toFixed(2)) + " %"; | |
} | |
} | |
else if (rep instanceof Date) { | |
if (format.length === 1) { | |
switch (format) { | |
case "D": return rep.toDateString(); | |
case "T": return rep.toLocaleTimeString(); | |
case "d": return rep.toLocaleDateString(); | |
case "t": return rep.toLocaleTimeString().replace(/:\d\d(?!:)/, ''); | |
} | |
} | |
return format.replace(/(\w)\1*/g, function (match2) { | |
var rep2 = match2; | |
switch (match2.substring(0,1)) { | |
case "y": rep2 = match2.length < 4 ? rep.getFullYear() % 100 : rep.getFullYear(); break; | |
case "h": rep2 = rep.getHours() > 12 ? rep.getHours() % 12 : rep.getHours(); break; | |
case "M": rep2 = rep.getMonth() + 1; break; | |
case "d": rep2 = rep.getDate(); break; | |
case "H": rep2 = rep.getHours(); break; | |
case "m": rep2 = rep.getMinutes(); break; | |
case "s": rep2 = rep.getSeconds(); break; | |
} | |
if (rep2 !== match2 && rep2 < 10 && match2.length > 1) { rep2 = "0" + rep2; } | |
return rep2; | |
}) | |
} | |
} | |
} | |
return rep; | |
});});var d = {};a(d, "A", "Hello");a(d, "B", "World!");var e = b(d, "C");return c("Removed? {0} Count {1}", [e, Object.keys(d).length]).toLowerCase() | |
***** FunScript.Tests.Dictionaries.Dictionary.Remove works("A") | |
// Code: | |
var c, b, a;a = (function(d,e,f){if (d[e] === undefined) { d[e] = f } else { throw 'Key already exists' };});b = (function(d,e){if (d[e] !== undefined) { delete d[e]; return true; } else { return false; };});c = (function(d,e){return d.replace(/\{(\d+)(,-?\d+)?(?:\:(.+?))?\}/g, function(match, number, alignment, format) { | |
var rep = match; | |
if (e[number] !== undefined) { | |
rep = e[number]; | |
if (format !== undefined) { | |
if (typeof rep === 'number') { | |
switch (format.substring(0,1)) { | |
case "f": case "F": return format.length > 1 ? rep.toFixed(format.substring(1)) : rep.toFixed(2); | |
case "g": case "G": return format.length > 1 ? rep.toPrecision(format.substring(1)) : rep.toPrecision(); | |
case "e": case "E": return format.length > 1 ? rep.toExponential(format.substring(1)) : rep.toExponential(); | |
case "p": case "P": return (format.length > 1 ? (rep * 100).toFixed(format.substring(1)) : (rep * 100).toFixed(2)) + " %"; | |
} | |
} | |
else if (rep instanceof Date) { | |
if (format.length === 1) { | |
switch (format) { | |
case "D": return rep.toDateString(); | |
case "T": return rep.toLocaleTimeString(); | |
case "d": return rep.toLocaleDateString(); | |
case "t": return rep.toLocaleTimeString().replace(/:\d\d(?!:)/, ''); | |
} | |
} | |
return format.replace(/(\w)\1*/g, function (match2) { | |
var rep2 = match2; | |
switch (match2.substring(0,1)) { | |
case "y": rep2 = match2.length < 4 ? rep.getFullYear() % 100 : rep.getFullYear(); break; | |
case "h": rep2 = rep.getHours() > 12 ? rep.getHours() % 12 : rep.getHours(); break; | |
case "M": rep2 = rep.getMonth() + 1; break; | |
case "d": rep2 = rep.getDate(); break; | |
case "H": rep2 = rep.getHours(); break; | |
case "m": rep2 = rep.getMinutes(); break; | |
case "s": rep2 = rep.getSeconds(); break; | |
} | |
if (rep2 !== match2 && rep2 < 10 && match2.length > 1) { rep2 = "0" + rep2; } | |
return rep2; | |
}) | |
} | |
} | |
} | |
return rep; | |
});});var d = {};a(d, "A", "Hello");a(d, "B", "World!");var e = b(d, "A");return c("Removed? {0} Count {1}", [e, Object.keys(d).length]).toLowerCase() | |
***** FunScript.Tests.Dictionaries.Dictionary.Values works | |
// Code: | |
var l, k, j, i, h, g, f, e, d, c, b, a;a = (function(m){return m.length;;});b = (function(m){var n = this;{};n.factory = m;});c = (function(m,n,o){if (m[n] === undefined) { m[n] = o } else { throw 'Key already exists' };});d = (function(m){var values = []; for (var k in m) { values.push(m[k]) } return values;});e = (function(m){var n = m;return j((function(o){if ((o < a(n))) {return {Tag: 1.000000, Value: (new k(n[o], (o + 1)))};}else{return {Tag: 0.000000};};}), 0);});f = (function(m){return m.Value;;});g = (function(m){return m.Value;;});h = (function(m){return ((m.Tag == 1.000000) && true);});i = (function(m){var n;n = (new b(m));return {GetEnumerator: (function(o){return (function(p,o){var q;return p.factory(q);})(n, o);})};});j = (function(m,n){return i((function(o){var p;p = (new l(n, m));return {get_Current: (function(q){return (function(r,q){return r.current;})(p, q);}), MoveNext: (function(q){return (function(r,q){var s = (function(t){var u = f(r.acc);var v = r.unfold(u);if ((v.Tag == 1.000000)) {var w = g(v).Items[0.000000];var x = g(v).Items[1.000000];r.acc = {Tag: 1.000000, Value: x};r.current = w;return true;}else{r.acc = {Tag: 0.000000};r.current = null;return false;};});return (h(r.acc) && (function(){var t;return s(t);})());})(p, q);}), Reset: (function(q){return (function(r,q){r.acc = {Tag: 1.000000, Value: r.seed};r.current = null;})(p, q);}), Dispose: (function(q){return (function(r,q){;})(p, q);})};}));});k = (function(Item0,Item1){var o = this;o.Items = [Item0, Item1];});l = (function(m,n){var o = this;{};o.seed = m;o.unfold = n;o.acc = {Tag: 1.000000, Value: o.seed};o.current = null;});var m = {};c(m, "A", 1);c(m, "B", 2);var n = {contents: 0};var o = d(m);var p = e(o).GetEnumerator();try{while (p.MoveNext()){var q = p.get_Current();n.contents = (q + n.contents);null;};}finally{p.Dispose();};return n.contents | |
***** FunScript.Tests.Dictionaries.Interface IDictionary creation works | |
// Code: | |
var y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(z){var A = this;{};A.factory = z;});b = (function(z){var A = this;{};A.factory = z;});c = (function(z,A,B){if (z[A] === undefined) { z[A] = B } else { throw 'Key already exists' };});d = (function(z){var A = {};var B = z.GetEnumerator();try{while (B.MoveNext()){var C = B.get_Current();var D = C.Items[1.000000];var E = C.Items[0.000000];c(A, E, D);};}finally{if (false) {B.Dispose();}else{;};};return A;});e = (function(z){return z.Value;;});f = (function(z){return z.Value;;});g = (function(z){return z.Value;;});h = (function(z){return z.Value;;});i = (function(z){return ((z.Tag == 1.000000) && true);});j = (function(z){return ((z.Tag == 1.000000) && true);});k = (function(z,A,B){var C = 0;return s((function(D){if ((((A > C) && (D <= B)) || ((A < C) && (D >= B)))) {return {Tag: 1.000000, Value: (new u(D, (D + A)))};}else{return {Tag: 0.000000};};}), z);});l = (function(z,A){return k(z, 1, A);});m = (function(z){return q((function(A){var B;return o(z(B));}));});n = (function(z){return z.GetEnumerator();});o = (function(z){return z.GetEnumerator();});p = (function(z){var A;A = (new a(z));return {GetEnumerator: (function(B){return (function(C,B){var D;return C.factory(D);})(A, B);})};});q = (function(z){var A;A = (new b(z));return {GetEnumerator: (function(B){return (function(C,B){var D;return C.factory(D);})(A, B);})};});r = (function(z,A){return m((function(B){return t((function(C){if (C.MoveNext()) {return {Tag: 1.000000, Value: (new w(z(C.get_Current()), C))};}else{return {Tag: 0.000000};};}), n(A));}));});s = (function(z,A){return p((function(B){var C;C = (new x(A, z));return {get_Current: (function(D){return (function(E,D){return E.current;})(C, D);}), MoveNext: (function(D){return (function(E,D){var F = (function(G){var H = e(E.acc);var I = E.unfold(H);if ((I.Tag == 1.000000)) {var J = g(I).Items[0.000000];var K = g(I).Items[1.000000];E.acc = {Tag: 1.000000, Value: K};E.current = J;return true;}else{E.acc = {Tag: 0.000000};E.current = null;return false;};});return (i(E.acc) && (function(){var G;return F(G);})());})(C, D);}), Reset: (function(D){return (function(E,D){E.acc = {Tag: 1.000000, Value: E.seed};E.current = null;})(C, D);}), Dispose: (function(D){return (function(E,D){;})(C, D);})};}));});t = (function(z,A){return q((function(B){var C;C = (new y(A, z));return {get_Current: (function(D){return (function(E,D){return E.current;})(C, D);}), MoveNext: (function(D){return (function(E,D){var F = (function(G){var H = f(E.acc);var I = E.unfold(H);if ((I.Tag == 1.000000)) {var J = h(I).Items[0.000000];var K = h(I).Items[1.000000];E.acc = {Tag: 1.000000, Value: K};E.current = J;return true;}else{E.acc = {Tag: 0.000000};E.current = null;return false;};});return (j(E.acc) && (function(){var G;return F(G);})());})(C, D);}), Reset: (function(D){return (function(E,D){E.acc = {Tag: 1.000000, Value: E.seed};E.current = null;})(C, D);}), Dispose: (function(D){return (function(E,D){;})(C, D);})};}));});u = (function(Item0,Item1){var B = this;B.Items = [Item0, Item1];});v = (function(Item0,Item1){var B = this;B.Items = [Item0, Item1];});w = (function(Item0,Item1){var B = this;B.Items = [Item0, Item1];});x = (function(z,A){var B = this;{};B.seed = z;B.unfold = A;B.acc = {Tag: 1.000000, Value: B.seed};B.current = null;});y = (function(z,A){var B = this;{};B.seed = z;B.unfold = A;B.acc = {Tag: 1.000000, Value: B.seed};B.current = null;});var z = d(m((function(A){return r((function(B){return (new v(B.toString(), (B * B)));}), l(1.000000, 10.000000));})));return z["2"] | |
***** FunScript.Tests.Dictionaries.Interface IDictionary folding works | |
// Code: | |
var H, G, F, E, D, C, B, A, z, y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(I){return I.length;;});b = (function(I){var J = this;{};J.factory = I;});c = (function(I){var J = this;{};J.factory = I;});d = (function(I,J){var K = this;{};K.key = I;K.value = J;});e = (function(I,J){return I.value;});f = (function(I,J){return (new G(I, J));});g = (function(){return (new H());});h = (function(I){if ((I.Tag == 1.000000)) {var J = I.Item2;var K = I.Item1;return K;}else{throw ("List was empty");return null;};});i = (function(I){if ((I.Tag == 1.000000)) {var J = I.Item2;var K = I.Item1;return J;}else{throw ("List was empty");return null;};});j = (function(I,J,K){if (I[J] === undefined) { I[J] = K } else { throw 'Key already exists' };});k = (function(I){var J = Object.keys(I);return A((function(K){if ((K < a(J))) {var L = J[K];return {Tag: 1.000000, Value: (new B((new d(L, I[L])), (K + 1)))};}else{return {Tag: 0.000000};};}), 0);});l = (function(I){var J = {};var K = I.GetEnumerator();try{while (K.MoveNext()){var L = K.get_Current();var M = L.Items[1.000000];var N = L.Items[0.000000];j(J, N, M);};}finally{if (false) {K.Dispose();}else{;};};return J;});m = (function(I){return I.Value;;});n = (function(I){return I.Value;;});o = (function(I){return I.Value;;});p = (function(I){return I.Value;;});q = (function(I){return ((I.Tag == 1.000000) && true);});r = (function(I){return ((I.Tag == 1.000000) && true);});s = (function(I){return I.GetEnumerator();});t = (function(I,J,K){return u((function(L){return (function(M){return (function(N){return I(M)(N);});});}), J, K);});u = (function(I,J,K){return v(I, J, s(K));});v = (function(I,J,K){var L = {contents: 0};var M = {contents: J};while (K.MoveNext()){M.contents = I(L.contents)(M.contents)(K.get_Current());null;L.contents = (L.contents + 1);null;};return M.contents;});w = (function(I){var J;J = (new b(I));return {GetEnumerator: (function(K){return (function(L,K){var M;return L.factory(M);})(J, K);})};});x = (function(I){var J;J = (new c(I));return {GetEnumerator: (function(K){return (function(L,K){var M;return L.factory(M);})(J, K);})};});y = (function(I){return z((function(J){if ((J.Tag == 1.000000)) {var K = i(J);var L = h(J);return {Tag: 1.000000, Value: (new D(L, K))};}else{return {Tag: 0.000000};};}), I);});z = (function(I,J){return x((function(K){var L;L = (new E(J, I));return {get_Current: (function(M){return (function(N,M){return N.current;})(L, M);}), MoveNext: (function(M){return (function(N,M){var O = (function(P){var Q = m(N.acc);var R = N.unfold(Q);if ((R.Tag == 1.000000)) {var S = p(R).Items[0.000000];var T = p(R).Items[1.000000];N.acc = {Tag: 1.000000, Value: T};N.current = S;return true;}else{N.acc = {Tag: 0.000000};N.current = null;return false;};});return (q(N.acc) && (function(){var P;return O(P);})());})(L, M);}), Reset: (function(M){return (function(N,M){N.acc = {Tag: 1.000000, Value: N.seed};N.current = null;})(L, M);}), Dispose: (function(M){return (function(N,M){;})(L, M);})};}));});A = (function(I,J){return w((function(K){var L;L = (new F(J, I));return {get_Current: (function(M){return (function(N,M){return N.current;})(L, M);}), MoveNext: (function(M){return (function(N,M){var O = (function(P){var Q = n(N.acc);var R = N.unfold(Q);if ((R.Tag == 1.000000)) {var S = o(R).Items[0.000000];var T = o(R).Items[1.000000];N.acc = {Tag: 1.000000, Value: T};N.current = S;return true;}else{N.acc = {Tag: 0.000000};N.current = null;return false;};});return (r(N.acc) && (function(){var P;return O(P);})());})(L, M);}), Reset: (function(M){return (function(N,M){N.acc = {Tag: 1.000000, Value: N.seed};N.current = null;})(L, M);}), Dispose: (function(M){return (function(N,M){;})(L, M);})};}));});B = (function(Item0,Item1){var K = this;K.Items = [Item0, Item1];});C = (function(Item0,Item1){var K = this;K.Items = [Item0, Item1];});D = (function(Item0,Item1){var K = this;K.Items = [Item0, Item1];});E = (function(I,J){var K = this;{};K.seed = I;K.unfold = J;K.acc = {Tag: 1.000000, Value: K.seed};K.current = null;});F = (function(I,J){var K = this;{};K.seed = I;K.unfold = J;K.acc = {Tag: 1.000000, Value: K.seed};K.current = null;});G = (function(Item1,Item2){var K = this;K.Tag = 1.000000;K._CaseName = "Cons";K.Item1 = Item1;K.Item2 = Item2;});H = (function(){var I = this;I.Tag = 0.000000;I._CaseName = "Nil";});var I = l(y(f((new C("A", 1.000000)), f((new C("B", 2.000000)), f((new C("C", 3.000000)), g())))));var J = (function(K){return (function(L){return (K + e(L));});});var K = 0.000000;return (function(L){return t(J, K, k(L));})(I) | |
***** FunScript.Tests.Dictionaries.Interface IDictionary indexer getter works | |
// Code: | |
var y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(z){var A = this;{};A.factory = z;});b = (function(z){var A = this;{};A.factory = z;});c = (function(z,A,B){if (z[A] === undefined) { z[A] = B } else { throw 'Key already exists' };});d = (function(z){var A = {};var B = z.GetEnumerator();try{while (B.MoveNext()){var C = B.get_Current();var D = C.Items[1.000000];var E = C.Items[0.000000];c(A, E, D);};}finally{if (false) {B.Dispose();}else{;};};return A;});e = (function(z){return z.Value;;});f = (function(z){return z.Value;;});g = (function(z){return z.Value;;});h = (function(z){return z.Value;;});i = (function(z){return ((z.Tag == 1.000000) && true);});j = (function(z){return ((z.Tag == 1.000000) && true);});k = (function(z,A,B){var C = 0;return s((function(D){if ((((A > C) && (D <= B)) || ((A < C) && (D >= B)))) {return {Tag: 1.000000, Value: (new u(D, (D + A)))};}else{return {Tag: 0.000000};};}), z);});l = (function(z,A){return k(z, 1, A);});m = (function(z){return q((function(A){var B;return o(z(B));}));});n = (function(z){return z.GetEnumerator();});o = (function(z){return z.GetEnumerator();});p = (function(z){var A;A = (new a(z));return {GetEnumerator: (function(B){return (function(C,B){var D;return C.factory(D);})(A, B);})};});q = (function(z){var A;A = (new b(z));return {GetEnumerator: (function(B){return (function(C,B){var D;return C.factory(D);})(A, B);})};});r = (function(z,A){return m((function(B){return t((function(C){if (C.MoveNext()) {return {Tag: 1.000000, Value: (new w(z(C.get_Current()), C))};}else{return {Tag: 0.000000};};}), n(A));}));});s = (function(z,A){return p((function(B){var C;C = (new x(A, z));return {get_Current: (function(D){return (function(E,D){return E.current;})(C, D);}), MoveNext: (function(D){return (function(E,D){var F = (function(G){var H = e(E.acc);var I = E.unfold(H);if ((I.Tag == 1.000000)) {var J = g(I).Items[0.000000];var K = g(I).Items[1.000000];E.acc = {Tag: 1.000000, Value: K};E.current = J;return true;}else{E.acc = {Tag: 0.000000};E.current = null;return false;};});return (i(E.acc) && (function(){var G;return F(G);})());})(C, D);}), Reset: (function(D){return (function(E,D){E.acc = {Tag: 1.000000, Value: E.seed};E.current = null;})(C, D);}), Dispose: (function(D){return (function(E,D){;})(C, D);})};}));});t = (function(z,A){return q((function(B){var C;C = (new y(A, z));return {get_Current: (function(D){return (function(E,D){return E.current;})(C, D);}), MoveNext: (function(D){return (function(E,D){var F = (function(G){var H = f(E.acc);var I = E.unfold(H);if ((I.Tag == 1.000000)) {var J = h(I).Items[0.000000];var K = h(I).Items[1.000000];E.acc = {Tag: 1.000000, Value: K};E.current = J;return true;}else{E.acc = {Tag: 0.000000};E.current = null;return false;};});return (j(E.acc) && (function(){var G;return F(G);})());})(C, D);}), Reset: (function(D){return (function(E,D){E.acc = {Tag: 1.000000, Value: E.seed};E.current = null;})(C, D);}), Dispose: (function(D){return (function(E,D){;})(C, D);})};}));});u = (function(Item0,Item1){var B = this;B.Items = [Item0, Item1];});v = (function(Item0,Item1){var B = this;B.Items = [Item0, Item1];});w = (function(Item0,Item1){var B = this;B.Items = [Item0, Item1];});x = (function(z,A){var B = this;{};B.seed = z;B.unfold = A;B.acc = {Tag: 1.000000, Value: B.seed};B.current = null;});y = (function(z,A){var B = this;{};B.seed = z;B.unfold = A;B.acc = {Tag: 1.000000, Value: B.seed};B.current = null;});var z = d(m((function(A){return r((function(B){return (new v(B.toString(), (B * B)));}), l(1.000000, 10.000000));})));return z["2"] | |
***** FunScript.Tests.Dictionaries.Interface IDictionary iteration works | |
// Code: | |
var K, J, I, H, G, F, E, D, C, B, A, z, y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(L){return L.length;;});b = (function(L){var M = this;{};M.factory = L;});c = (function(L){var M = this;{};M.factory = L;});d = (function(L){var M = this;{};M.factory = L;});e = (function(L,M){var N = this;{};N.key = L;N.value = M;});f = (function(L,M){return L.value;});g = (function(L,M,N){if (L[M] === undefined) { L[M] = N } else { throw 'Key already exists' };});h = (function(L){var M = Object.keys(L);return D((function(N){if ((N < a(M))) {var O = M[N];return {Tag: 1.000000, Value: (new F((new e(O, L[O])), (N + 1)))};}else{return {Tag: 0.000000};};}), 0);});i = (function(L){var M = {};var N = L.GetEnumerator();try{while (N.MoveNext()){var O = N.get_Current();var P = O.Items[1.000000];var Q = O.Items[0.000000];g(M, Q, P);};}finally{if (false) {N.Dispose();}else{;};};return M;});j = (function(L){return L.Value;;});k = (function(L){return L.Value;;});l = (function(L){return L.Value;;});m = (function(L){return L.Value;;});n = (function(L){return L.Value;;});o = (function(L){return L.Value;;});p = (function(L){return ((L.Tag == 1.000000) && true);});q = (function(L){return ((L.Tag == 1.000000) && true);});r = (function(L){return ((L.Tag == 1.000000) && true);});s = (function(L,M,N){var O = 0;return B((function(P){if ((((M > O) && (P <= N)) || ((M < O) && (P >= N)))) {return {Tag: 1.000000, Value: (new E(P, (P + M)))};}else{return {Tag: 0.000000};};}), L);});t = (function(L,M){return s(L, 1, M);});u = (function(L){return z((function(M){var N;return w(L(N));}));});v = (function(L){return L.GetEnumerator();});w = (function(L){return L.GetEnumerator();});x = (function(L){var M;M = (new b(L));return {GetEnumerator: (function(N){return (function(O,N){var P;return O.factory(P);})(M, N);})};});y = (function(L){var M;M = (new c(L));return {GetEnumerator: (function(N){return (function(O,N){var P;return O.factory(P);})(M, N);})};});z = (function(L){var M;M = (new d(L));return {GetEnumerator: (function(N){return (function(O,N){var P;return O.factory(P);})(M, N);})};});A = (function(L,M){return u((function(N){return C((function(O){if (O.MoveNext()) {return {Tag: 1.000000, Value: (new H(L(O.get_Current()), O))};}else{return {Tag: 0.000000};};}), v(M));}));});B = (function(L,M){return x((function(N){var O;O = (new I(M, L));return {get_Current: (function(P){return (function(Q,P){return Q.current;})(O, P);}), MoveNext: (function(P){return (function(Q,P){var R = (function(S){var T = j(Q.acc);var U = Q.unfold(T);if ((U.Tag == 1.000000)) {var V = m(U).Items[0.000000];var W = m(U).Items[1.000000];Q.acc = {Tag: 1.000000, Value: W};Q.current = V;return true;}else{Q.acc = {Tag: 0.000000};Q.current = null;return false;};});return (p(Q.acc) && (function(){var S;return R(S);})());})(O, P);}), Reset: (function(P){return (function(Q,P){Q.acc = {Tag: 1.000000, Value: Q.seed};Q.current = null;})(O, P);}), Dispose: (function(P){return (function(Q,P){;})(O, P);})};}));});C = (function(L,M){return z((function(N){var O;O = (new J(M, L));return {get_Current: (function(P){return (function(Q,P){return Q.current;})(O, P);}), MoveNext: (function(P){return (function(Q,P){var R = (function(S){var T = k(Q.acc);var U = Q.unfold(T);if ((U.Tag == 1.000000)) {var V = o(U).Items[0.000000];var W = o(U).Items[1.000000];Q.acc = {Tag: 1.000000, Value: W};Q.current = V;return true;}else{Q.acc = {Tag: 0.000000};Q.current = null;return false;};});return (q(Q.acc) && (function(){var S;return R(S);})());})(O, P);}), Reset: (function(P){return (function(Q,P){Q.acc = {Tag: 1.000000, Value: Q.seed};Q.current = null;})(O, P);}), Dispose: (function(P){return (function(Q,P){;})(O, P);})};}));});D = (function(L,M){return y((function(N){var O;O = (new K(M, L));return {get_Current: (function(P){return (function(Q,P){return Q.current;})(O, P);}), MoveNext: (function(P){return (function(Q,P){var R = (function(S){var T = l(Q.acc);var U = Q.unfold(T);if ((U.Tag == 1.000000)) {var V = n(U).Items[0.000000];var W = n(U).Items[1.000000];Q.acc = {Tag: 1.000000, Value: W};Q.current = V;return true;}else{Q.acc = {Tag: 0.000000};Q.current = null;return false;};});return (r(Q.acc) && (function(){var S;return R(S);})());})(O, P);}), Reset: (function(P){return (function(Q,P){Q.acc = {Tag: 1.000000, Value: Q.seed};Q.current = null;})(O, P);}), Dispose: (function(P){return (function(Q,P){;})(O, P);})};}));});E = (function(Item0,Item1){var N = this;N.Items = [Item0, Item1];});F = (function(Item0,Item1){var N = this;N.Items = [Item0, Item1];});G = (function(Item0,Item1){var N = this;N.Items = [Item0, Item1];});H = (function(Item0,Item1){var N = this;N.Items = [Item0, Item1];});I = (function(L,M){var N = this;{};N.seed = L;N.unfold = M;N.acc = {Tag: 1.000000, Value: N.seed};N.current = null;});J = (function(L,M){var N = this;{};N.seed = L;N.unfold = M;N.acc = {Tag: 1.000000, Value: N.seed};N.current = null;});K = (function(L,M){var N = this;{};N.seed = L;N.unfold = M;N.acc = {Tag: 1.000000, Value: N.seed};N.current = null;});var L = i(u((function(M){return A((function(N){return (new G(N.toString(), (N * N)));}), t(1.000000, 10.000000));})));var M = {contents: 0.000000};var N = h(L).GetEnumerator();try{while (N.MoveNext()){var O = N.get_Current();M.contents = (f(O) + M.contents);null;};}finally{if (false) {N.Dispose();}else{;};};return M.contents | |
***** FunScript.Tests.Dictionaries.Interface IDictionary.ContainsKey works("C") | |
// Code: | |
var r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(s){var t = this;{};t.factory = s;});b = (function(s,t){return (new q(s, t));});c = (function(){return (new r());});d = (function(s){if ((s.Tag == 1.000000)) {var t = s.Item2;var u = s.Item1;return u;}else{throw ("List was empty");return null;};});e = (function(s){if ((s.Tag == 1.000000)) {var t = s.Item2;var u = s.Item1;return t;}else{throw ("List was empty");return null;};});f = (function(s,t,u){if (s[t] === undefined) { s[t] = u } else { throw 'Key already exists' };});g = (function(s){var t = {};var u = s.GetEnumerator();try{while (u.MoveNext()){var v = u.get_Current();var w = v.Items[1.000000];var x = v.Items[0.000000];f(t, x, w);};}finally{if (false) {u.Dispose();}else{;};};return t;});h = (function(s){return s.Value;;});i = (function(s){return s.Value;;});j = (function(s){return ((s.Tag == 1.000000) && true);});k = (function(s){var t;t = (new a(s));return {GetEnumerator: (function(u){return (function(v,u){var w;return v.factory(w);})(t, u);})};});l = (function(s){return m((function(t){if ((t.Tag == 1.000000)) {var u = e(t);var v = d(t);return {Tag: 1.000000, Value: (new o(v, u))};}else{return {Tag: 0.000000};};}), s);});m = (function(s,t){return k((function(u){var v;v = (new p(t, s));return {get_Current: (function(w){return (function(x,w){return x.current;})(v, w);}), MoveNext: (function(w){return (function(x,w){var y = (function(z){var A = h(x.acc);var B = x.unfold(A);if ((B.Tag == 1.000000)) {var C = i(B).Items[0.000000];var D = i(B).Items[1.000000];x.acc = {Tag: 1.000000, Value: D};x.current = C;return true;}else{x.acc = {Tag: 0.000000};x.current = null;return false;};});return (j(x.acc) && (function(){var z;return y(z);})());})(v, w);}), Reset: (function(w){return (function(x,w){x.acc = {Tag: 1.000000, Value: x.seed};x.current = null;})(v, w);}), Dispose: (function(w){return (function(x,w){;})(v, w);})};}));});n = (function(Item0,Item1){var u = this;u.Items = [Item0, Item1];});o = (function(Item0,Item1){var u = this;u.Items = [Item0, Item1];});p = (function(s,t){var u = this;{};u.seed = s;u.unfold = t;u.acc = {Tag: 1.000000, Value: u.seed};u.current = null;});q = (function(Item1,Item2){var u = this;u.Tag = 1.000000;u._CaseName = "Cons";u.Item1 = Item1;u.Item2 = Item2;});r = (function(){var s = this;s.Tag = 0.000000;s._CaseName = "Nil";});var s = g(l(b((new n("A", 1.000000)), b((new n("B", 2.000000)), c()))));return (s["C"] !== undefined) | |
***** FunScript.Tests.Dictionaries.Interface IDictionary.ContainsKey works("A") | |
// Code: | |
var r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(s){var t = this;{};t.factory = s;});b = (function(s,t){return (new q(s, t));});c = (function(){return (new r());});d = (function(s){if ((s.Tag == 1.000000)) {var t = s.Item2;var u = s.Item1;return u;}else{throw ("List was empty");return null;};});e = (function(s){if ((s.Tag == 1.000000)) {var t = s.Item2;var u = s.Item1;return t;}else{throw ("List was empty");return null;};});f = (function(s,t,u){if (s[t] === undefined) { s[t] = u } else { throw 'Key already exists' };});g = (function(s){var t = {};var u = s.GetEnumerator();try{while (u.MoveNext()){var v = u.get_Current();var w = v.Items[1.000000];var x = v.Items[0.000000];f(t, x, w);};}finally{if (false) {u.Dispose();}else{;};};return t;});h = (function(s){return s.Value;;});i = (function(s){return s.Value;;});j = (function(s){return ((s.Tag == 1.000000) && true);});k = (function(s){var t;t = (new a(s));return {GetEnumerator: (function(u){return (function(v,u){var w;return v.factory(w);})(t, u);})};});l = (function(s){return m((function(t){if ((t.Tag == 1.000000)) {var u = e(t);var v = d(t);return {Tag: 1.000000, Value: (new o(v, u))};}else{return {Tag: 0.000000};};}), s);});m = (function(s,t){return k((function(u){var v;v = (new p(t, s));return {get_Current: (function(w){return (function(x,w){return x.current;})(v, w);}), MoveNext: (function(w){return (function(x,w){var y = (function(z){var A = h(x.acc);var B = x.unfold(A);if ((B.Tag == 1.000000)) {var C = i(B).Items[0.000000];var D = i(B).Items[1.000000];x.acc = {Tag: 1.000000, Value: D};x.current = C;return true;}else{x.acc = {Tag: 0.000000};x.current = null;return false;};});return (j(x.acc) && (function(){var z;return y(z);})());})(v, w);}), Reset: (function(w){return (function(x,w){x.acc = {Tag: 1.000000, Value: x.seed};x.current = null;})(v, w);}), Dispose: (function(w){return (function(x,w){;})(v, w);})};}));});n = (function(Item0,Item1){var u = this;u.Items = [Item0, Item1];});o = (function(Item0,Item1){var u = this;u.Items = [Item0, Item1];});p = (function(s,t){var u = this;{};u.seed = s;u.unfold = t;u.acc = {Tag: 1.000000, Value: u.seed};u.current = null;});q = (function(Item1,Item2){var u = this;u.Tag = 1.000000;u._CaseName = "Cons";u.Item1 = Item1;u.Item2 = Item2;});r = (function(){var s = this;s.Tag = 0.000000;s._CaseName = "Nil";});var s = g(l(b((new n("A", 1.000000)), b((new n("B", 2.000000)), c()))));return (s["A"] !== undefined) | |
***** FunScript.Tests.Dictionaries.Interface IDictionary.Count works | |
// Code: | |
var y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(z){var A = this;{};A.factory = z;});b = (function(z){var A = this;{};A.factory = z;});c = (function(z,A,B){if (z[A] === undefined) { z[A] = B } else { throw 'Key already exists' };});d = (function(z){var A = {};var B = z.GetEnumerator();try{while (B.MoveNext()){var C = B.get_Current();var D = C.Items[1.000000];var E = C.Items[0.000000];c(A, E, D);};}finally{if (false) {B.Dispose();}else{;};};return A;});e = (function(z){return z.Value;;});f = (function(z){return z.Value;;});g = (function(z){return z.Value;;});h = (function(z){return z.Value;;});i = (function(z){return ((z.Tag == 1.000000) && true);});j = (function(z){return ((z.Tag == 1.000000) && true);});k = (function(z,A,B){var C = 0;return s((function(D){if ((((A > C) && (D <= B)) || ((A < C) && (D >= B)))) {return {Tag: 1.000000, Value: (new u(D, (D + A)))};}else{return {Tag: 0.000000};};}), z);});l = (function(z,A){return k(z, 1, A);});m = (function(z){return q((function(A){var B;return o(z(B));}));});n = (function(z){return z.GetEnumerator();});o = (function(z){return z.GetEnumerator();});p = (function(z){var A;A = (new a(z));return {GetEnumerator: (function(B){return (function(C,B){var D;return C.factory(D);})(A, B);})};});q = (function(z){var A;A = (new b(z));return {GetEnumerator: (function(B){return (function(C,B){var D;return C.factory(D);})(A, B);})};});r = (function(z,A){return m((function(B){return t((function(C){if (C.MoveNext()) {return {Tag: 1.000000, Value: (new w(z(C.get_Current()), C))};}else{return {Tag: 0.000000};};}), n(A));}));});s = (function(z,A){return p((function(B){var C;C = (new x(A, z));return {get_Current: (function(D){return (function(E,D){return E.current;})(C, D);}), MoveNext: (function(D){return (function(E,D){var F = (function(G){var H = e(E.acc);var I = E.unfold(H);if ((I.Tag == 1.000000)) {var J = g(I).Items[0.000000];var K = g(I).Items[1.000000];E.acc = {Tag: 1.000000, Value: K};E.current = J;return true;}else{E.acc = {Tag: 0.000000};E.current = null;return false;};});return (i(E.acc) && (function(){var G;return F(G);})());})(C, D);}), Reset: (function(D){return (function(E,D){E.acc = {Tag: 1.000000, Value: E.seed};E.current = null;})(C, D);}), Dispose: (function(D){return (function(E,D){;})(C, D);})};}));});t = (function(z,A){return q((function(B){var C;C = (new y(A, z));return {get_Current: (function(D){return (function(E,D){return E.current;})(C, D);}), MoveNext: (function(D){return (function(E,D){var F = (function(G){var H = f(E.acc);var I = E.unfold(H);if ((I.Tag == 1.000000)) {var J = h(I).Items[0.000000];var K = h(I).Items[1.000000];E.acc = {Tag: 1.000000, Value: K};E.current = J;return true;}else{E.acc = {Tag: 0.000000};E.current = null;return false;};});return (j(E.acc) && (function(){var G;return F(G);})());})(C, D);}), Reset: (function(D){return (function(E,D){E.acc = {Tag: 1.000000, Value: E.seed};E.current = null;})(C, D);}), Dispose: (function(D){return (function(E,D){;})(C, D);})};}));});u = (function(Item0,Item1){var B = this;B.Items = [Item0, Item1];});v = (function(Item0,Item1){var B = this;B.Items = [Item0, Item1];});w = (function(Item0,Item1){var B = this;B.Items = [Item0, Item1];});x = (function(z,A){var B = this;{};B.seed = z;B.unfold = A;B.acc = {Tag: 1.000000, Value: B.seed};B.current = null;});y = (function(z,A){var B = this;{};B.seed = z;B.unfold = A;B.acc = {Tag: 1.000000, Value: B.seed};B.current = null;});var z = d(m((function(A){return r((function(B){return (new v(B.toString(), (B * B)));}), l(1.000000, 10.000000));})));return Object.keys(z).length | |
***** FunScript.Tests.Dictionaries.Interface IDictionary.IsReadOnly works | |
// Code: | |
var y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(z){var A = this;{};A.factory = z;});b = (function(z){var A = this;{};A.factory = z;});c = (function(z,A,B){if (z[A] === undefined) { z[A] = B } else { throw 'Key already exists' };});d = (function(z){var A = {};var B = z.GetEnumerator();try{while (B.MoveNext()){var C = B.get_Current();var D = C.Items[1.000000];var E = C.Items[0.000000];c(A, E, D);};}finally{if (false) {B.Dispose();}else{;};};return A;});e = (function(z){return z.Value;;});f = (function(z){return z.Value;;});g = (function(z){return z.Value;;});h = (function(z){return z.Value;;});i = (function(z){return ((z.Tag == 1.000000) && true);});j = (function(z){return ((z.Tag == 1.000000) && true);});k = (function(z,A,B){var C = 0;return s((function(D){if ((((A > C) && (D <= B)) || ((A < C) && (D >= B)))) {return {Tag: 1.000000, Value: (new u(D, (D + A)))};}else{return {Tag: 0.000000};};}), z);});l = (function(z,A){return k(z, 1, A);});m = (function(z){return q((function(A){var B;return o(z(B));}));});n = (function(z){return z.GetEnumerator();});o = (function(z){return z.GetEnumerator();});p = (function(z){var A;A = (new a(z));return {GetEnumerator: (function(B){return (function(C,B){var D;return C.factory(D);})(A, B);})};});q = (function(z){var A;A = (new b(z));return {GetEnumerator: (function(B){return (function(C,B){var D;return C.factory(D);})(A, B);})};});r = (function(z,A){return m((function(B){return t((function(C){if (C.MoveNext()) {return {Tag: 1.000000, Value: (new w(z(C.get_Current()), C))};}else{return {Tag: 0.000000};};}), n(A));}));});s = (function(z,A){return p((function(B){var C;C = (new x(A, z));return {get_Current: (function(D){return (function(E,D){return E.current;})(C, D);}), MoveNext: (function(D){return (function(E,D){var F = (function(G){var H = e(E.acc);var I = E.unfold(H);if ((I.Tag == 1.000000)) {var J = g(I).Items[0.000000];var K = g(I).Items[1.000000];E.acc = {Tag: 1.000000, Value: K};E.current = J;return true;}else{E.acc = {Tag: 0.000000};E.current = null;return false;};});return (i(E.acc) && (function(){var G;return F(G);})());})(C, D);}), Reset: (function(D){return (function(E,D){E.acc = {Tag: 1.000000, Value: E.seed};E.current = null;})(C, D);}), Dispose: (function(D){return (function(E,D){;})(C, D);})};}));});t = (function(z,A){return q((function(B){var C;C = (new y(A, z));return {get_Current: (function(D){return (function(E,D){return E.current;})(C, D);}), MoveNext: (function(D){return (function(E,D){var F = (function(G){var H = f(E.acc);var I = E.unfold(H);if ((I.Tag == 1.000000)) {var J = h(I).Items[0.000000];var K = h(I).Items[1.000000];E.acc = {Tag: 1.000000, Value: K};E.current = J;return true;}else{E.acc = {Tag: 0.000000};E.current = null;return false;};});return (j(E.acc) && (function(){var G;return F(G);})());})(C, D);}), Reset: (function(D){return (function(E,D){E.acc = {Tag: 1.000000, Value: E.seed};E.current = null;})(C, D);}), Dispose: (function(D){return (function(E,D){;})(C, D);})};}));});u = (function(Item0,Item1){var B = this;B.Items = [Item0, Item1];});v = (function(Item0,Item1){var B = this;B.Items = [Item0, Item1];});w = (function(Item0,Item1){var B = this;B.Items = [Item0, Item1];});x = (function(z,A){var B = this;{};B.seed = z;B.unfold = A;B.acc = {Tag: 1.000000, Value: B.seed};B.current = null;});y = (function(z,A){var B = this;{};B.seed = z;B.unfold = A;B.acc = {Tag: 1.000000, Value: B.seed};B.current = null;});var z = d(m((function(A){return r((function(B){return (new v(B.toString(), (B * B)));}), l(1.000000, 10.000000));})));return true | |
***** FunScript.Tests.Dictionaries.Interface IDictionary.Keys works | |
// Code: | |
var I, H, G, F, E, D, C, B, A, z, y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(J){return J.length;;});b = (function(J){var K = this;{};K.factory = J;});c = (function(J){var K = this;{};K.factory = J;});d = (function(J){var K = this;{};K.factory = J;});e = (function(J,K,L){if (J[K] === undefined) { J[K] = L } else { throw 'Key already exists' };});f = (function(J){var K = J;return B((function(L){if ((L < a(K))) {return {Tag: 1.000000, Value: (new E(K[L], (L + 1)))};}else{return {Tag: 0.000000};};}), 0);});g = (function(J){var K = {};var L = J.GetEnumerator();try{while (L.MoveNext()){var M = L.get_Current();var N = M.Items[1.000000];var O = M.Items[0.000000];e(K, O, N);};}finally{if (false) {L.Dispose();}else{;};};return K;});h = (function(J){return J.Value;;});i = (function(J){return J.Value;;});j = (function(J){return J.Value;;});k = (function(J){return J.Value;;});l = (function(J){return J.Value;;});m = (function(J){return J.Value;;});n = (function(J){return ((J.Tag == 1.000000) && true);});o = (function(J){return ((J.Tag == 1.000000) && true);});p = (function(J){return ((J.Tag == 1.000000) && true);});q = (function(J,K,L){var M = 0;return z((function(N){if ((((K > M) && (N <= L)) || ((K < M) && (N >= L)))) {return {Tag: 1.000000, Value: (new C(N, (N + K)))};}else{return {Tag: 0.000000};};}), J);});r = (function(J,K){return q(J, 1, K);});s = (function(J){return x((function(K){var L;return u(J(L));}));});t = (function(J){return J.GetEnumerator();});u = (function(J){return J.GetEnumerator();});v = (function(J){var K;K = (new b(J));return {GetEnumerator: (function(L){return (function(M,L){var N;return M.factory(N);})(K, L);})};});w = (function(J){var K;K = (new c(J));return {GetEnumerator: (function(L){return (function(M,L){var N;return M.factory(N);})(K, L);})};});x = (function(J){var K;K = (new d(J));return {GetEnumerator: (function(L){return (function(M,L){var N;return M.factory(N);})(K, L);})};});y = (function(J,K){return s((function(L){return A((function(M){if (M.MoveNext()) {return {Tag: 1.000000, Value: (new F(J(M.get_Current()), M))};}else{return {Tag: 0.000000};};}), t(K));}));});z = (function(J,K){return v((function(L){var M;M = (new G(K, J));return {get_Current: (function(N){return (function(O,N){return O.current;})(M, N);}), MoveNext: (function(N){return (function(O,N){var P = (function(Q){var R = h(O.acc);var S = O.unfold(R);if ((S.Tag == 1.000000)) {var T = k(S).Items[0.000000];var U = k(S).Items[1.000000];O.acc = {Tag: 1.000000, Value: U};O.current = T;return true;}else{O.acc = {Tag: 0.000000};O.current = null;return false;};});return (n(O.acc) && (function(){var Q;return P(Q);})());})(M, N);}), Reset: (function(N){return (function(O,N){O.acc = {Tag: 1.000000, Value: O.seed};O.current = null;})(M, N);}), Dispose: (function(N){return (function(O,N){;})(M, N);})};}));});A = (function(J,K){return x((function(L){var M;M = (new H(K, J));return {get_Current: (function(N){return (function(O,N){return O.current;})(M, N);}), MoveNext: (function(N){return (function(O,N){var P = (function(Q){var R = i(O.acc);var S = O.unfold(R);if ((S.Tag == 1.000000)) {var T = m(S).Items[0.000000];var U = m(S).Items[1.000000];O.acc = {Tag: 1.000000, Value: U};O.current = T;return true;}else{O.acc = {Tag: 0.000000};O.current = null;return false;};});return (o(O.acc) && (function(){var Q;return P(Q);})());})(M, N);}), Reset: (function(N){return (function(O,N){O.acc = {Tag: 1.000000, Value: O.seed};O.current = null;})(M, N);}), Dispose: (function(N){return (function(O,N){;})(M, N);})};}));});B = (function(J,K){return w((function(L){var M;M = (new I(K, J));return {get_Current: (function(N){return (function(O,N){return O.current;})(M, N);}), MoveNext: (function(N){return (function(O,N){var P = (function(Q){var R = j(O.acc);var S = O.unfold(R);if ((S.Tag == 1.000000)) {var T = l(S).Items[0.000000];var U = l(S).Items[1.000000];O.acc = {Tag: 1.000000, Value: U};O.current = T;return true;}else{O.acc = {Tag: 0.000000};O.current = null;return false;};});return (p(O.acc) && (function(){var Q;return P(Q);})());})(M, N);}), Reset: (function(N){return (function(O,N){O.acc = {Tag: 1.000000, Value: O.seed};O.current = null;})(M, N);}), Dispose: (function(N){return (function(O,N){;})(M, N);})};}));});C = (function(Item0,Item1){var L = this;L.Items = [Item0, Item1];});D = (function(Item0,Item1){var L = this;L.Items = [Item0, Item1];});E = (function(Item0,Item1){var L = this;L.Items = [Item0, Item1];});F = (function(Item0,Item1){var L = this;L.Items = [Item0, Item1];});G = (function(J,K){var L = this;{};L.seed = J;L.unfold = K;L.acc = {Tag: 1.000000, Value: L.seed};L.current = null;});H = (function(J,K){var L = this;{};L.seed = J;L.unfold = K;L.acc = {Tag: 1.000000, Value: L.seed};L.current = null;});I = (function(J,K){var L = this;{};L.seed = J;L.unfold = K;L.acc = {Tag: 1.000000, Value: L.seed};L.current = null;});var J = g(s((function(K){return y((function(L){return (new D(L.toString(), (L * L)));}), r(1.000000, 10.000000));})));var K = {contents: ""};var L = Object.keys(J);var M = f(L).GetEnumerator();try{while (M.MoveNext()){var N = M.get_Current();K.contents = (N + K.contents);null;};}finally{if (false) {M.Dispose();}else{;};};return K.contents | |
***** FunScript.Tests.Dictionaries.Interface IDictionary.Values works | |
// Code: | |
var H, G, F, E, D, C, B, A, z, y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(I){return I.length;;});b = (function(I){var J = this;{};J.factory = I;});c = (function(I){var J = this;{};J.factory = I;});d = (function(I,J,K){if (I[J] === undefined) { I[J] = K } else { throw 'Key already exists' };});e = (function(I){var J = I;return A((function(K){if ((K < a(J))) {return {Tag: 1.000000, Value: (new C(J[K], (K + 1)))};}else{return {Tag: 0.000000};};}), 0);});f = (function(I){var J = {};var K = I.GetEnumerator();try{while (K.MoveNext()){var L = K.get_Current();var M = L.Items[1.000000];var N = L.Items[0.000000];d(J, N, M);};}finally{if (false) {K.Dispose();}else{;};};return J;});g = (function(I){var values = []; for (var k in I) { values.push(I[k]) } return values;});h = (function(I){return I.Value;;});i = (function(I){return I.Value;;});j = (function(I){return I.Value;;});k = (function(I){return I.Value;;});l = (function(I){return I.Value;;});m = (function(I){return I.Value;;});n = (function(I){return ((I.Tag == 1.000000) && true);});o = (function(I){return ((I.Tag == 1.000000) && true);});p = (function(I){return ((I.Tag == 1.000000) && true);});q = (function(I,J,K){var L = 0;return y((function(M){if ((((J > L) && (M <= K)) || ((J < L) && (M >= K)))) {return {Tag: 1.000000, Value: (new B(M, (M + J)))};}else{return {Tag: 0.000000};};}), I);});r = (function(I,J){return q(I, 1, J);});s = (function(I){return w((function(J){var K;return u(I(K));}));});t = (function(I){return I.GetEnumerator();});u = (function(I){return I.GetEnumerator();});v = (function(I){var J;J = (new b(I));return {GetEnumerator: (function(K){return (function(L,K){var M;return L.factory(M);})(J, K);})};});w = (function(I){var J;J = (new c(I));return {GetEnumerator: (function(K){return (function(L,K){var M;return L.factory(M);})(J, K);})};});x = (function(I,J){return s((function(K){return z((function(L){if (L.MoveNext()) {return {Tag: 1.000000, Value: (new E(I(L.get_Current()), L))};}else{return {Tag: 0.000000};};}), t(J));}));});y = (function(I,J){return v((function(K){var L;L = (new F(J, I));return {get_Current: (function(M){return (function(N,M){return N.current;})(L, M);}), MoveNext: (function(M){return (function(N,M){var O = (function(P){var Q = h(N.acc);var R = N.unfold(Q);if ((R.Tag == 1.000000)) {var S = k(R).Items[0.000000];var T = k(R).Items[1.000000];N.acc = {Tag: 1.000000, Value: T};N.current = S;return true;}else{N.acc = {Tag: 0.000000};N.current = null;return false;};});return (n(N.acc) && (function(){var P;return O(P);})());})(L, M);}), Reset: (function(M){return (function(N,M){N.acc = {Tag: 1.000000, Value: N.seed};N.current = null;})(L, M);}), Dispose: (function(M){return (function(N,M){;})(L, M);})};}));});z = (function(I,J){return w((function(K){var L;L = (new G(J, I));return {get_Current: (function(M){return (function(N,M){return N.current;})(L, M);}), MoveNext: (function(M){return (function(N,M){var O = (function(P){var Q = i(N.acc);var R = N.unfold(Q);if ((R.Tag == 1.000000)) {var S = m(R).Items[0.000000];var T = m(R).Items[1.000000];N.acc = {Tag: 1.000000, Value: T};N.current = S;return true;}else{N.acc = {Tag: 0.000000};N.current = null;return false;};});return (o(N.acc) && (function(){var P;return O(P);})());})(L, M);}), Reset: (function(M){return (function(N,M){N.acc = {Tag: 1.000000, Value: N.seed};N.current = null;})(L, M);}), Dispose: (function(M){return (function(N,M){;})(L, M);})};}));});A = (function(I,J){return v((function(K){var L;L = (new H(J, I));return {get_Current: (function(M){return (function(N,M){return N.current;})(L, M);}), MoveNext: (function(M){return (function(N,M){var O = (function(P){var Q = j(N.acc);var R = N.unfold(Q);if ((R.Tag == 1.000000)) {var S = l(R).Items[0.000000];var T = l(R).Items[1.000000];N.acc = {Tag: 1.000000, Value: T};N.current = S;return true;}else{N.acc = {Tag: 0.000000};N.current = null;return false;};});return (p(N.acc) && (function(){var P;return O(P);})());})(L, M);}), Reset: (function(M){return (function(N,M){N.acc = {Tag: 1.000000, Value: N.seed};N.current = null;})(L, M);}), Dispose: (function(M){return (function(N,M){;})(L, M);})};}));});B = (function(Item0,Item1){var K = this;K.Items = [Item0, Item1];});C = (function(Item0,Item1){var K = this;K.Items = [Item0, Item1];});D = (function(Item0,Item1){var K = this;K.Items = [Item0, Item1];});E = (function(Item0,Item1){var K = this;K.Items = [Item0, Item1];});F = (function(I,J){var K = this;{};K.seed = I;K.unfold = J;K.acc = {Tag: 1.000000, Value: K.seed};K.current = null;});G = (function(I,J){var K = this;{};K.seed = I;K.unfold = J;K.acc = {Tag: 1.000000, Value: K.seed};K.current = null;});H = (function(I,J){var K = this;{};K.seed = I;K.unfold = J;K.acc = {Tag: 1.000000, Value: K.seed};K.current = null;});var I = f(s((function(J){return x((function(K){return (new D(K.toString(), (K * K)));}), r(1.000000, 10.000000));})));var J = {contents: 0.000000};var K = g(I);var L = e(K).GetEnumerator();try{while (L.MoveNext()){var M = L.get_Current();J.contents = (M + J.contents);null;};}finally{if (false) {L.Dispose();}else{;};};return J.contents | |
***** FunScript.Tests.EventTests.should translate event construction | |
// Code: | |
var c, b, a;a = (function(){return [];});b = (function(d){return (new c());});c = (function(d){var e = this;{};e.delegates = {contents: a()};});var d = b();return 0.000000 | |
***** FunScript.Tests.EventTests.should translate event subscription | |
// Code: | |
var p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(q){var r = this;{};r.f = q;});b = (function(q){return (new c(q, (function(r){;}), (function(r){;})));});c = (function(q,r,s){var t = this;{};t.onNext = q;t.onError = r;t.onCompleted = s;});d = (function(q,r){return q.concat(r);;});e = (function(){return [];});f = (function(q,r){var s = h(0);var t = 0;for (var u = 0; u <= (g(r) - 1); u++){if (q(r[u])) {s[t] = r[u];null;t = (t + 1);null;}else{;};};return s;});g = (function(q){return q.length;;});h = (function(q){return new Array(q);;});i = (function(q){return (new j());});j = (function(q){var r = this;{};r.delegates = {contents: e()};});k = (function(q,r){var s;s = (new n(q.delegates));return {AddHandler: (function(t){return (function(u,t){return o(u, t);})(s, t);}), RemoveHandler: (function(t){return (function(u,t){return p(u, t);})(s, t);}), Subscribe: (function(t){return (function(u,t){var v = (function(w){return t.OnNext(w);});o(u, v);var w = (function(x){return p(u, v);});var x;x = (new a(w));return {Dispose: (function(y){return (function(z,y){var A;return z.f(A);})(x, y);})};})(s, t);})};});l = (function(q,r){return q !== r;;});m = (function(q,r){var s;s = b(q);return r.Subscribe({OnNext: (function(t){return (function(u,t){return u.onNext(t);})(s, t);}), OnError: (function(t){return (function(u,t){return u.onError(t);})(s, t);}), OnCompleted: (function(t){return (function(u,t){var v;return u.onCompleted(v);})(s, t);})});});n = (function(q){var r = this;{};r.delegates = q;});o = (function(q,r){var s = d([r], q.delegates.contents);q.delegates.contents = s;});p = (function(q,r){var s = f((function(t){return l(r, t);}), q.delegates.contents);q.delegates.contents = s;});var q = {contents: 0.000000};var r = i();var s = m((function(t){q.contents = (q.contents + t);}), k(r));return q.contents | |
***** FunScript.Tests.EventTests.should translate event triggering | |
// Code: | |
var t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(u){var v = this;{};v.f = u;});b = (function(u){return (new c(u, (function(v){;}), (function(v){;})));});c = (function(u,v,w){var x = this;{};x.onNext = u;x.onError = v;x.onCompleted = w;});d = (function(u,v){return u.concat(v);;});e = (function(){return [];});f = (function(u,v){var w = k(0);var x = 0;for (var y = 0; y <= (j(v) - 1); y++){if (u(v[y])) {w[x] = v[y];null;x = (x + 1);null;}else{;};};return w;});g = (function(u,v,w){return h((function(x){return (function(y){return (function(z){return u(y)(z);});});}), v, w);});h = (function(u,v,w){var x = v;for (var y = 0; y <= (j(w) - 1); y++){x = u(y)(x)(w[y]);null;};return x;});i = (function(u,v){var w;return g((function(x){return (function(y){return u(y);});}), w, v);});j = (function(u){return u.length;;});k = (function(u){return new Array(u);;});l = (function(u){return (new n());});m = (function(u,v){return i((function(w){return w(v);}), u.delegates.contents);});n = (function(u){var v = this;{};v.delegates = {contents: e()};});o = (function(u,v){var w;w = (new r(u.delegates));return {AddHandler: (function(x){return (function(y,x){return s(y, x);})(w, x);}), RemoveHandler: (function(x){return (function(y,x){return t(y, x);})(w, x);}), Subscribe: (function(x){return (function(y,x){var z = (function(A){return x.OnNext(A);});s(y, z);var A = (function(B){return t(y, z);});var B;B = (new a(A));return {Dispose: (function(C){return (function(D,C){var E;return D.f(E);})(B, C);})};})(w, x);})};});p = (function(u,v){return u !== v;;});q = (function(u,v){var w;w = b(u);return v.Subscribe({OnNext: (function(x){return (function(y,x){return y.onNext(x);})(w, x);}), OnError: (function(x){return (function(y,x){return y.onError(x);})(w, x);}), OnCompleted: (function(x){return (function(y,x){var z;return y.onCompleted(z);})(w, x);})});});r = (function(u){var v = this;{};v.delegates = u;});s = (function(u,v){var w = d([v], u.delegates.contents);u.delegates.contents = w;});t = (function(u,v){var w = f((function(x){return p(v, x);}), u.delegates.contents);u.delegates.contents = w;});var u = {contents: 0.000000};var v = l();var w = q((function(x){u.contents = (u.contents + x);}), o(v));m(v, 1.000000);m(v, 2.000000);return u.contents | |
***** FunScript.Tests.GuidTests.Guid comparison should be translated | |
// Code: | |
var c, b, a;a = (function(d){return d.Value;;});b = (function(d){var e = c(d);if ((e.Tag == 1.000000)) {var f = a(e);return f;}else{throw (("Not a valid guid: " + d));return null;};});c = (function(d){if (/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(d)) {return {Tag: 1.000000, Value: d};}else{return {Tag: 0.000000};};});var d = (function(e){return (function(f){if ((e > f)) {return "A";}else{return "B";};});});var e = b("b5e2e113-894e-4998-b111-dd0b7038b4a2");var f = b("a18df2f8-04d4-4e43-89a9-ecbf3b34d20c");var g = b("be316dc4-45fc-49a8-aa00-2660029a856b");return ((d(e)(f) + d(f)(g)) + d(e)(g)) | |
***** FunScript.Tests.GuidTests.Guid.NewGuid() should be translated | |
// Code: | |
var a;a = (function(b){return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { | |
var r = Math.random()*16|0, v = c == 'x' ? r : (r&0x3|0x8); | |
return v.toString(16); | |
});});var b = a();return b.toString().length | |
***** FunScript.Tests.GuidTests.Guid.Parse should be translated | |
// Code: | |
var c, b, a;a = (function(d){return d.Value;;});b = (function(d){var e = c(d);if ((e.Tag == 1.000000)) {var f = a(e);return f;}else{throw (("Not a valid guid: " + d));return null;};});c = (function(d){if (/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(d)) {return {Tag: 1.000000, Value: d};}else{return {Tag: 0.000000};};});var d = b("bcee8c04-059c-4aef-9da3-fdffceeb336d");return d.toString() | |
***** FunScript.Tests.LambdaApplication.Applying let bound functions works | |
// Code: | |
var a = (function(b){return ((b % 2.000000) != 0.000000);});return a(2.000000) | |
***** FunScript.Tests.LambdaApplication.Constructing delegates works | |
// Code: | |
var a = (function(b){return (b * b);}) | |
***** FunScript.Tests.LambdaApplication.Constructing tupled delegates works | |
// Code: | |
var a = (function(b,c){return (b - c);}) | |
***** FunScript.Tests.LambdaApplication.Currying works | |
// Code: | |
var a = (function(b){return (function(c){return ((c % b) == 0.000000);});});var b = a(2.000000);return b(21.000000) | |
***** FunScript.Tests.LambdaApplication.Defining lambdas works | |
// Code: | |
return ((2.000000 % 2.000000) == 0.000000) | |
***** FunScript.Tests.LambdaApplication.Invoking delegates works | |
// Code: | |
var a = (function(b){return (b * b);});return a(2.000000) | |
***** FunScript.Tests.LambdaApplication.Invoking tupled delegates works | |
// Code: | |
var a = (function(b,c){return (b - c);});return a(4.000000, 2.000000) | |
***** FunScript.Tests.LambdaApplication.Replacing methods returning lambdas works | |
// Code: | |
var b, a;a = (function(c){return (function(d){return b(d);});});b = (function(c){return (c * 3.000000);});var c = a();return (c(2.000000) == 4.000000) | |
***** FunScript.Tests.LambdaApplication.Replacing types with methods returning lambdas works | |
// Code: | |
var b, a;a = (function(c){return (function(d){return b(d);});});b = (function(c){return (c * 3.000000);});var c = a();return (c(2.000000) == 4.000000) | |
***** FunScript.Tests.LambdaApplication.Returning emit lambdas from tupled methods works | |
// Code: | |
var c, b, a;a = (function(d){return ((d % 2.000000) == 0.000000);});b = (function(d){return d % 3 == 0;;});c = (function(d,e){if (d) {return (function(f){return a(f);});}else{return (function(f){return b(f);});};});var d = c(false, false);return d(21.000000) | |
***** FunScript.Tests.LambdaApplication.Returning lambdas from tupled methods works | |
// Code: | |
var c, b, a;a = (function(d){return ((d % 2.000000) == 0.000000);});b = (function(d){return d % 3 == 0;;});c = (function(d,e){if (d) {return (function(f){return a(f);});}else{return (function(f){return b(f);});};});return c(true, false)(21.000000) | |
***** FunScript.Tests.LambdaApplication.Returning lambdas works | |
// Code: | |
var a = (function(b){return (function(c){return ((c % b) == 0.000000);});});var b = a(2.000000);return b(21.000000) | |
***** FunScript.Tests.LetBindings.Inner-scope let-bindings do not destroy outer-scope let-bindings | |
// Code: | |
var a = 10.000000;var b = 1.000000;var c = (b * 1.000000);return (c * a) | |
***** FunScript.Tests.LetBindings.key/reserved words are protected | |
// Code: | |
var a = true;return a | |
***** FunScript.Tests.LetBindings.Let bindings can be generated | |
// Code: | |
var a = true;return a | |
***** FunScript.Tests.LetBindings.Let bindings inline can be generated | |
// Code: | |
var a = (function(b){return b;});var b = "foo";return a(b) | |
***** FunScript.Tests.LetBindings.Mutable let bindings can be generated | |
// Code: | |
var a = true;return a | |
***** FunScript.Tests.LetBindings.Mutations of let bindings can be generated | |
// Code: | |
var a = true;a = false;null;return a | |
***** FunScript.Tests.LetBindings.Recursive let bindings can be generated | |
// Code: | |
var a;var b;a = (function(c){if ((c < 10.000000)) {return b((c + 1.000000));}else{return c;};});b = (function(c){return a((c + 1.000000));});return a(0.000000) | |
***** FunScript.Tests.Lists.List cons works | |
// Code: | |
var e, d, c, b, a;a = (function(f,g){return (new d(f, g));});b = (function(){return (new e());});c = (function(f){if ((f.Tag == 1.000000)) {var g = f.Item2;var h = f.Item1;return h;}else{throw ("List was empty");return null;};});d = (function(Item1,Item2){var h = this;h.Tag = 1.000000;h._CaseName = "Cons";h.Item1 = Item1;h.Item2 = Item2;});e = (function(){var f = this;f.Tag = 0.000000;f._CaseName = "Nil";});var f = a(1.000000, a(2.000000, a(3.000000, a(4.000000, b()))));var g = a(0.000000, f);var h = a(0.000000, f);return (c(g) + c(f)) | |
***** FunScript.Tests.Lists.List literals work | |
// Code: | |
var d, c, b, a;a = (function(e,f){return (new c(e, f));});b = (function(){return (new d());});c = (function(Item1,Item2){var g = this;g.Tag = 1.000000;g._CaseName = "Cons";g.Item1 = Item1;g.Item2 = Item2;});d = (function(){var e = this;e.Tag = 0.000000;e._CaseName = "Nil";});var e = a(1.000000, a(2.000000, a(3.000000, a(4.000000, b())))) | |
***** FunScript.Tests.Lists.List.append works | |
// Code: | |
var k, j, i, h, g, f, e, d, c, b, a;a = (function(l,m){return d((function(n){return (function(o){return (new j(o, n));});}), m, h(l));});b = (function(l,m){return (new j(l, m));});c = (function(){return (new k());});d = (function(l,m,n){return e((function(o){return (function(p){return (function(q){return l(p)(q);});});}), m, n);});e = (function(l,m,n){return f(l, 0, m, n);});f = (function(l,m,n,o){if ((o.Tag == 1.000000)) {var p = o.Item2;var q = o.Item1;return f(l, (m + 1), l(m)(n)(q), p);}else{return n;};});g = (function(l){if ((l.Tag == 1.000000)) {var m = l.Item2;var n = l.Item1;return n;}else{throw ("List was empty");return null;};});h = (function(l){return d((function(m){return (function(n){return (new j(n, m));});}), (new k()), l);});i = (function(l){if ((l.Tag == 1.000000)) {var m = l.Item2;var n = l.Item1;return m;}else{throw ("List was empty");return null;};});j = (function(Item1,Item2){var n = this;n.Tag = 1.000000;n._CaseName = "Cons";n.Item1 = Item1;n.Item2 = Item2;});k = (function(){var l = this;l.Tag = 0.000000;l._CaseName = "Nil";});var l = b(1.000000, b(2.000000, b(3.000000, b(4.000000, c()))));var m = b(0.000000, c());var n = a(m, l);return (g(n) + g(i(n))) | |
***** FunScript.Tests.Lists.List.average works | |
// Code: | |
var j, i, h, g, f, e, d, c, b, a;a = (function(k){var l = g(k);var m = h((function(n){return 1;}), k);return (l / m);});b = (function(k,l){return (new i(k, l));});c = (function(){return (new j());});d = (function(k,l,m){return e((function(n){return (function(o){return (function(p){return k(o)(p);});});}), l, m);});e = (function(k,l,m){return f(k, 0, l, m);});f = (function(k,l,m,n){if ((n.Tag == 1.000000)) {var o = n.Item2;var p = n.Item1;return f(k, (l + 1), k(l)(m)(p), o);}else{return m;};});g = (function(k){return d((function(l){return (function(m){return (l + m);});}), 0, k);});h = (function(k,l){return d((function(m){return (function(n){return (m + k(n));});}), 0, l);});i = (function(Item1,Item2){var m = this;m.Tag = 1.000000;m._CaseName = "Cons";m.Item1 = Item1;m.Item2 = Item2;});j = (function(){var k = this;k.Tag = 0.000000;k._CaseName = "Nil";});var k = b(1.000000, b(2.000000, b(3.000000, b(4.000000, c()))));return a(k) | |
***** FunScript.Tests.Lists.List.averageBy works | |
// Code: | |
var i, h, g, f, e, d, c, b, a;a = (function(j,k){var l = g(j, k);var m = g((function(n){return 1;}), k);return (l / m);});b = (function(j,k){return (new h(j, k));});c = (function(){return (new i());});d = (function(j,k,l){return e((function(m){return (function(n){return (function(o){return j(n)(o);});});}), k, l);});e = (function(j,k,l){return f(j, 0, k, l);});f = (function(j,k,l,m){if ((m.Tag == 1.000000)) {var n = m.Item2;var o = m.Item1;return f(j, (k + 1), j(k)(l)(o), n);}else{return l;};});g = (function(j,k){return d((function(l){return (function(m){return (l + j(m));});}), 0, k);});h = (function(Item1,Item2){var l = this;l.Tag = 1.000000;l._CaseName = "Cons";l.Item1 = Item1;l.Item2 = Item2;});i = (function(){var j = this;j.Tag = 0.000000;j._CaseName = "Nil";});var j = b(1.000000, b(2.000000, b(3.000000, b(4.000000, c()))));var k = 2.000000;return a((function(l){return (k * l);}), j) | |
***** FunScript.Tests.Lists.List.choose works | |
// Code: | |
var k, j, i, h, g, f, e, d, c, b, a;a = (function(l,m){return d((function(n){return (function(o){var p = l(o);if ((p.Tag == 0.000000)) {return n;}else{var q = i(p);return (new j(q, n));};});}), (new k()), m);});b = (function(l,m){return (new j(l, m));});c = (function(){return (new k());});d = (function(l,m,n){return e((function(o){return (function(p){return (function(q){return l(p)(q);});});}), m, n);});e = (function(l,m,n){return f(l, 0, m, n);});f = (function(l,m,n,o){if ((o.Tag == 1.000000)) {var p = o.Item2;var q = o.Item1;return f(l, (m + 1), l(m)(n)(q), p);}else{return n;};});g = (function(l){if ((l.Tag == 1.000000)) {var m = l.Item2;var n = l.Item1;return n;}else{throw ("List was empty");return null;};});h = (function(l){if ((l.Tag == 1.000000)) {var m = l.Item2;var n = l.Item1;return m;}else{throw ("List was empty");return null;};});i = (function(l){return l.Value;;});j = (function(Item1,Item2){var n = this;n.Tag = 1.000000;n._CaseName = "Cons";n.Item1 = Item1;n.Item2 = Item2;});k = (function(){var l = this;l.Tag = 0.000000;l._CaseName = "Nil";});var l = b(1.000000, b(2.000000, b(3.000000, b(4.000000, c()))));var m = a((function(n){if ((n > 2.000000)) {return {Tag: 1.000000, Value: n};}else{return {Tag: 0.000000};};}), l);return (g(m) + g(h(m))) | |
***** FunScript.Tests.Lists.List.collect works | |
// Code: | |
var w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(x,y){return g((function(z){return (function(A){return (new t(A, z));});}), y, q(x));});b = (function(x,y){return h((function(z){return (function(A){return a(x(A), z);});}), (new u()), r(y));});c = (function(x,y){return (new t(x, y));});d = (function(x,y){return (new v(x, y));});e = (function(){return (new u());});f = (function(){return (new w());});g = (function(x,y,z){return j((function(A){return (function(B){return (function(C){return x(B)(C);});});}), y, z);});h = (function(x,y,z){return k((function(A){return (function(B){return (function(C){return x(B)(C);});});}), y, z);});i = (function(x,y,z){return l((function(A){return (function(B){return (function(C){return x(B)(C);});});}), y, z);});j = (function(x,y,z){return m(x, 0, y, z);});k = (function(x,y,z){return n(x, 0, y, z);});l = (function(x,y,z){return o(x, 0, y, z);});m = (function(x,y,z,A){if ((A.Tag == 1.000000)) {var B = A.Item2;var C = A.Item1;return m(x, (y + 1), x(y)(z)(C), B);}else{return z;};});n = (function(x,y,z,A){if ((A.Tag == 1.000000)) {var B = A.Item2;var C = A.Item1;return n(x, (y + 1), x(y)(z)(C), B);}else{return z;};});o = (function(x,y,z,A){if ((A.Tag == 1.000000)) {var B = A.Item2;var C = A.Item1;return o(x, (y + 1), x(y)(z)(C), B);}else{return z;};});p = (function(x){if ((x.Tag == 1.000000)) {var y = x.Item2;var z = x.Item1;return z;}else{throw ("List was empty");return null;};});q = (function(x){return g((function(y){return (function(z){return (new t(z, y));});}), (new u()), x);});r = (function(x){return i((function(y){return (function(z){return (new v(z, y));});}), (new w()), x);});s = (function(x){if ((x.Tag == 1.000000)) {var y = x.Item2;var z = x.Item1;return y;}else{throw ("List was empty");return null;};});t = (function(Item1,Item2){var z = this;z.Tag = 1.000000;z._CaseName = "Cons";z.Item1 = Item1;z.Item2 = Item2;});u = (function(){var x = this;x.Tag = 0.000000;x._CaseName = "Nil";});v = (function(Item1,Item2){var z = this;z.Tag = 1.000000;z._CaseName = "Cons";z.Item1 = Item1;z.Item2 = Item2;});w = (function(){var x = this;x.Tag = 0.000000;x._CaseName = "Nil";});var x = d(c(1.000000, e()), d(c(2.000000, e()), d(c(3.000000, e()), d(c(4.000000, e()), f()))));var y = b((function(z){return z;}), x);return (p(y) + p(s(y))) | |
***** FunScript.Tests.Lists.List.empty works | |
// Code: | |
var e, d, c, b, a;a = (function(f,g){return (new d(f, g));});b = (function(){return (new e());});c = (function(f){if ((f.Tag == 1.000000)) {var g = f.Item2;var h = f.Item1;return h;}else{throw ("List was empty");return null;};});d = (function(Item1,Item2){var h = this;h.Tag = 1.000000;h._CaseName = "Cons";h.Item1 = Item1;h.Item2 = Item2;});e = (function(){var f = this;f.Tag = 0.000000;f._CaseName = "Nil";});var f = a(1.000000, b());var g = a(1.000000, b());return (c(f) + c(g)) | |
***** FunScript.Tests.Lists.List.exists works | |
// Code: | |
var e, d, c, b, a;a = (function(f,g){return (new d(f, g));});b = (function(){return (new e());});c = (function(f,g){return ((g.Tag == 1.000000) && (function(){var h = g.Item2;var i = g.Item1;return (f(i) || c(f, h));})());});d = (function(Item1,Item2){var h = this;h.Tag = 1.000000;h._CaseName = "Cons";h.Item1 = Item1;h.Item2 = Item2;});e = (function(){var f = this;f.Tag = 0.000000;f._CaseName = "Nil";});var f = a(1.000000, a(2.000000, a(3.000000, a(4.000000, b()))));return c((function(g){return (g == 2.000000);}), f) | |
***** FunScript.Tests.Lists.List.exists2 works | |
// Code: | |
var f, e, d, c, b, a;a = (function(g,h){return (new e(g, h));});b = (function(){return (new f());});c = (function(g,h,i){var j = (new d(h, i));if ((j.Items[0.000000].Tag == 1.000000)) {if ((j.Items[1.000000].Tag == 1.000000)) {var k = j.Items[0.000000].Item1;var l = j.Items[0.000000].Item2;var m = j.Items[1.000000].Item1;var n = j.Items[1.000000].Item2;return (g(k)(m) || c(g, l, n));}else{throw ("Lists had different lengths");return null;};}else{if ((j.Items[1.000000].Tag == 0.000000)) {return false;}else{throw ("Lists had different lengths");return null;};};});d = (function(Item0,Item1){var i = this;i.Items = [Item0, Item1];});e = (function(Item1,Item2){var i = this;i.Tag = 1.000000;i._CaseName = "Cons";i.Item1 = Item1;i.Item2 = Item2;});f = (function(){var g = this;g.Tag = 0.000000;g._CaseName = "Nil";});var g = a(1.000000, a(2.000000, a(3.000000, a(4.000000, b()))));var h = a(1.000000, a(2.000000, a(3.000000, a(4.000000, b()))));return c((function(i){return (function(j){return ((i * j) == 16.000000);});}), g, h) | |
***** FunScript.Tests.Lists.List.filter works | |
// Code: | |
var i, h, g, f, e, d, c, b, a;a = (function(j,k){return (new h(j, k));});b = (function(){return (new i());});c = (function(j,k){return d((function(l){return (function(m){if (j(m)) {return (new h(m, l));}else{return l;};});}), (new i()), k);});d = (function(j,k,l){return e((function(m){return (function(n){return (function(o){return j(n)(o);});});}), k, l);});e = (function(j,k,l){return f(j, 0, k, l);});f = (function(j,k,l,m){if ((m.Tag == 1.000000)) {var n = m.Item2;var o = m.Item1;return f(j, (k + 1), j(k)(l)(o), n);}else{return l;};});g = (function(j){return ((j.Tag == 0.000000) && true);});h = (function(Item1,Item2){var l = this;l.Tag = 1.000000;l._CaseName = "Cons";l.Item1 = Item1;l.Item2 = Item2;});i = (function(){var j = this;j.Tag = 0.000000;j._CaseName = "Nil";});var j = a(1.000000, a(2.000000, a(3.000000, a(4.000000, b()))));var k = c((function(l){return (l > 5.000000);}), j);return g(k) | |
***** FunScript.Tests.Lists.List.find works | |
// Code: | |
var j, i, h, g, f, e, d, c, b, a;a = (function(k,l){return (new i(k, l));});b = (function(){return (new j());});c = (function(k,l){return d((function(m){return (function(n){return k(n);});}), l);});d = (function(k,l){var m = e(k, l);if ((m.Tag == 1.000000)) {var n = h(m);return n;}else{throw ("List did not contain any matching elements");return null;};});e = (function(k,l){return f((function(m){return (function(n){if (k(m)(n)) {return {Tag: 1.000000, Value: n};}else{return {Tag: 0.000000};};});}), l);});f = (function(k,l){return g(k, 0, l);});g = (function(k,l,m){if ((m.Tag == 1.000000)) {var n = m.Item2;var o = m.Item1;var p = k(l)(o);if ((p.Tag == 0.000000)) {return g(k, (l + 1), n);}else{return p;};}else{return {Tag: 0.000000};};});h = (function(k){return k.Value;;});i = (function(Item1,Item2){var m = this;m.Tag = 1.000000;m._CaseName = "Cons";m.Item1 = Item1;m.Item2 = Item2;});j = (function(){var k = this;k.Tag = 0.000000;k._CaseName = "Nil";});var k = a(1.000000, a(2.000000, a(3.000000, a(4.000000, b()))));var l = 2.000000;return c((function(m){return (l == m);}), k) | |
***** FunScript.Tests.Lists.List.findIndex works | |
// Code: | |
var i, h, g, f, e, d, c, b, a;a = (function(j,k){return (new h(j, k));});b = (function(){return (new i());});c = (function(j,k){var l = d(j, k);if ((l.Tag == 1.000000)) {var m = g(l);return m;}else{throw ("List did not contain any matching elements");return null;};});d = (function(j,k){return e((function(l){return (function(m){if (j(m)) {return {Tag: 1.000000, Value: l};}else{return {Tag: 0.000000};};});}), k);});e = (function(j,k){return f(j, 0, k);});f = (function(j,k,l){if ((l.Tag == 1.000000)) {var m = l.Item2;var n = l.Item1;var o = j(k)(n);if ((o.Tag == 0.000000)) {return f(j, (k + 1), m);}else{return o;};}else{return {Tag: 0.000000};};});g = (function(j){return j.Value;;});h = (function(Item1,Item2){var l = this;l.Tag = 1.000000;l._CaseName = "Cons";l.Item1 = Item1;l.Item2 = Item2;});i = (function(){var j = this;j.Tag = 0.000000;j._CaseName = "Nil";});var j = a(1.000000, a(2.000000, a(3.000000, a(4.000000, b()))));var k = 2.000000;return c((function(l){return (k == l);}), j) | |
***** FunScript.Tests.Lists.List.fold works | |
// Code: | |
var g, f, e, d, c, b, a;a = (function(h,i){return (new f(h, i));});b = (function(){return (new g());});c = (function(h,i,j){return d((function(k){return (function(l){return (function(m){return h(l)(m);});});}), i, j);});d = (function(h,i,j){return e(h, 0, i, j);});e = (function(h,i,j,k){if ((k.Tag == 1.000000)) {var l = k.Item2;var m = k.Item1;return e(h, (i + 1), h(i)(j)(m), l);}else{return j;};});f = (function(Item1,Item2){var j = this;j.Tag = 1.000000;j._CaseName = "Cons";j.Item1 = Item1;j.Item2 = Item2;});g = (function(){var h = this;h.Tag = 0.000000;h._CaseName = "Nil";});var h = a(1.000000, a(2.000000, a(3.000000, a(4.000000, b()))));var i = (function(j){return (function(k){return (j + k);});});var j = 0.000000;var k = (function(l){return c(i, j, l);})(h);return k | |
***** FunScript.Tests.Lists.List.fold2 works | |
// Code: | |
var h, g, f, e, d, c, b, a;a = (function(i,j){return (new g(i, j));});b = (function(){return (new h());});c = (function(i,j,k,l){return d((function(m){return (function(n){return (function(o){return (function(p){return i(n)(o)(p);});});});}), j, k, l);});d = (function(i,j,k,l){return e(i, 0, j, k, l);});e = (function(i,j,k,l,m){var n = (new f(l, m));if ((n.Items[0.000000].Tag == 1.000000)) {if ((n.Items[1.000000].Tag == 1.000000)) {var o = n.Items[0.000000].Item1;var p = n.Items[0.000000].Item2;var q = n.Items[1.000000].Item1;var r = n.Items[1.000000].Item2;return e(i, (j + 1), i(j)(k)(o)(q), p, r);}else{throw ("Lists had different lengths");return null;};}else{if ((n.Items[1.000000].Tag == 0.000000)) {return k;}else{throw ("Lists had different lengths");return null;};};});f = (function(Item0,Item1){var k = this;k.Items = [Item0, Item1];});g = (function(Item1,Item2){var k = this;k.Tag = 1.000000;k._CaseName = "Cons";k.Item1 = Item1;k.Item2 = Item2;});h = (function(){var i = this;i.Tag = 0.000000;i._CaseName = "Nil";});var i = a(1.000000, a(2.000000, a(3.000000, a(4.000000, b()))));var j = a(1.000000, a(2.000000, a(3.000000, a(4.000000, b()))));var k = c((function(l){return (function(m){return (function(n){return ((l + m) + n);});});}), 0.000000, i, j);return k | |
***** FunScript.Tests.Lists.List.foldBack works | |
// Code: | |
var l, k, j, i, h, g, f, e, d, c, b, a;a = (function(m,n){return (new k(m, n));});b = (function(){return (new l());});c = (function(m,n,o){return f((function(p){return (function(q){return (function(r){return m(q)(r);});});}), n, o);});d = (function(m,n,o){return g((function(p){return (function(q){return (function(r){return m(q)(r);});});}), n, o);});e = (function(m,n,o){return c((function(p){return (function(q){return m(q)(p);});}), o, j(n));});f = (function(m,n,o){return h(m, 0, n, o);});g = (function(m,n,o){return i(m, 0, n, o);});h = (function(m,n,o,p){if ((p.Tag == 1.000000)) {var q = p.Item2;var r = p.Item1;return h(m, (n + 1), m(n)(o)(r), q);}else{return o;};});i = (function(m,n,o,p){if ((p.Tag == 1.000000)) {var q = p.Item2;var r = p.Item1;return i(m, (n + 1), m(n)(o)(r), q);}else{return o;};});j = (function(m){return d((function(n){return (function(o){return (new k(o, n));});}), (new l()), m);});k = (function(Item1,Item2){var o = this;o.Tag = 1.000000;o._CaseName = "Cons";o.Item1 = Item1;o.Item2 = Item2;});l = (function(){var m = this;m.Tag = 0.000000;m._CaseName = "Nil";});var m = a(1.000000, a(2.000000, a(3.000000, a(4.000000, b()))));var n = e((function(o){return (function(p){return (o + p);});}), m, 0.000000);return n | |
***** FunScript.Tests.Lists.List.foldBack2 works | |
// Code: | |
var m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(n,o){return (new l(n, o));});b = (function(){return (new m());});c = (function(n,o,p){return f((function(q){return (function(r){return (function(s){return n(r)(s);});});}), o, p);});d = (function(n,o,p,q){return g((function(r){return (function(s){return (function(t){return (function(u){return n(s)(t)(u);});});});}), o, p, q);});e = (function(n,o,p,q){return d((function(r){return (function(s){return (function(t){return n(r)(s)(t);});});}), q, j(o), j(p));});f = (function(n,o,p){return i(n, 0, o, p);});g = (function(n,o,p,q){return h(n, 0, o, p, q);});h = (function(n,o,p,q,r){var s = (new k(q, r));if ((s.Items[0.000000].Tag == 1.000000)) {if ((s.Items[1.000000].Tag == 1.000000)) {var t = s.Items[0.000000].Item1;var u = s.Items[0.000000].Item2;var v = s.Items[1.000000].Item1;var w = s.Items[1.000000].Item2;return h(n, (o + 1), n(o)(p)(t)(v), u, w);}else{throw ("Lists had different lengths");return null;};}else{if ((s.Items[1.000000].Tag == 0.000000)) {return p;}else{throw ("Lists had different lengths");return null;};};});i = (function(n,o,p,q){if ((q.Tag == 1.000000)) {var r = q.Item2;var s = q.Item1;return i(n, (o + 1), n(o)(p)(s), r);}else{return p;};});j = (function(n){return c((function(o){return (function(p){return (new l(p, o));});}), (new m()), n);});k = (function(Item0,Item1){var p = this;p.Items = [Item0, Item1];});l = (function(Item1,Item2){var p = this;p.Tag = 1.000000;p._CaseName = "Cons";p.Item1 = Item1;p.Item2 = Item2;});m = (function(){var n = this;n.Tag = 0.000000;n._CaseName = "Nil";});var n = a(1.000000, a(2.000000, a(3.000000, a(4.000000, b()))));var o = a(1.000000, a(2.000000, a(3.000000, a(4.000000, b()))));var p = e((function(q){return (function(r){return (function(s){return ((q + r) + s);});});}), n, o, 0.000000);return p | |
***** FunScript.Tests.Lists.List.forall works | |
// Code: | |
var h, g, f, e, d, c, b, a;a = (function(i,j){return (new g(i, j));});b = (function(){return (new h());});c = (function(i,j,k){return d((function(l){return (function(m){return (function(n){return i(m)(n);});});}), j, k);});d = (function(i,j,k){return e(i, 0, j, k);});e = (function(i,j,k,l){if ((l.Tag == 1.000000)) {var m = l.Item2;var n = l.Item1;return e(i, (j + 1), i(j)(k)(n), m);}else{return k;};});f = (function(i,j){return c((function(k){return (function(l){return (k && i(l));});}), true, j);});g = (function(Item1,Item2){var k = this;k.Tag = 1.000000;k._CaseName = "Cons";k.Item1 = Item1;k.Item2 = Item2;});h = (function(){var i = this;i.Tag = 0.000000;i._CaseName = "Nil";});var i = a(1.000000, a(2.000000, a(3.000000, a(4.000000, b()))));return f((function(j){return (j < 5.000000);}), i) | |
***** FunScript.Tests.Lists.List.forall2 works | |
// Code: | |
var i, h, g, f, e, d, c, b, a;a = (function(j,k){return (new h(j, k));});b = (function(){return (new i());});c = (function(j,k,l,m){return d((function(n){return (function(o){return (function(p){return (function(q){return j(o)(p)(q);});});});}), k, l, m);});d = (function(j,k,l,m){return e(j, 0, k, l, m);});e = (function(j,k,l,m,n){var o = (new g(m, n));if ((o.Items[0.000000].Tag == 1.000000)) {if ((o.Items[1.000000].Tag == 1.000000)) {var p = o.Items[0.000000].Item1;var q = o.Items[0.000000].Item2;var r = o.Items[1.000000].Item1;var s = o.Items[1.000000].Item2;return e(j, (k + 1), j(k)(l)(p)(r), q, s);}else{throw ("Lists had different lengths");return null;};}else{if ((o.Items[1.000000].Tag == 0.000000)) {return l;}else{throw ("Lists had different lengths");return null;};};});f = (function(j,k,l){return c((function(m){return (function(n){return (function(o){return (m && j(n)(o));});});}), true, k, l);});g = (function(Item0,Item1){var l = this;l.Items = [Item0, Item1];});h = (function(Item1,Item2){var l = this;l.Tag = 1.000000;l._CaseName = "Cons";l.Item1 = Item1;l.Item2 = Item2;});i = (function(){var j = this;j.Tag = 0.000000;j._CaseName = "Nil";});var j = a(1.000000, a(2.000000, a(3.000000, a(4.000000, b()))));var k = a(1.000000, a(2.000000, a(3.000000, a(4.000000, b()))));return f((function(l){return (function(m){return (l == m);});}), j, k) | |
***** FunScript.Tests.Lists.List.head works | |
// Code: | |
var e, d, c, b, a;a = (function(f,g){return (new d(f, g));});b = (function(){return (new e());});c = (function(f){if ((f.Tag == 1.000000)) {var g = f.Item2;var h = f.Item1;return h;}else{throw ("List was empty");return null;};});d = (function(Item1,Item2){var h = this;h.Tag = 1.000000;h._CaseName = "Cons";h.Item1 = Item1;h.Item2 = Item2;});e = (function(){var f = this;f.Tag = 0.000000;f._CaseName = "Nil";});var f = a(1.000000, a(2.000000, a(3.000000, a(4.000000, b()))));return c(f) | |
***** FunScript.Tests.Lists.List.Head works | |
// Code: | |
var e, d, c, b, a;a = (function(f,g){return (new d(f, g));});b = (function(){return (new e());});c = (function(f){if ((f.Tag == 1.000000)) {var g = f.Item2;var h = f.Item1;return h;}else{throw ("List was empty");return null;};});d = (function(Item1,Item2){var h = this;h.Tag = 1.000000;h._CaseName = "Cons";h.Item1 = Item1;h.Item2 = Item2;});e = (function(){var f = this;f.Tag = 0.000000;f._CaseName = "Nil";});var f = a(1.000000, a(2.000000, a(3.000000, a(4.000000, b()))));return c(f) | |
***** FunScript.Tests.Lists.List.init works | |
// Code: | |
var e, d, c, b, a;a = (function(f){if ((f.Tag == 1.000000)) {var g = f.Item2;var h = f.Item1;return h;}else{throw ("List was empty");return null;};});b = (function(f,g){var h = (new e());for (var i = 1; i <= f; i++){h = (new d(g((f - i)), h));null;};return h;});c = (function(f){if ((f.Tag == 1.000000)) {var g = f.Item2;var h = f.Item1;return g;}else{throw ("List was empty");return null;};});d = (function(Item1,Item2){var h = this;h.Tag = 1.000000;h._CaseName = "Cons";h.Item1 = Item1;h.Item2 = Item2;});e = (function(){var f = this;f.Tag = 0.000000;f._CaseName = "Nil";});var f = b(4, (function(g){return g;}));return (a(f) + a(c(f))) | |
***** FunScript.Tests.Lists.List.isEmpty works | |
// Code: | |
var e, d, c, b, a;a = (function(f,g){return (new d(f, g));});b = (function(){return (new e());});c = (function(f){return ((f.Tag == 0.000000) && true);});d = (function(Item1,Item2){var h = this;h.Tag = 1.000000;h._CaseName = "Cons";h.Item1 = Item1;h.Item2 = Item2;});e = (function(){var f = this;f.Tag = 0.000000;f._CaseName = "Nil";});var f = a(1, b());return c(f) | |
***** FunScript.Tests.Lists.List.IsEmpty works | |
// Code: | |
var e, d, c, b, a;a = (function(f,g){return (new d(f, g));});b = (function(){return (new e());});c = (function(f){return ((f.Tag == 0.000000) && true);});d = (function(Item1,Item2){var h = this;h.Tag = 1.000000;h._CaseName = "Cons";h.Item1 = Item1;h.Item2 = Item2;});e = (function(){var f = this;f.Tag = 0.000000;f._CaseName = "Nil";});var f = a(1.000000, a(2.000000, a(3.000000, a(4.000000, b()))));return c(f) | |
***** FunScript.Tests.Lists.List.Item works | |
// Code: | |
var j, i, h, g, f, e, d, c, b, a;a = (function(k,l){return (new i(k, l));});b = (function(){return (new j());});c = (function(k,l){var m = e(k, l);if ((m.Tag == 1.000000)) {var n = h(m);return n;}else{throw ("List did not contain any matching elements");return null;};});d = (function(k,l){return c((function(m){return (function(n){return (l == m);});}), k);});e = (function(k,l){return f((function(m){return (function(n){if (k(m)(n)) {return {Tag: 1.000000, Value: n};}else{return {Tag: 0.000000};};});}), l);});f = (function(k,l){return g(k, 0, l);});g = (function(k,l,m){if ((m.Tag == 1.000000)) {var n = m.Item2;var o = m.Item1;var p = k(l)(o);if ((p.Tag == 0.000000)) {return g(k, (l + 1), n);}else{return p;};}else{return {Tag: 0.000000};};});h = (function(k){return k.Value;;});i = (function(Item1,Item2){var m = this;m.Tag = 1.000000;m._CaseName = "Cons";m.Item1 = Item1;m.Item2 = Item2;});j = (function(){var k = this;k.Tag = 0.000000;k._CaseName = "Nil";});var k = a(1.000000, a(2.000000, a(3.000000, a(4.000000, b()))));return d(k, 3) | |
***** FunScript.Tests.Lists.List.iter works | |
// Code: | |
var h, g, f, e, d, c, b, a;a = (function(i,j){return (new g(i, j));});b = (function(){return (new h());});c = (function(i,j,k){return d((function(l){return (function(m){return (function(n){return i(m)(n);});});}), j, k);});d = (function(i,j,k){return e(i, 0, j, k);});e = (function(i,j,k,l){if ((l.Tag == 1.000000)) {var m = l.Item2;var n = l.Item1;return e(i, (j + 1), i(j)(k)(n), m);}else{return k;};});f = (function(i,j){var k;return c((function(l){return (function(m){return i(m);});}), k, j);});g = (function(Item1,Item2){var k = this;k.Tag = 1.000000;k._CaseName = "Cons";k.Item1 = Item1;k.Item2 = Item2;});h = (function(){var i = this;i.Tag = 0.000000;i._CaseName = "Nil";});var i = a(1.000000, a(2.000000, a(3.000000, a(4.000000, b()))));var j = {contents: 0.000000};f((function(k){j.contents = (j.contents + k);}), i);return j.contents | |
***** FunScript.Tests.Lists.List.iter2 works | |
// Code: | |
var i, h, g, f, e, d, c, b, a;a = (function(j,k){return (new h(j, k));});b = (function(){return (new i());});c = (function(j,k,l,m){return d((function(n){return (function(o){return (function(p){return (function(q){return j(o)(p)(q);});});});}), k, l, m);});d = (function(j,k,l,m){return e(j, 0, k, l, m);});e = (function(j,k,l,m,n){var o = (new g(m, n));if ((o.Items[0.000000].Tag == 1.000000)) {if ((o.Items[1.000000].Tag == 1.000000)) {var p = o.Items[0.000000].Item1;var q = o.Items[0.000000].Item2;var r = o.Items[1.000000].Item1;var s = o.Items[1.000000].Item2;return e(j, (k + 1), j(k)(l)(p)(r), q, s);}else{throw ("Lists had different lengths");return null;};}else{if ((o.Items[1.000000].Tag == 0.000000)) {return l;}else{throw ("Lists had different lengths");return null;};};});f = (function(j,k,l){var m;return c((function(n){return (function(o){return (function(p){return j(o)(p);});});}), m, k, l);});g = (function(Item0,Item1){var l = this;l.Items = [Item0, Item1];});h = (function(Item1,Item2){var l = this;l.Tag = 1.000000;l._CaseName = "Cons";l.Item1 = Item1;l.Item2 = Item2;});i = (function(){var j = this;j.Tag = 0.000000;j._CaseName = "Nil";});var j = a(1.000000, a(2.000000, a(3.000000, a(4.000000, b()))));var k = {contents: 0.000000};f((function(l){return (function(m){k.contents = ((k.contents + l) + m);});}), j, j);return k.contents | |
***** FunScript.Tests.Lists.List.iteri works | |
// Code: | |
var g, f, e, d, c, b, a;a = (function(h,i){return (new f(h, i));});b = (function(){return (new g());});c = (function(h,i,j){return d(h, 0, i, j);});d = (function(h,i,j,k){if ((k.Tag == 1.000000)) {var l = k.Item2;var m = k.Item1;return d(h, (i + 1), h(i)(j)(m), l);}else{return j;};});e = (function(h,i){var j;return c((function(k){return (function(l){return (function(m){return h(k)(m);});});}), j, i);});f = (function(Item1,Item2){var j = this;j.Tag = 1.000000;j._CaseName = "Cons";j.Item1 = Item1;j.Item2 = Item2;});g = (function(){var h = this;h.Tag = 0.000000;h._CaseName = "Nil";});var h = a(1.000000, a(2.000000, a(3.000000, a(4.000000, b()))));var i = {contents: 0.000000};e((function(j){return (function(k){i.contents = (i.contents + (j * k));});}), h);return i.contents | |
***** FunScript.Tests.Lists.List.iteri2 works | |
// Code: | |
var h, g, f, e, d, c, b, a;a = (function(i,j){return (new g(i, j));});b = (function(){return (new h());});c = (function(i,j,k,l){return d(i, 0, j, k, l);});d = (function(i,j,k,l,m){var n = (new f(l, m));if ((n.Items[0.000000].Tag == 1.000000)) {if ((n.Items[1.000000].Tag == 1.000000)) {var o = n.Items[0.000000].Item1;var p = n.Items[0.000000].Item2;var q = n.Items[1.000000].Item1;var r = n.Items[1.000000].Item2;return d(i, (j + 1), i(j)(k)(o)(q), p, r);}else{throw ("Lists had different lengths");return null;};}else{if ((n.Items[1.000000].Tag == 0.000000)) {return k;}else{throw ("Lists had different lengths");return null;};};});e = (function(i,j,k){var l;return c((function(m){return (function(n){return (function(o){return (function(p){return i(m)(o)(p);});});});}), l, j, k);});f = (function(Item0,Item1){var k = this;k.Items = [Item0, Item1];});g = (function(Item1,Item2){var k = this;k.Tag = 1.000000;k._CaseName = "Cons";k.Item1 = Item1;k.Item2 = Item2;});h = (function(){var i = this;i.Tag = 0.000000;i._CaseName = "Nil";});var i = a(1.000000, a(2.000000, a(3.000000, a(4.000000, b()))));var j = {contents: 0.000000};e((function(k){return (function(l){return (function(m){j.contents = ((j.contents + (k * l)) + (k * m));});});}), i, i);return j.contents | |
***** FunScript.Tests.Lists.List.length works | |
// Code: | |
var h, g, f, e, d, c, b, a;a = (function(i,j){return (new g(i, j));});b = (function(){return (new h());});c = (function(i,j,k){return d((function(l){return (function(m){return (function(n){return i(m)(n);});});}), j, k);});d = (function(i,j,k){return e(i, 0, j, k);});e = (function(i,j,k,l){if ((l.Tag == 1.000000)) {var m = l.Item2;var n = l.Item1;return e(i, (j + 1), i(j)(k)(n), m);}else{return k;};});f = (function(i){return c((function(j){return (function(k){return (j + 1);});}), 0, i);});g = (function(Item1,Item2){var k = this;k.Tag = 1.000000;k._CaseName = "Cons";k.Item1 = Item1;k.Item2 = Item2;});h = (function(){var i = this;i.Tag = 0.000000;i._CaseName = "Nil";});var i = a(1.000000, a(2.000000, a(3.000000, a(4.000000, b()))));return f(i) | |
***** FunScript.Tests.Lists.List.Length works | |
// Code: | |
var h, g, f, e, d, c, b, a;a = (function(i,j){return (new g(i, j));});b = (function(){return (new h());});c = (function(i,j,k){return d((function(l){return (function(m){return (function(n){return i(m)(n);});});}), j, k);});d = (function(i,j,k){return e(i, 0, j, k);});e = (function(i,j,k,l){if ((l.Tag == 1.000000)) {var m = l.Item2;var n = l.Item1;return e(i, (j + 1), i(j)(k)(n), m);}else{return k;};});f = (function(i){return c((function(j){return (function(k){return (j + 1);});}), 0, i);});g = (function(Item1,Item2){var k = this;k.Tag = 1.000000;k._CaseName = "Cons";k.Item1 = Item1;k.Item2 = Item2;});h = (function(){var i = this;i.Tag = 0.000000;i._CaseName = "Nil";});var i = a(1.000000, a(2.000000, a(3.000000, a(4.000000, b()))));return f(i) | |
***** FunScript.Tests.Lists.List.map works | |
// Code: | |
var j, i, h, g, f, e, d, c, b, a;a = (function(k,l){return (new i(k, l));});b = (function(){return (new j());});c = (function(k,l,m){return d((function(n){return (function(o){return (function(p){return k(o)(p);});});}), l, m);});d = (function(k,l,m){return e(k, 0, l, m);});e = (function(k,l,m,n){if ((n.Tag == 1.000000)) {var o = n.Item2;var p = n.Item1;return e(k, (l + 1), k(l)(m)(p), o);}else{return m;};});f = (function(k){if ((k.Tag == 1.000000)) {var l = k.Item2;var m = k.Item1;return m;}else{throw ("List was empty");return null;};});g = (function(k,l){return h(c((function(m){return (function(n){return (new i(k(n), m));});}), (new j()), l));});h = (function(k){return c((function(l){return (function(m){return (new i(m, l));});}), (new j()), k);});i = (function(Item1,Item2){var m = this;m.Tag = 1.000000;m._CaseName = "Cons";m.Item1 = Item1;m.Item2 = Item2;});j = (function(){var k = this;k.Tag = 0.000000;k._CaseName = "Nil";});var k = a(1.000000, b());var l = 2.000000;var m = g((function(n){return (l * n);}), k);return f(m) | |
***** FunScript.Tests.Lists.List.map2 works | |
// Code: | |
var n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(o,p){return (new m(o, p));});b = (function(){return (new n());});c = (function(o,p,q){return e((function(r){return (function(s){return (function(t){return o(s)(t);});});}), p, q);});d = (function(o,p,q,r){return f((function(s){return (function(t){return (function(u){return (function(v){return o(t)(u)(v);});});});}), p, q, r);});e = (function(o,p,q){return h(o, 0, p, q);});f = (function(o,p,q,r){return g(o, 0, p, q, r);});g = (function(o,p,q,r,s){var t = (new l(r, s));if ((t.Items[0.000000].Tag == 1.000000)) {if ((t.Items[1.000000].Tag == 1.000000)) {var u = t.Items[0.000000].Item1;var v = t.Items[0.000000].Item2;var w = t.Items[1.000000].Item1;var x = t.Items[1.000000].Item2;return g(o, (p + 1), o(p)(q)(u)(w), v, x);}else{throw ("Lists had different lengths");return null;};}else{if ((t.Items[1.000000].Tag == 0.000000)) {return q;}else{throw ("Lists had different lengths");return null;};};});h = (function(o,p,q,r){if ((r.Tag == 1.000000)) {var s = r.Item2;var t = r.Item1;return h(o, (p + 1), o(p)(q)(t), s);}else{return q;};});i = (function(o){if ((o.Tag == 1.000000)) {var p = o.Item2;var q = o.Item1;return q;}else{throw ("List was empty");return null;};});j = (function(o,p,q){return k(d((function(r){return (function(s){return (function(t){return (new m(o(s)(t), r));});});}), (new n()), p, q));});k = (function(o){return c((function(p){return (function(q){return (new m(q, p));});}), (new n()), o);});l = (function(Item0,Item1){var q = this;q.Items = [Item0, Item1];});m = (function(Item1,Item2){var q = this;q.Tag = 1.000000;q._CaseName = "Cons";q.Item1 = Item1;q.Item2 = Item2;});n = (function(){var o = this;o.Tag = 0.000000;o._CaseName = "Nil";});var o = a(1.000000, b());var p = a(2.000000, b());var q = j((function(r){return (function(s){return (r * s);});}), o, p);return i(q) | |
***** FunScript.Tests.Lists.List.map3 works | |
// Code: | |
var n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(o,p){return (new m(o, p));});b = (function(){return (new n());});c = (function(o,p,q){return e((function(r){return (function(s){return (function(t){return o(s)(t);});});}), p, q);});d = (function(o,p,q,r,s){return f((function(t){return (function(u){return (function(v){return (function(w){return o(u)(v)(w);});});});}), p, q, r, s);});e = (function(o,p,q){return h(o, 0, p, q);});f = (function(o,p,q,r,s){return g(o, 0, p, q, r, s);});g = (function(o,p,q,r,s,t){var u = (new l(r, s, t));if ((u.Items[0.000000].Tag == 1.000000)) {if ((u.Items[1.000000].Tag == 1.000000)) {if ((u.Items[2.000000].Tag == 1.000000)) {var v = u.Items[0.000000].Item1;var w = u.Items[0.000000].Item2;var x = u.Items[1.000000].Item1;var y = u.Items[1.000000].Item2;var z = u.Items[2.000000].Item1;var A = u.Items[2.000000].Item2;return g(o, (p + 1), o(p)(q)(v)(x)(z), w, y, A);}else{throw ("Lists had different lengths");return null;};}else{throw ("Lists had different lengths");return null;};}else{if ((u.Items[1.000000].Tag == 0.000000)) {if ((u.Items[2.000000].Tag == 0.000000)) {return q;}else{throw ("Lists had different lengths");return null;};}else{throw ("Lists had different lengths");return null;};};});h = (function(o,p,q,r){if ((r.Tag == 1.000000)) {var s = r.Item2;var t = r.Item1;return h(o, (p + 1), o(p)(q)(t), s);}else{return q;};});i = (function(o){if ((o.Tag == 1.000000)) {var p = o.Item2;var q = o.Item1;return q;}else{throw ("List was empty");return null;};});j = (function(o,p,q,r){return k(d((function(s){return (function(t){return (function(u){return (function(v){return (new m(o(t)(u)(v), s));});});});}), (new n()), p, q, r));});k = (function(o){return c((function(p){return (function(q){return (new m(q, p));});}), (new n()), o);});l = (function(Item0,Item1,Item2){var r = this;r.Items = [Item0, Item1, Item2];});m = (function(Item1,Item2){var q = this;q.Tag = 1.000000;q._CaseName = "Cons";q.Item1 = Item1;q.Item2 = Item2;});n = (function(){var o = this;o.Tag = 0.000000;o._CaseName = "Nil";});var o = a(1.000000, b());var p = a(2.000000, b());var q = a(3.000000, b());var r = j((function(s){return (function(t){return (function(u){return ((s * t) * u);});});}), o, p, q);return i(q) | |
***** FunScript.Tests.Lists.List.mapi works | |
// Code: | |
var j, i, h, g, f, e, d, c, b, a;a = (function(k,l){return (new i(k, l));});b = (function(){return (new j());});c = (function(k,l,m){return d((function(n){return (function(o){return (function(p){return k(o)(p);});});}), l, m);});d = (function(k,l,m){return e(k, 0, l, m);});e = (function(k,l,m,n){if ((n.Tag == 1.000000)) {var o = n.Item2;var p = n.Item1;return e(k, (l + 1), k(l)(m)(p), o);}else{return m;};});f = (function(k){if ((k.Tag == 1.000000)) {var l = k.Item2;var m = k.Item1;return m;}else{throw ("List was empty");return null;};});g = (function(k,l){return h(d((function(m){return (function(n){return (function(o){return (new i(k(m)(o), n));});});}), (new j()), l));});h = (function(k){return c((function(l){return (function(m){return (new i(m, l));});}), (new j()), k);});i = (function(Item1,Item2){var m = this;m.Tag = 1.000000;m._CaseName = "Cons";m.Item1 = Item1;m.Item2 = Item2;});j = (function(){var k = this;k.Tag = 0.000000;k._CaseName = "Nil";});var k = a(1.000000, b());var l = g((function(m){return (function(n){return (m + n);});}), k);return f(l) | |
***** FunScript.Tests.Lists.List.mapi2 works | |
// Code: | |
var m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(n,o){return (new l(n, o));});b = (function(){return (new m());});c = (function(n,o,p){return d((function(q){return (function(r){return (function(s){return n(r)(s);});});}), o, p);});d = (function(n,o,p){return g(n, 0, o, p);});e = (function(n,o,p,q){return f(n, 0, o, p, q);});f = (function(n,o,p,q,r){var s = (new k(q, r));if ((s.Items[0.000000].Tag == 1.000000)) {if ((s.Items[1.000000].Tag == 1.000000)) {var t = s.Items[0.000000].Item1;var u = s.Items[0.000000].Item2;var v = s.Items[1.000000].Item1;var w = s.Items[1.000000].Item2;return f(n, (o + 1), n(o)(p)(t)(v), u, w);}else{throw ("Lists had different lengths");return null;};}else{if ((s.Items[1.000000].Tag == 0.000000)) {return p;}else{throw ("Lists had different lengths");return null;};};});g = (function(n,o,p,q){if ((q.Tag == 1.000000)) {var r = q.Item2;var s = q.Item1;return g(n, (o + 1), n(o)(p)(s), r);}else{return p;};});h = (function(n){if ((n.Tag == 1.000000)) {var o = n.Item2;var p = n.Item1;return p;}else{throw ("List was empty");return null;};});i = (function(n,o,p){return j(e((function(q){return (function(r){return (function(s){return (function(t){return (new l(n(q)(s)(t), r));});});});}), (new m()), o, p));});j = (function(n){return c((function(o){return (function(p){return (new l(p, o));});}), (new m()), n);});k = (function(Item0,Item1){var p = this;p.Items = [Item0, Item1];});l = (function(Item1,Item2){var p = this;p.Tag = 1.000000;p._CaseName = "Cons";p.Item1 = Item1;p.Item2 = Item2;});m = (function(){var n = this;n.Tag = 0.000000;n._CaseName = "Nil";});var n = a(1.000000, b());var o = a(2.000000, b());var p = i((function(q){return (function(r){return (function(s){return (q + (r * s));});});}), n, o);return h(p) | |
***** FunScript.Tests.Lists.List.max works | |
// Code: | |
var i, h, g, f, e, d, c, b, a;a = (function(j,k){return (new h(j, k));});b = (function(){return (new i());});c = (function(j,k,l){return d((function(m){return (function(n){return (function(o){return j(n)(o);});});}), k, l);});d = (function(j,k,l){return e(j, 0, k, l);});e = (function(j,k,l,m){if ((m.Tag == 1.000000)) {var n = m.Item2;var o = m.Item1;return e(j, (k + 1), j(k)(l)(o), n);}else{return l;};});f = (function(j){return g((function(k){return (function(l){if ((l > k)) {return l;}else{return k;};});}), j);});g = (function(j,k){if ((k.Tag == 1.000000)) {var l = k.Item2;var m = k.Item1;return c(j, m, l);}else{throw ("List was empty");return null;};});h = (function(Item1,Item2){var l = this;l.Tag = 1.000000;l._CaseName = "Cons";l.Item1 = Item1;l.Item2 = Item2;});i = (function(){var j = this;j.Tag = 0.000000;j._CaseName = "Nil";});var j = a(1.000000, a(2.000000, b()));return f(j) | |
***** FunScript.Tests.Lists.List.maxBy works | |
// Code: | |
var i, h, g, f, e, d, c, b, a;a = (function(j,k){return (new h(j, k));});b = (function(){return (new i());});c = (function(j,k,l){return d((function(m){return (function(n){return (function(o){return j(n)(o);});});}), k, l);});d = (function(j,k,l){return e(j, 0, k, l);});e = (function(j,k,l,m){if ((m.Tag == 1.000000)) {var n = m.Item2;var o = m.Item1;return e(j, (k + 1), j(k)(l)(o), n);}else{return l;};});f = (function(j,k){return g((function(l){return (function(m){if ((j(m) > j(l))) {return m;}else{return l;};});}), k);});g = (function(j,k){if ((k.Tag == 1.000000)) {var l = k.Item2;var m = k.Item1;return c(j, m, l);}else{throw ("List was empty");return null;};});h = (function(Item1,Item2){var l = this;l.Tag = 1.000000;l._CaseName = "Cons";l.Item1 = Item1;l.Item2 = Item2;});i = (function(){var j = this;j.Tag = 0.000000;j._CaseName = "Nil";});var j = a(1.000000, a(2.000000, b()));return f((function(k){return (-k);}), j) | |
***** FunScript.Tests.Lists.List.min works | |
// Code: | |
var i, h, g, f, e, d, c, b, a;a = (function(j,k){return (new h(j, k));});b = (function(){return (new i());});c = (function(j,k,l){return d((function(m){return (function(n){return (function(o){return j(n)(o);});});}), k, l);});d = (function(j,k,l){return e(j, 0, k, l);});e = (function(j,k,l,m){if ((m.Tag == 1.000000)) {var n = m.Item2;var o = m.Item1;return e(j, (k + 1), j(k)(l)(o), n);}else{return l;};});f = (function(j){return g((function(k){return (function(l){if ((l < k)) {return l;}else{return k;};});}), j);});g = (function(j,k){if ((k.Tag == 1.000000)) {var l = k.Item2;var m = k.Item1;return c(j, m, l);}else{throw ("List was empty");return null;};});h = (function(Item1,Item2){var l = this;l.Tag = 1.000000;l._CaseName = "Cons";l.Item1 = Item1;l.Item2 = Item2;});i = (function(){var j = this;j.Tag = 0.000000;j._CaseName = "Nil";});var j = a(1.000000, a(2.000000, b()));return f(j) | |
***** FunScript.Tests.Lists.List.minBy works | |
// Code: | |
var i, h, g, f, e, d, c, b, a;a = (function(j,k){return (new h(j, k));});b = (function(){return (new i());});c = (function(j,k,l){return d((function(m){return (function(n){return (function(o){return j(n)(o);});});}), k, l);});d = (function(j,k,l){return e(j, 0, k, l);});e = (function(j,k,l,m){if ((m.Tag == 1.000000)) {var n = m.Item2;var o = m.Item1;return e(j, (k + 1), j(k)(l)(o), n);}else{return l;};});f = (function(j,k){return g((function(l){return (function(m){if ((j(m) > j(l))) {return l;}else{return m;};});}), k);});g = (function(j,k){if ((k.Tag == 1.000000)) {var l = k.Item2;var m = k.Item1;return c(j, m, l);}else{throw ("List was empty");return null;};});h = (function(Item1,Item2){var l = this;l.Tag = 1.000000;l._CaseName = "Cons";l.Item1 = Item1;l.Item2 = Item2;});i = (function(){var j = this;j.Tag = 0.000000;j._CaseName = "Nil";});var j = a(1.000000, a(2.000000, b()));return f((function(k){return (-k);}), j) | |
***** FunScript.Tests.Lists.List.nth works | |
// Code: | |
var j, i, h, g, f, e, d, c, b, a;a = (function(k,l){return (new i(k, l));});b = (function(){return (new j());});c = (function(k,l){var m = e(k, l);if ((m.Tag == 1.000000)) {var n = h(m);return n;}else{throw ("List did not contain any matching elements");return null;};});d = (function(k,l){return c((function(m){return (function(n){return (l == m);});}), k);});e = (function(k,l){return f((function(m){return (function(n){if (k(m)(n)) {return {Tag: 1.000000, Value: n};}else{return {Tag: 0.000000};};});}), l);});f = (function(k,l){return g(k, 0, l);});g = (function(k,l,m){if ((m.Tag == 1.000000)) {var n = m.Item2;var o = m.Item1;var p = k(l)(o);if ((p.Tag == 0.000000)) {return g(k, (l + 1), n);}else{return p;};}else{return {Tag: 0.000000};};});h = (function(k){return k.Value;;});i = (function(Item1,Item2){var m = this;m.Tag = 1.000000;m._CaseName = "Cons";m.Item1 = Item1;m.Item2 = Item2;});j = (function(){var k = this;k.Tag = 0.000000;k._CaseName = "Nil";});var k = a(1.000000, a(2.000000, b()));return d(k, 1) | |
***** FunScript.Tests.Lists.List.ofArray works | |
// Code: | |
var g, f, e, d, c, b, a;a = (function(h,i,j){return b((function(k){return (function(l){return (function(m){return h(l)(m);});});}), i, j);});b = (function(h,i,j){var k = j;var l = c(i);for (var m = 1; m <= l; m++){k = h((m - 1))(i[(l - m)])(k);null;};return k;});c = (function(h){return h.length;;});d = (function(h){if ((h.Tag == 1.000000)) {var i = h.Item2;var j = h.Item1;return j;}else{throw ("List was empty");return null;};});e = (function(h){return a((function(i){return (function(j){return (new f(i, j));});}), h, (new g()));});f = (function(Item1,Item2){var j = this;j.Tag = 1.000000;j._CaseName = "Cons";j.Item1 = Item1;j.Item2 = Item2;});g = (function(){var h = this;h.Tag = 0.000000;h._CaseName = "Nil";});var h = [1.000000, 2.000000];var i = e(h);return d(i) | |
***** FunScript.Tests.Lists.List.ofSeq works | |
// Code: | |
var x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(y){return y.length;;});b = (function(y){var z = this;{};z.factory = y;});c = (function(y,z){return (new w(y, z));});d = (function(){return (new x());});e = (function(y,z,A){return f((function(B){return (function(C){return (function(D){return y(C)(D);});});}), z, A);});f = (function(y,z,A){return g(y, 0, z, A);});g = (function(y,z,A,B){if ((B.Tag == 1.000000)) {var C = B.Item2;var D = B.Item1;return g(y, (z + 1), y(z)(A)(D), C);}else{return A;};});h = (function(y){if ((y.Tag == 1.000000)) {var z = y.Item2;var A = y.Item1;return A;}else{throw ("List was empty");return null;};});i = (function(y){return e((function(z){return (function(A){return (new w(A, z));});}), (new x()), y);});j = (function(y){return y.Value;;});k = (function(y){return y.Value;;});l = (function(y){return ((y.Tag == 1.000000) && true);});m = (function(y){return y.GetEnumerator();});n = (function(y,z,A){return o((function(B){return (function(C){return (function(D){return y(C)(D);});});}), z, A);});o = (function(y,z,A){return p(y, z, m(A));});p = (function(y,z,A){var B = {contents: 0};var C = {contents: z};while (A.MoveNext()){C.contents = y(B.contents)(C.contents)(A.get_Current());null;B.contents = (B.contents + 1);null;};return C.contents;});q = (function(y){var z;z = (new b(y));return {GetEnumerator: (function(A){return (function(B,A){var C;return B.factory(C);})(z, A);})};});r = (function(y){return t((function(z){if ((z < a(y))) {return {Tag: 1.000000, Value: (new u(y[z], (z + 1)))};}else{return {Tag: 0.000000};};}), 0);});s = (function(y){return i(n((function(z){return (function(A){return c(A, z);});}), d(), y));});t = (function(y,z){return q((function(A){var B;B = (new v(z, y));return {get_Current: (function(C){return (function(D,C){return D.current;})(B, C);}), MoveNext: (function(C){return (function(D,C){var E = (function(F){var G = j(D.acc);var H = D.unfold(G);if ((H.Tag == 1.000000)) {var I = k(H).Items[0.000000];var J = k(H).Items[1.000000];D.acc = {Tag: 1.000000, Value: J};D.current = I;return true;}else{D.acc = {Tag: 0.000000};D.current = null;return false;};});return (l(D.acc) && (function(){var F;return E(F);})());})(B, C);}), Reset: (function(C){return (function(D,C){D.acc = {Tag: 1.000000, Value: D.seed};D.current = null;})(B, C);}), Dispose: (function(C){return (function(D,C){;})(B, C);})};}));});u = (function(Item0,Item1){var A = this;A.Items = [Item0, Item1];});v = (function(y,z){var A = this;{};A.seed = y;A.unfold = z;A.acc = {Tag: 1.000000, Value: A.seed};A.current = null;});w = (function(Item1,Item2){var A = this;A.Tag = 1.000000;A._CaseName = "Cons";A.Item1 = Item1;A.Item2 = Item2;});x = (function(){var y = this;y.Tag = 0.000000;y._CaseName = "Nil";});var y = r([1.000000, 2.000000]);var z = s(y);return h(z) | |
***** FunScript.Tests.Lists.List.partition works | |
// Code: | |
var j, i, h, g, f, e, d, c, b, a;a = (function(k,l){return (new i(k, l));});b = (function(){return (new j());});c = (function(k,l,m){return d((function(n){return (function(o){return (function(p){return k(o)(p);});});}), l, m);});d = (function(k,l,m){return e(k, 0, l, m);});e = (function(k,l,m,n){if ((n.Tag == 1.000000)) {var o = n.Item2;var p = n.Item1;return e(k, (l + 1), k(l)(m)(p), o);}else{return m;};});f = (function(k){if ((k.Tag == 1.000000)) {var l = k.Item2;var m = k.Item1;return m;}else{throw ("List was empty");return null;};});g = (function(k,l){return c((function(m){var n = m.Items[0.000000];var o = m.Items[1.000000];return (function(p){if (k(p)) {return (new h((new i(p, n)), o));}else{return (new h(n, (new i(p, o))));};});}), (new h((new j()), (new j()))), l);});h = (function(Item0,Item1){var m = this;m.Items = [Item0, Item1];});i = (function(Item1,Item2){var m = this;m.Tag = 1.000000;m._CaseName = "Cons";m.Item1 = Item1;m.Item2 = Item2;});j = (function(){var k = this;k.Tag = 0.000000;k._CaseName = "Nil";});var k = a(1.000000, a(2.000000, b()));var l = g((function(m){return (m <= 1.000000);}), k);var m = l.Items[1.000000];var n = l.Items[0.000000];return (f(n) - f(m)) | |
***** FunScript.Tests.Lists.List.permute works | |
// Code: | |
var A, z, y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(B,C,D){return d((function(E){return (function(F){return (function(G){return B(F)(G);});});}), C, D);});b = (function(B,C,D){return c((function(E){return (function(F){return (function(G){return B(F)(G);});});}), C, D);});c = (function(B,C,D){var E = D;var F = h(C);for (var G = 1; G <= F; G++){E = B((G - 1))(C[(F - G)])(E);null;};return E;});d = (function(B,C,D){var E = C;for (var F = 0; F <= (i(D) - 1); F++){E = B(F)(E)(D[F]);null;};return E;});e = (function(B,C,D){var E = C;for (var F = 0; F <= (h(D) - 1); F++){E = B(F)(E)(D[F]);null;};return E;});f = (function(B,C){return a((function(D){return (function(E){return (B(E) && D);});}), true, C);});g = (function(B,C){var D;return e((function(E){return (function(F){return (function(G){return B(E)(G);});});}), D, C);});h = (function(B){return B.length;;});i = (function(B){return B.length;;});j = (function(B,C){var D = h(C);var E = k(D);var F = l(D);g((function(G){return (function(H){var I = B(G);if (((I < 0) || (I >= D))) {throw ("Not a valid permutation");null;}else{;};E[I] = H;null;F[I] = 1;return null;});}), C);var G = 1;var H = f((function(I){return (G == I);}), F);if ((!H)) {throw ("Not a valid permutation");null;}else{;};return E;});k = (function(B){return new Array(B);;});l = (function(B){return new Array(B);;});m = (function(B,C){return (new z(B, C));});n = (function(){return (new A());});o = (function(B,C,D){return p((function(E){return (function(F){return (function(G){return B(F)(G);});});}), C, D);});p = (function(B,C,D){return r(B, 0, C, D);});q = (function(B,C,D){return s(B, 0, C, D);});r = (function(B,C,D,E){if ((E.Tag == 1.000000)) {var F = E.Item2;var G = E.Item1;return r(B, (C + 1), B(C)(D)(G), F);}else{return D;};});s = (function(B,C,D,E){if ((E.Tag == 1.000000)) {var F = E.Item2;var G = E.Item1;return s(B, (C + 1), B(C)(D)(G), F);}else{return D;};});t = (function(B){if ((B.Tag == 1.000000)) {var C = B.Item2;var D = B.Item1;return D;}else{throw ("List was empty");return null;};});u = (function(B,C){var D;return q((function(E){return (function(F){return (function(G){return B(E)(G);});});}), D, C);});v = (function(B){return o((function(C){return (function(D){return (C + 1);});}), 0, B);});w = (function(B){return b((function(C){return (function(D){return (new z(C, D));});}), B, (new A()));});x = (function(B,C){return w(j(B, y(C)));});y = (function(B){var C = v(B);var D = k(C);u((function(E){return (function(F){D[E] = F;return null;});}), B);return D;});z = (function(Item1,Item2){var D = this;D.Tag = 1.000000;D._CaseName = "Cons";D.Item1 = Item1;D.Item2 = Item2;});A = (function(){var B = this;B.Tag = 0.000000;B._CaseName = "Nil";});var B = m(1.000000, m(2.000000, n()));var C = x((function(D){return ((D + 1) - (2 * (D % 2)));}), B);return t(C) | |
***** FunScript.Tests.Lists.List.pick works | |
// Code: | |
var i, h, g, f, e, d, c, b, a;a = (function(j,k){return (new h(j, k));});b = (function(){return (new i());});c = (function(j,k){var l = d(j, k);if ((l.Tag == 1.000000)) {var m = g(l);return m;}else{throw ("List did not contain any matching elements");return null;};});d = (function(j,k){return e((function(l){return (function(m){return j(m);});}), k);});e = (function(j,k){return f(j, 0, k);});f = (function(j,k,l){if ((l.Tag == 1.000000)) {var m = l.Item2;var n = l.Item1;var o = j(k)(n);if ((o.Tag == 0.000000)) {return f(j, (k + 1), m);}else{return o;};}else{return {Tag: 0.000000};};});g = (function(j){return j.Value;;});h = (function(Item1,Item2){var l = this;l.Tag = 1.000000;l._CaseName = "Cons";l.Item1 = Item1;l.Item2 = Item2;});i = (function(){var j = this;j.Tag = 0.000000;j._CaseName = "Nil";});var j = a(1.000000, a(2.000000, b()));return c((function(k){if ((k == 2.000000)) {return {Tag: 1.000000, Value: k};}else{return {Tag: 0.000000};};}), j) | |
***** FunScript.Tests.Lists.List.reduce works | |
// Code: | |
var h, g, f, e, d, c, b, a;a = (function(i,j){return (new g(i, j));});b = (function(){return (new h());});c = (function(i,j,k){return d((function(l){return (function(m){return (function(n){return i(m)(n);});});}), j, k);});d = (function(i,j,k){return e(i, 0, j, k);});e = (function(i,j,k,l){if ((l.Tag == 1.000000)) {var m = l.Item2;var n = l.Item1;return e(i, (j + 1), i(j)(k)(n), m);}else{return k;};});f = (function(i,j){if ((j.Tag == 1.000000)) {var k = j.Item2;var l = j.Item1;return c(i, l, k);}else{throw ("List was empty");return null;};});g = (function(Item1,Item2){var k = this;k.Tag = 1.000000;k._CaseName = "Cons";k.Item1 = Item1;k.Item2 = Item2;});h = (function(){var i = this;i.Tag = 0.000000;i._CaseName = "Nil";});var i = a(1.000000, a(2.000000, b()));return f((function(j){return (function(k){return (j + k);});}), i) | |
***** FunScript.Tests.Lists.List.reduceBack works | |
// Code: | |
var m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(n,o){return (new l(n, o));});b = (function(){return (new m());});c = (function(n,o,p){return f((function(q){return (function(r){return (function(s){return n(r)(s);});});}), o, p);});d = (function(n,o,p){return g((function(q){return (function(r){return (function(s){return n(r)(s);});});}), o, p);});e = (function(n,o,p){return c((function(q){return (function(r){return n(r)(q);});}), p, k(o));});f = (function(n,o,p){return h(n, 0, o, p);});g = (function(n,o,p){return i(n, 0, o, p);});h = (function(n,o,p,q){if ((q.Tag == 1.000000)) {var r = q.Item2;var s = q.Item1;return h(n, (o + 1), n(o)(p)(s), r);}else{return p;};});i = (function(n,o,p,q){if ((q.Tag == 1.000000)) {var r = q.Item2;var s = q.Item1;return i(n, (o + 1), n(o)(p)(s), r);}else{return p;};});j = (function(n,o){if ((o.Tag == 1.000000)) {var p = o.Item2;var q = o.Item1;return e(n, p, q);}else{throw ("List was empty");return null;};});k = (function(n){return d((function(o){return (function(p){return (new l(p, o));});}), (new m()), n);});l = (function(Item1,Item2){var p = this;p.Tag = 1.000000;p._CaseName = "Cons";p.Item1 = Item1;p.Item2 = Item2;});m = (function(){var n = this;n.Tag = 0.000000;n._CaseName = "Nil";});var n = a(1.000000, a(2.000000, b()));return j((function(o){return (function(p){return (o + p);});}), n) | |
***** FunScript.Tests.Lists.List.replicate works | |
// Code: | |
var f, e, d, c, b, a;a = (function(g){if ((g.Tag == 1.000000)) {var h = g.Item2;var i = g.Item1;return i;}else{throw ("List was empty");return null;};});b = (function(g,h){var i = (new f());for (var j = 1; j <= g; j++){i = (new e(h((g - j)), i));null;};return i;});c = (function(g,h){return b(g, (function(i){return h;}));});d = (function(g){if ((g.Tag == 1.000000)) {var h = g.Item2;var i = g.Item1;return h;}else{throw ("List was empty");return null;};});e = (function(Item1,Item2){var i = this;i.Tag = 1.000000;i._CaseName = "Cons";i.Item1 = Item1;i.Item2 = Item2;});f = (function(){var g = this;g.Tag = 0.000000;g._CaseName = "Nil";});var g = c(2, 1.000000);return (a(g) + a(d(g))) | |
***** FunScript.Tests.Lists.List.rev works | |
// Code: | |
var i, h, g, f, e, d, c, b, a;a = (function(j,k){return (new h(j, k));});b = (function(){return (new i());});c = (function(j,k,l){return d((function(m){return (function(n){return (function(o){return j(n)(o);});});}), k, l);});d = (function(j,k,l){return e(j, 0, k, l);});e = (function(j,k,l,m){if ((m.Tag == 1.000000)) {var n = m.Item2;var o = m.Item1;return e(j, (k + 1), j(k)(l)(o), n);}else{return l;};});f = (function(j){if ((j.Tag == 1.000000)) {var k = j.Item2;var l = j.Item1;return l;}else{throw ("List was empty");return null;};});g = (function(j){return c((function(k){return (function(l){return (new h(l, k));});}), (new i()), j);});h = (function(Item1,Item2){var l = this;l.Tag = 1.000000;l._CaseName = "Cons";l.Item1 = Item1;l.Item2 = Item2;});i = (function(){var j = this;j.Tag = 0.000000;j._CaseName = "Nil";});var j = a(1.000000, a(2.000000, b()));var k = g(j);return f(k) | |
***** FunScript.Tests.Lists.List.scan works | |
// Code: | |
var k, j, i, h, g, f, e, d, c, b, a;a = (function(l,m){return (new j(l, m));});b = (function(){return (new k());});c = (function(l,m,n){return d((function(o){return (function(p){return (function(q){return l(p)(q);});});}), m, n);});d = (function(l,m,n){return e(l, 0, m, n);});e = (function(l,m,n,o){if ((o.Tag == 1.000000)) {var p = o.Item2;var q = o.Item1;return e(l, (m + 1), l(m)(n)(q), p);}else{return n;};});f = (function(l){if ((l.Tag == 1.000000)) {var m = l.Item2;var n = l.Item1;return n;}else{throw ("List was empty");return null;};});g = (function(l){return c((function(m){return (function(n){return (new j(n, m));});}), (new k()), l);});h = (function(l,m,n){return g(c((function(o){return (function(p){if ((o.Tag == 1.000000)) {var q = o.Item2;var r = o.Item1;return (new j(l(r)(p), o));}else{throw ("never");return null;};});}), (new j(m, (new k()))), n));});i = (function(l){if ((l.Tag == 1.000000)) {var m = l.Item2;var n = l.Item1;return m;}else{throw ("List was empty");return null;};});j = (function(Item1,Item2){var n = this;n.Tag = 1.000000;n._CaseName = "Cons";n.Item1 = Item1;n.Item2 = Item2;});k = (function(){var l = this;l.Tag = 0.000000;l._CaseName = "Nil";});var l = a(1.000000, a(2.000000, a(3.000000, a(4.000000, b()))));var m = (function(n){return (function(o){return (n + o);});});var n = 0.000000;var o = (function(p){return h(m, n, p);})(l);return (f(o) + f(i(o))) | |
***** FunScript.Tests.Lists.List.scanBack works | |
// Code: | |
var l, k, j, i, h, g, f, e, d, c, b, a;a = (function(m,n){return (new k(m, n));});b = (function(){return (new l());});c = (function(m,n,o){return d((function(p){return (function(q){return (function(r){return m(q)(r);});});}), n, o);});d = (function(m,n,o){return e(m, 0, n, o);});e = (function(m,n,o,p){if ((p.Tag == 1.000000)) {var q = p.Item2;var r = p.Item1;return e(m, (n + 1), m(n)(o)(r), q);}else{return o;};});f = (function(m){if ((m.Tag == 1.000000)) {var n = m.Item2;var o = m.Item1;return o;}else{throw ("List was empty");return null;};});g = (function(m){return c((function(n){return (function(o){return (new k(o, n));});}), (new l()), m);});h = (function(m,n,o){return g(c((function(p){return (function(q){if ((p.Tag == 1.000000)) {var r = p.Item2;var s = p.Item1;return (new k(m(s)(q), p));}else{throw ("never");return null;};});}), (new k(n, (new l()))), o));});i = (function(m,n,o){return g(h((function(p){return (function(q){return m(q)(p);});}), o, g(n)));});j = (function(m){if ((m.Tag == 1.000000)) {var n = m.Item2;var o = m.Item1;return n;}else{throw ("List was empty");return null;};});k = (function(Item1,Item2){var o = this;o.Tag = 1.000000;o._CaseName = "Cons";o.Item1 = Item1;o.Item2 = Item2;});l = (function(){var m = this;m.Tag = 0.000000;m._CaseName = "Nil";});var m = a(1.000000, a(2.000000, a(3.000000, b())));var n = i((function(o){return (function(p){return (o + p);});}), m, 0.000000);return (f(n) + f(j(n))) | |
***** FunScript.Tests.Lists.List.sort works | |
// Code: | |
var x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(y){return y.slice(0);;});b = (function(y,z,A){return c((function(B){return (function(C){return (function(D){return y(C)(D);});});}), z, A);});c = (function(y,z,A){var B = A;var C = d(z);for (var D = 1; D <= C; D++){B = y((D - 1))(z[(C - D)])(B);null;};return B;});d = (function(y){return y.length;;});e = (function(y){var z = a(y);f(z);return z;});f = (function(y){return g((function(z){return (function(A){return (z < A ? -1 : (z == A ? 0 : 1));});}), y);});g = (function(y,z){z.sort(function($a,$b) { return y($a)($b); });;});h = (function(y){return new Array(y);;});i = (function(y,z){return (new w(y, z));});j = (function(){return (new x());});k = (function(y,z,A){return l((function(B){return (function(C){return (function(D){return y(C)(D);});});}), z, A);});l = (function(y,z,A){return n(y, 0, z, A);});m = (function(y,z,A){return o(y, 0, z, A);});n = (function(y,z,A,B){if ((B.Tag == 1.000000)) {var C = B.Item2;var D = B.Item1;return n(y, (z + 1), y(z)(A)(D), C);}else{return A;};});o = (function(y,z,A,B){if ((B.Tag == 1.000000)) {var C = B.Item2;var D = B.Item1;return o(y, (z + 1), y(z)(A)(D), C);}else{return A;};});p = (function(y){if ((y.Tag == 1.000000)) {var z = y.Item2;var A = y.Item1;return A;}else{throw ("List was empty");return null;};});q = (function(y,z){var A;return m((function(B){return (function(C){return (function(D){return y(B)(D);});});}), A, z);});r = (function(y){return k((function(z){return (function(A){return (z + 1);});}), 0, y);});s = (function(y){return b((function(z){return (function(A){return (new w(z, A));});}), y, (new x()));});t = (function(y){return s(e(v(y)));});u = (function(y){if ((y.Tag == 1.000000)) {var z = y.Item2;var A = y.Item1;return z;}else{throw ("List was empty");return null;};});v = (function(y){var z = r(y);var A = h(z);q((function(B){return (function(C){A[B] = C;return null;});}), y);return A;});w = (function(Item1,Item2){var A = this;A.Tag = 1.000000;A._CaseName = "Cons";A.Item1 = Item1;A.Item2 = Item2;});x = (function(){var y = this;y.Tag = 0.000000;y._CaseName = "Nil";});var y = i(3.000000, i(4.000000, i(1.000000, i(2.000000, j()))));var z = t(y);return (p(z) + p(u(z))) | |
***** FunScript.Tests.Lists.List.sortBy works | |
// Code: | |
var v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(w,x,y){return b((function(z){return (function(A){return (function(B){return w(A)(B);});});}), x, y);});b = (function(w,x,y){var z = y;var A = c(x);for (var B = 1; B <= A; B++){z = w((B - 1))(x[(A - B)])(z);null;};return z;});c = (function(w){return w.length;;});d = (function(w,x){return e((function(y){return (function(z){var A = w(y);var B = w(z);return (A < B ? -1 : (A == B ? 0 : 1));});}), x);});e = (function(w,x){x.sort(function($a,$b) { return w($a)($b); });;});f = (function(w){return new Array(w);;});g = (function(w,x){return (new u(w, x));});h = (function(){return (new v());});i = (function(w,x,y){return j((function(z){return (function(A){return (function(B){return w(A)(B);});});}), x, y);});j = (function(w,x,y){return l(w, 0, x, y);});k = (function(w,x,y){return m(w, 0, x, y);});l = (function(w,x,y,z){if ((z.Tag == 1.000000)) {var A = z.Item2;var B = z.Item1;return l(w, (x + 1), w(x)(y)(B), A);}else{return y;};});m = (function(w,x,y,z){if ((z.Tag == 1.000000)) {var A = z.Item2;var B = z.Item1;return m(w, (x + 1), w(x)(y)(B), A);}else{return y;};});n = (function(w){if ((w.Tag == 1.000000)) {var x = w.Item2;var y = w.Item1;return y;}else{throw ("List was empty");return null;};});o = (function(w,x){var y;return k((function(z){return (function(A){return (function(B){return w(z)(B);});});}), y, x);});p = (function(w){return i((function(x){return (function(y){return (x + 1);});}), 0, w);});q = (function(w){return a((function(x){return (function(y){return (new u(x, y));});}), w, (new v()));});r = (function(w,x){var y = t(x);d(w, y);return q(y);});s = (function(w){if ((w.Tag == 1.000000)) {var x = w.Item2;var y = w.Item1;return x;}else{throw ("List was empty");return null;};});t = (function(w){var x = p(w);var y = f(x);o((function(z){return (function(A){y[z] = A;return null;});}), w);return y;});u = (function(Item1,Item2){var y = this;y.Tag = 1.000000;y._CaseName = "Cons";y.Item1 = Item1;y.Item2 = Item2;});v = (function(){var w = this;w.Tag = 0.000000;w._CaseName = "Nil";});var w = g(3.000000, g(1.000000, g(4.000000, g(2.000000, h()))));var x = r((function(y){return (-y);}), w);return (n(x) + n(s(x))) | |
***** FunScript.Tests.Lists.List.sortWith works | |
// Code: | |
var w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(x){return x.slice(0);;});b = (function(x,y,z){return c((function(A){return (function(B){return (function(C){return x(B)(C);});});}), y, z);});c = (function(x,y,z){var A = z;var B = d(y);for (var C = 1; C <= B; C++){A = x((C - 1))(y[(B - C)])(A);null;};return A;});d = (function(x){return x.length;;});e = (function(x,y){y.sort(function($a,$b) { return x($a)($b); });;});f = (function(x,y){var z = a(y);e(x, z);return z;});g = (function(x){return new Array(x);;});h = (function(x,y){return (new v(x, y));});i = (function(){return (new w());});j = (function(x,y,z){return k((function(A){return (function(B){return (function(C){return x(B)(C);});});}), y, z);});k = (function(x,y,z){return m(x, 0, y, z);});l = (function(x,y,z){return n(x, 0, y, z);});m = (function(x,y,z,A){if ((A.Tag == 1.000000)) {var B = A.Item2;var C = A.Item1;return m(x, (y + 1), x(y)(z)(C), B);}else{return z;};});n = (function(x,y,z,A){if ((A.Tag == 1.000000)) {var B = A.Item2;var C = A.Item1;return n(x, (y + 1), x(y)(z)(C), B);}else{return z;};});o = (function(x){if ((x.Tag == 1.000000)) {var y = x.Item2;var z = x.Item1;return z;}else{throw ("List was empty");return null;};});p = (function(x,y){var z;return l((function(A){return (function(B){return (function(C){return x(A)(C);});});}), z, y);});q = (function(x){return j((function(y){return (function(z){return (y + 1);});}), 0, x);});r = (function(x){return b((function(y){return (function(z){return (new v(y, z));});}), x, (new w()));});s = (function(x,y){return r(f(x, u(y)));});t = (function(x){if ((x.Tag == 1.000000)) {var y = x.Item2;var z = x.Item1;return y;}else{throw ("List was empty");return null;};});u = (function(x){var y = q(x);var z = g(y);p((function(A){return (function(B){z[A] = B;return null;});}), x);return z;});v = (function(Item1,Item2){var z = this;z.Tag = 1.000000;z._CaseName = "Cons";z.Item1 = Item1;z.Item2 = Item2;});w = (function(){var x = this;x.Tag = 0.000000;x._CaseName = "Nil";});var x = h(3.000000, h(4.000000, h(1.000000, h(2.000000, i()))));var y = s((function(z){return (function(A){return (z - A);});}), x);return (o(y) + o(t(y))) | |
***** FunScript.Tests.Lists.List.sum works | |
// Code: | |
var h, g, f, e, d, c, b, a;a = (function(i,j){return (new g(i, j));});b = (function(){return (new h());});c = (function(i,j,k){return d((function(l){return (function(m){return (function(n){return i(m)(n);});});}), j, k);});d = (function(i,j,k){return e(i, 0, j, k);});e = (function(i,j,k,l){if ((l.Tag == 1.000000)) {var m = l.Item2;var n = l.Item1;return e(i, (j + 1), i(j)(k)(n), m);}else{return k;};});f = (function(i){return c((function(j){return (function(k){return (j + k);});}), 0, i);});g = (function(Item1,Item2){var k = this;k.Tag = 1.000000;k._CaseName = "Cons";k.Item1 = Item1;k.Item2 = Item2;});h = (function(){var i = this;i.Tag = 0.000000;i._CaseName = "Nil";});var i = a(1.000000, a(2.000000, b()));return f(i) | |
***** FunScript.Tests.Lists.List.sumBy works | |
// Code: | |
var h, g, f, e, d, c, b, a;a = (function(i,j){return (new g(i, j));});b = (function(){return (new h());});c = (function(i,j,k){return d((function(l){return (function(m){return (function(n){return i(m)(n);});});}), j, k);});d = (function(i,j,k){return e(i, 0, j, k);});e = (function(i,j,k,l){if ((l.Tag == 1.000000)) {var m = l.Item2;var n = l.Item1;return e(i, (j + 1), i(j)(k)(n), m);}else{return k;};});f = (function(i,j){return c((function(k){return (function(l){return (k + i(l));});}), 0, j);});g = (function(Item1,Item2){var k = this;k.Tag = 1.000000;k._CaseName = "Cons";k.Item1 = Item1;k.Item2 = Item2;});h = (function(){var i = this;i.Tag = 0.000000;i._CaseName = "Nil";});var i = a(1.000000, a(2.000000, b()));var j = 2.000000;return f((function(k){return (j * k);}), i) | |
***** FunScript.Tests.Lists.List.tail works | |
// Code: | |
var f, e, d, c, b, a;a = (function(g,h){return (new e(g, h));});b = (function(){return (new f());});c = (function(g){if ((g.Tag == 1.000000)) {var h = g.Item2;var i = g.Item1;return i;}else{throw ("List was empty");return null;};});d = (function(g){if ((g.Tag == 1.000000)) {var h = g.Item2;var i = g.Item1;return h;}else{throw ("List was empty");return null;};});e = (function(Item1,Item2){var i = this;i.Tag = 1.000000;i._CaseName = "Cons";i.Item1 = Item1;i.Item2 = Item2;});f = (function(){var g = this;g.Tag = 0.000000;g._CaseName = "Nil";});var g = a(1.000000, a(2.000000, b()));var h = d(g);return c(h) | |
***** FunScript.Tests.Lists.List.Tail works | |
// Code: | |
var f, e, d, c, b, a;a = (function(g,h){return (new e(g, h));});b = (function(){return (new f());});c = (function(g){if ((g.Tag == 1.000000)) {var h = g.Item2;var i = g.Item1;return i;}else{throw ("List was empty");return null;};});d = (function(g){if ((g.Tag == 1.000000)) {var h = g.Item2;var i = g.Item1;return h;}else{throw ("List was empty");return null;};});e = (function(Item1,Item2){var i = this;i.Tag = 1.000000;i._CaseName = "Cons";i.Item1 = Item1;i.Item2 = Item2;});f = (function(){var g = this;g.Tag = 0.000000;g._CaseName = "Nil";});var g = a(1.000000, a(2.000000, a(3.000000, a(4.000000, b()))));return c(d(g)) | |
***** FunScript.Tests.Lists.List.toArray works | |
// Code: | |
var m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(n){return new Array(n);;});b = (function(n,o){return (new l(n, o));});c = (function(){return (new m());});d = (function(n,o,p){return e((function(q){return (function(r){return (function(s){return n(r)(s);});});}), o, p);});e = (function(n,o,p){return g(n, 0, o, p);});f = (function(n,o,p){return h(n, 0, o, p);});g = (function(n,o,p,q){if ((q.Tag == 1.000000)) {var r = q.Item2;var s = q.Item1;return g(n, (o + 1), n(o)(p)(s), r);}else{return p;};});h = (function(n,o,p,q){if ((q.Tag == 1.000000)) {var r = q.Item2;var s = q.Item1;return h(n, (o + 1), n(o)(p)(s), r);}else{return p;};});i = (function(n,o){var p;return f((function(q){return (function(r){return (function(s){return n(q)(s);});});}), p, o);});j = (function(n){return d((function(o){return (function(p){return (o + 1);});}), 0, n);});k = (function(n){var o = j(n);var p = a(o);i((function(q){return (function(r){p[q] = r;return null;});}), n);return p;});l = (function(Item1,Item2){var p = this;p.Tag = 1.000000;p._CaseName = "Cons";p.Item1 = Item1;p.Item2 = Item2;});m = (function(){var n = this;n.Tag = 0.000000;n._CaseName = "Nil";});var n = b(1.000000, b(2.000000, c()));var o = k(n);return (o[0] + o[1]) | |
***** FunScript.Tests.Lists.List.toSeq works | |
// Code: | |
var o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(p){var q = this;{};q.factory = p;});b = (function(p,q){return (new n(p, q));});c = (function(){return (new o());});d = (function(p){if ((p.Tag == 1.000000)) {var q = p.Item2;var r = p.Item1;return r;}else{throw ("List was empty");return null;};});e = (function(p){if ((p.Tag == 1.000000)) {var q = p.Item2;var r = p.Item1;return q;}else{throw ("List was empty");return null;};});f = (function(p){return p.Value;;});g = (function(p){return p.Value;;});h = (function(p){return ((p.Tag == 1.000000) && true);});i = (function(p){var q;q = (new a(p));return {GetEnumerator: (function(r){return (function(s,r){var t;return s.factory(t);})(q, r);})};});j = (function(p){return k((function(q){if ((q.Tag == 1.000000)) {var r = e(q);var s = d(q);return {Tag: 1.000000, Value: (new l(s, r))};}else{return {Tag: 0.000000};};}), p);});k = (function(p,q){return i((function(r){var s;s = (new m(q, p));return {get_Current: (function(t){return (function(u,t){return u.current;})(s, t);}), MoveNext: (function(t){return (function(u,t){var v = (function(w){var x = f(u.acc);var y = u.unfold(x);if ((y.Tag == 1.000000)) {var z = g(y).Items[0.000000];var A = g(y).Items[1.000000];u.acc = {Tag: 1.000000, Value: A};u.current = z;return true;}else{u.acc = {Tag: 0.000000};u.current = null;return false;};});return (h(u.acc) && (function(){var w;return v(w);})());})(s, t);}), Reset: (function(t){return (function(u,t){u.acc = {Tag: 1.000000, Value: u.seed};u.current = null;})(s, t);}), Dispose: (function(t){return (function(u,t){;})(s, t);})};}));});l = (function(Item0,Item1){var r = this;r.Items = [Item0, Item1];});m = (function(p,q){var r = this;{};r.seed = p;r.unfold = q;r.acc = {Tag: 1.000000, Value: r.seed};r.current = null;});n = (function(Item1,Item2){var r = this;r.Tag = 1.000000;r._CaseName = "Cons";r.Item1 = Item1;r.Item2 = Item2;});o = (function(){var p = this;p.Tag = 0.000000;p._CaseName = "Nil";});var p = b(1.000000, b(2.000000, c()));var q = j(p);return q.GetEnumerator().MoveNext() | |
***** FunScript.Tests.Lists.List.tryFind works | |
// Code: | |
var h, g, f, e, d, c, b, a;a = (function(i,j){return (new g(i, j));});b = (function(){return (new h());});c = (function(i,j){return d((function(k){return (function(l){if (i(l)) {return {Tag: 1.000000, Value: l};}else{return {Tag: 0.000000};};});}), j);});d = (function(i,j){return e(i, 0, j);});e = (function(i,j,k){if ((k.Tag == 1.000000)) {var l = k.Item2;var m = k.Item1;var n = i(j)(m);if ((n.Tag == 0.000000)) {return e(i, (j + 1), l);}else{return n;};}else{return {Tag: 0.000000};};});f = (function(i){return ((i.Tag == 1.000000) && true);});g = (function(Item1,Item2){var k = this;k.Tag = 1.000000;k._CaseName = "Cons";k.Item1 = Item1;k.Item2 = Item2;});h = (function(){var i = this;i.Tag = 0.000000;i._CaseName = "Nil";});var i = a(1.000000, a(2.000000, b()));var j = 1.000000;var k = c((function(l){return (j == l);}), i);return f(k) | |
***** FunScript.Tests.Lists.List.tryFindIndex works | |
// Code: | |
var h, g, f, e, d, c, b, a;a = (function(i,j){return (new g(i, j));});b = (function(){return (new h());});c = (function(i,j){return d((function(k){return (function(l){if (i(l)) {return {Tag: 1.000000, Value: k};}else{return {Tag: 0.000000};};});}), j);});d = (function(i,j){return e(i, 0, j);});e = (function(i,j,k){if ((k.Tag == 1.000000)) {var l = k.Item2;var m = k.Item1;var n = i(j)(m);if ((n.Tag == 0.000000)) {return e(i, (j + 1), l);}else{return n;};}else{return {Tag: 0.000000};};});f = (function(i){return i.Value;;});g = (function(Item1,Item2){var k = this;k.Tag = 1.000000;k._CaseName = "Cons";k.Item1 = Item1;k.Item2 = Item2;});h = (function(){var i = this;i.Tag = 0.000000;i._CaseName = "Nil";});var i = a(1.000000, a(2.000000, b()));var j = 2.000000;var k = c((function(l){return (j == l);}), i);return f(k) | |
***** FunScript.Tests.Lists.List.tryPick works | |
// Code: | |
var h, g, f, e, d, c, b, a;a = (function(i,j){return (new g(i, j));});b = (function(){return (new h());});c = (function(i,j){return d((function(k){return (function(l){return i(l);});}), j);});d = (function(i,j){return e(i, 0, j);});e = (function(i,j,k){if ((k.Tag == 1.000000)) {var l = k.Item2;var m = k.Item1;var n = i(j)(m);if ((n.Tag == 0.000000)) {return e(i, (j + 1), l);}else{return n;};}else{return {Tag: 0.000000};};});f = (function(i){return i.Value;;});g = (function(Item1,Item2){var k = this;k.Tag = 1.000000;k._CaseName = "Cons";k.Item1 = Item1;k.Item2 = Item2;});h = (function(){var i = this;i.Tag = 0.000000;i._CaseName = "Nil";});var i = a(1.000000, a(2.000000, b()));var j = c((function(k){if ((k == 2.000000)) {return {Tag: 1.000000, Value: k};}else{return {Tag: 0.000000};};}), i);if ((j.Tag == 0.000000)) {return 0.000000;}else{var k = f(j);return k;} | |
***** FunScript.Tests.Lists.List.unzip works | |
// Code: | |
var m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(n,o){return (new l(n, o));});b = (function(){return (new m());});c = (function(n,o,p){return d((function(q){return (function(r){return (function(s){return n(r)(s);});});}), o, p);});d = (function(n,o,p){return e(n, 0, o, p);});e = (function(n,o,p,q){if ((q.Tag == 1.000000)) {var r = q.Item2;var s = q.Item1;return e(n, (o + 1), n(o)(p)(s), r);}else{return p;};});f = (function(n){if ((n.Tag == 1.000000)) {var o = n.Item2;var p = n.Item1;return p;}else{throw ("List was empty");return null;};});g = (function(n){return c((function(o){var p = o.Items[0.000000];var q = o.Items[1.000000];return (function(r){var s = r.Items[0.000000];var t = r.Items[1.000000];return (new i((new j(s, p)), (new j(t, q))));});}), (new i((new k()), (new k()))), n);});h = (function(Item0,Item1){var p = this;p.Items = [Item0, Item1];});i = (function(Item0,Item1){var p = this;p.Items = [Item0, Item1];});j = (function(Item1,Item2){var p = this;p.Tag = 1.000000;p._CaseName = "Cons";p.Item1 = Item1;p.Item2 = Item2;});k = (function(){var n = this;n.Tag = 0.000000;n._CaseName = "Nil";});l = (function(Item1,Item2){var p = this;p.Tag = 1.000000;p._CaseName = "Cons";p.Item1 = Item1;p.Item2 = Item2;});m = (function(){var n = this;n.Tag = 0.000000;n._CaseName = "Nil";});var n = a((new h(1.000000, 2.000000)), b());var o = g(n);var p = o.Items[1.000000];var q = o.Items[0.000000];return (f(q) + f(p)) | |
***** FunScript.Tests.Lists.List.unzip3 works | |
// Code: | |
var m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(n,o){return (new l(n, o));});b = (function(){return (new m());});c = (function(n,o,p){return d((function(q){return (function(r){return (function(s){return n(r)(s);});});}), o, p);});d = (function(n,o,p){return e(n, 0, o, p);});e = (function(n,o,p,q){if ((q.Tag == 1.000000)) {var r = q.Item2;var s = q.Item1;return e(n, (o + 1), n(o)(p)(s), r);}else{return p;};});f = (function(n){if ((n.Tag == 1.000000)) {var o = n.Item2;var p = n.Item1;return p;}else{throw ("List was empty");return null;};});g = (function(n){return c((function(o){var p = o.Items[0.000000];var q = o.Items[1.000000];var r = o.Items[2.000000];return (function(s){var t = s.Items[0.000000];var u = s.Items[1.000000];var v = s.Items[2.000000];return (new i((new j(t, p)), (new j(u, q)), (new j(v, r))));});}), (new i((new k()), (new k()), (new k()))), n);});h = (function(Item0,Item1,Item2){var q = this;q.Items = [Item0, Item1, Item2];});i = (function(Item0,Item1,Item2){var q = this;q.Items = [Item0, Item1, Item2];});j = (function(Item1,Item2){var p = this;p.Tag = 1.000000;p._CaseName = "Cons";p.Item1 = Item1;p.Item2 = Item2;});k = (function(){var n = this;n.Tag = 0.000000;n._CaseName = "Nil";});l = (function(Item1,Item2){var p = this;p.Tag = 1.000000;p._CaseName = "Cons";p.Item1 = Item1;p.Item2 = Item2;});m = (function(){var n = this;n.Tag = 0.000000;n._CaseName = "Nil";});var n = a((new h(1.000000, 2.000000, 3.000000)), b());var o = g(n);var p = o.Items[1.000000];var q = o.Items[0.000000];var r = o.Items[2.000000];return ((f(q) + f(p)) + f(r)) | |
***** FunScript.Tests.Lists.List.zip works | |
// Code: | |
var r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(s,t){return (new o(s, t));});b = (function(){return (new p());});c = (function(s,t,u){return e((function(v){return (function(w){return (function(x){return s(w)(x);});});}), t, u);});d = (function(s,t,u,v){return f((function(w){return (function(x){return (function(y){return (function(z){return s(x)(y)(z);});});});}), t, u, v);});e = (function(s,t,u){return h(s, 0, t, u);});f = (function(s,t,u,v){return g(s, 0, t, u, v);});g = (function(s,t,u,v,w){var x = (new n(v, w));if ((x.Items[0.000000].Tag == 1.000000)) {if ((x.Items[1.000000].Tag == 1.000000)) {var y = x.Items[0.000000].Item1;var z = x.Items[0.000000].Item2;var A = x.Items[1.000000].Item1;var B = x.Items[1.000000].Item2;return g(s, (t + 1), s(t)(u)(y)(A), z, B);}else{throw ("Lists had different lengths");return null;};}else{if ((x.Items[1.000000].Tag == 0.000000)) {return u;}else{throw ("Lists had different lengths");return null;};};});h = (function(s,t,u,v){if ((v.Tag == 1.000000)) {var w = v.Item2;var x = v.Item1;return h(s, (t + 1), s(t)(u)(x), w);}else{return u;};});i = (function(s){if ((s.Tag == 1.000000)) {var t = s.Item2;var u = s.Item1;return u;}else{throw ("List was empty");return null;};});j = (function(s,t,u){return k(d((function(v){return (function(w){return (function(x){return (new q(s(w)(x), v));});});}), (new r()), t, u));});k = (function(s){return c((function(t){return (function(u){return (new q(u, t));});}), (new r()), s);});l = (function(s,t){return j((function(u){return (function(v){return (new m(u, v));});}), s, t);});m = (function(Item0,Item1){var u = this;u.Items = [Item0, Item1];});n = (function(Item0,Item1){var u = this;u.Items = [Item0, Item1];});o = (function(Item1,Item2){var u = this;u.Tag = 1.000000;u._CaseName = "Cons";u.Item1 = Item1;u.Item2 = Item2;});p = (function(){var s = this;s.Tag = 0.000000;s._CaseName = "Nil";});q = (function(Item1,Item2){var u = this;u.Tag = 1.000000;u._CaseName = "Cons";u.Item1 = Item1;u.Item2 = Item2;});r = (function(){var s = this;s.Tag = 0.000000;s._CaseName = "Nil";});var s = a(1.000000, a(2.000000, a(3.000000, b())));var t = a(1.000000, a(2.000000, a(3.000000, b())));var u = l(s, t);var v = i(u);var w = v.Items[1.000000];var x = v.Items[0.000000];return (x + w) | |
***** FunScript.Tests.Lists.List.zip3 works | |
// Code: | |
var r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(s,t){return (new o(s, t));});b = (function(){return (new p());});c = (function(s,t,u){return e((function(v){return (function(w){return (function(x){return s(w)(x);});});}), t, u);});d = (function(s,t,u,v,w){return f((function(x){return (function(y){return (function(z){return (function(A){return s(y)(z)(A);});});});}), t, u, v, w);});e = (function(s,t,u){return h(s, 0, t, u);});f = (function(s,t,u,v,w){return g(s, 0, t, u, v, w);});g = (function(s,t,u,v,w,x){var y = (new n(v, w, x));if ((y.Items[0.000000].Tag == 1.000000)) {if ((y.Items[1.000000].Tag == 1.000000)) {if ((y.Items[2.000000].Tag == 1.000000)) {var z = y.Items[0.000000].Item1;var A = y.Items[0.000000].Item2;var B = y.Items[1.000000].Item1;var C = y.Items[1.000000].Item2;var D = y.Items[2.000000].Item1;var E = y.Items[2.000000].Item2;return g(s, (t + 1), s(t)(u)(z)(B)(D), A, C, E);}else{throw ("Lists had different lengths");return null;};}else{throw ("Lists had different lengths");return null;};}else{if ((y.Items[1.000000].Tag == 0.000000)) {if ((y.Items[2.000000].Tag == 0.000000)) {return u;}else{throw ("Lists had different lengths");return null;};}else{throw ("Lists had different lengths");return null;};};});h = (function(s,t,u,v){if ((v.Tag == 1.000000)) {var w = v.Item2;var x = v.Item1;return h(s, (t + 1), s(t)(u)(x), w);}else{return u;};});i = (function(s){if ((s.Tag == 1.000000)) {var t = s.Item2;var u = s.Item1;return u;}else{throw ("List was empty");return null;};});j = (function(s,t,u,v){return k(d((function(w){return (function(x){return (function(y){return (function(z){return (new q(s(x)(y)(z), w));});});});}), (new r()), t, u, v));});k = (function(s){return c((function(t){return (function(u){return (new q(u, t));});}), (new r()), s);});l = (function(s,t,u){return j((function(v){return (function(w){return (function(x){return (new m(v, w, x));});});}), s, t, u);});m = (function(Item0,Item1,Item2){var v = this;v.Items = [Item0, Item1, Item2];});n = (function(Item0,Item1,Item2){var v = this;v.Items = [Item0, Item1, Item2];});o = (function(Item1,Item2){var u = this;u.Tag = 1.000000;u._CaseName = "Cons";u.Item1 = Item1;u.Item2 = Item2;});p = (function(){var s = this;s.Tag = 0.000000;s._CaseName = "Nil";});q = (function(Item1,Item2){var u = this;u.Tag = 1.000000;u._CaseName = "Cons";u.Item1 = Item1;u.Item2 = Item2;});r = (function(){var s = this;s.Tag = 0.000000;s._CaseName = "Nil";});var s = a(1.000000, a(2.000000, a(3.000000, b())));var t = a(1.000000, a(2.000000, a(3.000000, b())));var u = a(1.000000, a(2.000000, a(3.000000, b())));var v = l(s, t, u);var w = i(v);var x = w.Items[2.000000];var y = w.Items[1.000000];var z = w.Items[0.000000];return ((z + y) + x) | |
***** FunScript.Tests.Logic.AND is a short circuiting operator | |
// Code: | |
var a = {contents: false};var b = (function(c){a.contents = true;null;return true;});return (a.contents && (function(){var c;return b(c);})()) | |
***** FunScript.Tests.Logic.Evaluation order is preserved by generated code | |
// Code: | |
return ((true && false) && true) | |
***** FunScript.Tests.Logic.Infix AND can be generated | |
// Code: | |
return (true && false) | |
***** FunScript.Tests.Logic.Infix OR can be generated | |
// Code: | |
return (true && false) | |
***** FunScript.Tests.Logic.Not can be generated | |
// Code: | |
return (!false) | |
***** FunScript.Tests.Logic.OR is a short circuiting operator | |
// Code: | |
var a = {contents: true};var b = (function(c){a.contents = false;null;return false;});return (a.contents || (function(){var c;return b(c);})()) | |
***** FunScript.Tests.Maps.Map construction from lists works | |
// Code: | |
var X, W, V, U, T, S, R, Q, P, O, N, M, L, K, J, I, H, G, F, E, D, C, B, A, z, y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(Y){var Z = this;{};Z.factory = Y;});b = (function(Y){var Z = (new d());var _;_ = Z;var ab;ab = Z;return (new c({Compare: (function(bb,cb){return (function(db,bb,cb){return (bb < cb ? -1 : (bb == cb ? 0 : 1));})(_, bb, cb);})}, B({Compare: (function(bb,cb){return (function(db,bb,cb){return (bb < cb ? -1 : (bb == cb ? 0 : 1));})(ab, bb, cb);})}, Y)));});c = (function(Y,Z){var _ = this;{};_.comparer_386 = Y;_.tree_390 = Z;});d = (function(Y){{};});e = (function(Y,Z){var _ = this;{};_.key = Y;_.value = Z;});f = (function(Y,Z){return (new T(Y, Z));});g = (function(Y,Z){return (new V(Y, Z));});h = (function(){return (new U());});i = (function(){return (new W());});j = (function(Y){if ((Y.Tag == 1.000000)) {var Z = Y.Item2;var _ = Y.Item1;return _;}else{throw ("List was empty");return null;};});k = (function(Y){if ((Y.Tag == 1.000000)) {var Z = Y.Item2;var _ = Y.Item1;return _;}else{throw ("List was empty");return null;};});l = (function(Y){return ((Y.Tag == 0.000000) && true);});m = (function(Y){if ((Y.Tag == 1.000000)) {var Z = Y.Item2;var _ = Y.Item1;return Z;}else{throw ("List was empty");return null;};});n = (function(Y){if ((Y.Tag == 1.000000)) {var Z = Y.Item2;var _ = Y.Item1;return Z;}else{throw ("List was empty");return null;};});o = (function(Y,Z){var _ = this;_.stack = Y;_.started = Z;});p = (function(Y,Z,_,ab){if ((ab.Tag == 1.000000)) {var bb = ab.Item1;var cb = Y.Compare(Z, bb);if ((cb < 0)) {return (new E(Z, _, (new D()), ab, 2));}else{if ((cb == 0)) {return (new F(Z, _));}else{return (new E(Z, _, ab, (new D()), 2));};};}else{if ((ab.Tag == 2.000000)) {var db = ab.Item2;var eb = ab.Item4;var fb = ab.Item3;var gb = ab.Item1;var hb = ab.Item5;var ib = Y.Compare(Z, gb);if ((ib < 0)) {return C(p(Y, Z, _, fb), gb, db, eb);}else{if ((ib == 0)) {return (new E(Z, _, fb, eb, hb));}else{return C(fb, gb, db, p(Y, Z, _, eb));};};}else{return (new F(Z, _));};};});q = (function(Y){throw ("enumeration already finished");return null;});r = (function(Y){if ((Y.Tag == 1.000000)) {if ((j(Y).Tag == 1.000000)) {return Y;}else{if ((j(Y).Tag == 2.000000)) {var Z = j(Y).Item1;var _ = j(Y).Item3;var ab = j(Y).Item4;var bb = m(Y);var cb = j(Y).Item2;return r(f(_, f((new F(Z, cb)), f(ab, bb))));}else{var db = m(Y);return r(db);};};}else{return h();};});s = (function(Y){if (Y.started) {var Z = Y.stack;if ((Z.Tag == 0.000000)) {return q();}else{if ((j(Z).Tag == 1.000000)) {var _ = j(Z).Item1;var ab = j(Z).Item2;return (new e(_, ab));}else{throw ("Please report error: Map iterator, unexpected stack for current");return null;};};}else{return A();};});t = (function(){return (new D());});u = (function(Y){if ((Y.Tag == 1.000000)) {return 1;}else{if ((Y.Tag == 2.000000)) {var Z = Y.Item5;return Z;}else{return 0;};};});v = (function(Y,Z,_,ab){var bb = (new Q(Y, ab));if ((bb.Items[0.000000].Tag == 0.000000)) {if ((bb.Items[1.000000].Tag == 0.000000)) {return (new F(Z, _));}else{var cb = u(Y);var db = u(ab);var eb;if ((cb < db)) {eb = db;}else{eb = cb;};var fb = eb;return (new E(Z, _, Y, ab, (fb + 1)));};}else{var gb = u(Y);var hb = u(ab);var ib;if ((gb < hb)) {ib = hb;}else{ib = gb;};var jb = ib;return (new E(Z, _, Y, ab, (jb + 1)));};});w = (function(Y,Z,_){if (_.MoveNext()) {var ab = _.get_Current();var bb = ab.Items[1.000000];var cb = ab.Items[0.000000];return w(Y, p(Y, cb, bb, Z), _);}else{return Z;};});x = (function(Y){var Z;Z = (new X(Y));return {get_Current: (function(_){return (function(ab,_){return s(ab.i.contents);})(Z, _);}), MoveNext: (function(_){return (function(ab,_){return z(ab.i.contents);})(Z, _);}), Reset: (function(_){return (function(ab,_){ab.i.contents = y(ab.s);})(Z, _);}), Dispose: (function(_){return (function(ab,_){;})(Z, _);})};});y = (function(Y){return (new o(r(f(Y, h())), false));});z = (function(Y){if (Y.started) {var Z = Y.stack;if ((Z.Tag == 0.000000)) {return false;}else{if ((j(Z).Tag == 1.000000)) {var _ = m(Z);Y.stack = r(_);null;return (!l(Y.stack));}else{throw ("Please report error: Map iterator, unexpected stack for moveNext");return null;};};}else{Y.started = true;null;return (!l(Y.stack));};});A = (function(Y){throw ("enumeration not started");return null;});B = (function(Y,Z){var _ = Z.GetEnumerator();try{return w(Y, t(), _);}finally{if (false) {_.Dispose();}else{;};};});C = (function(Y,Z,_,ab){var bb = u(Y);var cb = u(ab);if ((cb > (bb + 2))) {if ((ab.Tag == 2.000000)) {var db = ab.Item2;var eb = ab.Item4;var fb = ab.Item3;var gb = ab.Item1;if ((u(fb) > (bb + 1))) {if ((fb.Tag == 2.000000)) {var hb = fb.Item2;var ib = fb.Item4;var jb = fb.Item3;var kb = fb.Item1;return v(v(Y, Z, _, jb), kb, hb, v(ib, gb, db, eb));}else{throw ("rebalance");return null;};}else{return v(v(Y, Z, _, fb), gb, db, eb);};}else{throw ("rebalance");return null;};}else{if ((bb > (cb + 2))) {if ((Y.Tag == 2.000000)) {var lb = Y.Item2;var mb = Y.Item4;var nb = Y.Item3;var ob = Y.Item1;if ((u(mb) > (cb + 1))) {if ((mb.Tag == 2.000000)) {var pb = mb.Item2;var qb = mb.Item4;var rb = mb.Item3;var sb = mb.Item1;return v(v(nb, ob, lb, rb), sb, pb, v(qb, Z, _, ab));}else{throw ("re balance");return null;};}else{return v(nb, ob, lb, v(mb, Z, _, ab));};}else{throw ("rebalance");return null;};}else{return v(Y, Z, _, ab);};};});D = (function(){var Y = this;Y.Tag = 0.000000;Y._CaseName = "MapEmpty";});E = (function(Item1,Item2,Item3,Item4,Item5){var cb = this;cb.Tag = 2.000000;cb._CaseName = "MapNode";cb.Item1 = Item1;cb.Item2 = Item2;cb.Item3 = Item3;cb.Item4 = Item4;cb.Item5 = Item5;});F = (function(Item1,Item2){var _ = this;_.Tag = 1.000000;_._CaseName = "MapOne";_.Item1 = Item1;_.Item2 = Item2;});G = (function(Y){return b(Y);});H = (function(Y){return Y.Value;;});I = (function(Y){return Y.Value;;});J = (function(Y){return ((Y.Tag == 1.000000) && true);});K = (function(Y){return Y.GetEnumerator();});L = (function(Y){var Z;Z = (new a(Y));return {GetEnumerator: (function(_){return (function(ab,_){var bb;return ab.factory(bb);})(Z, _);})};});M = (function(Y){return (!K(Y).MoveNext());});N = (function(Y){return O((function(Z){if ((Z.Tag == 1.000000)) {var _ = n(Z);var ab = k(Z);return {Tag: 1.000000, Value: (new R(ab, _))};}else{return {Tag: 0.000000};};}), Y);});O = (function(Y,Z){return L((function(_){var ab;ab = (new S(Z, Y));return {get_Current: (function(bb){return (function(cb,bb){return cb.current;})(ab, bb);}), MoveNext: (function(bb){return (function(cb,bb){var db = (function(eb){var fb = H(cb.acc);var gb = cb.unfold(fb);if ((gb.Tag == 1.000000)) {var hb = I(gb).Items[0.000000];var ib = I(gb).Items[1.000000];cb.acc = {Tag: 1.000000, Value: ib};cb.current = hb;return true;}else{cb.acc = {Tag: 0.000000};cb.current = null;return false;};});return (J(cb.acc) && (function(){var eb;return db(eb);})());})(ab, bb);}), Reset: (function(bb){return (function(cb,bb){cb.acc = {Tag: 1.000000, Value: cb.seed};cb.current = null;})(ab, bb);}), Dispose: (function(bb){return (function(cb,bb){;})(ab, bb);})};}));});P = (function(Item0,Item1){var _ = this;_.Items = [Item0, Item1];});Q = (function(Item0,Item1){var _ = this;_.Items = [Item0, Item1];});R = (function(Item0,Item1){var _ = this;_.Items = [Item0, Item1];});S = (function(Y,Z){var _ = this;{};_.seed = Y;_.unfold = Z;_.acc = {Tag: 1.000000, Value: _.seed};_.current = null;});T = (function(Item1,Item2){var _ = this;_.Tag = 1.000000;_._CaseName = "Cons";_.Item1 = Item1;_.Item2 = Item2;});U = (function(){var Y = this;Y.Tag = 0.000000;Y._CaseName = "Nil";});V = (function(Item1,Item2){var _ = this;_.Tag = 1.000000;_._CaseName = "Cons";_.Item1 = Item1;_.Item2 = Item2;});W = (function(){var Y = this;Y.Tag = 0.000000;Y._CaseName = "Nil";});X = (function(Y){var Z = this;{};Z.s = Y;Z.i = {contents: y(Z.s)};});var Y = G(N(g((new P(1, 1)), g((new P(2, 2)), i()))));var Z;Z = Y;return M({GetEnumerator: (function(_){return (function(ab,_){return x(ab.tree_390);})(Z, _);})}) | |
***** FunScript.Tests.Maps.Map.add works | |
// Code: | |
var q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(r,s){return j(r.tree_390);});b = (function(r,s,t){return (new c(r.comparer_386, f(r.comparer_386, s, t, r.tree_390)));});c = (function(r,s){var t = this;{};t.comparer_386 = r;t.tree_390 = s;});d = (function(r){var s = (new e());var t;t = s;return (new c({Compare: (function(u,v){return (function(w,u,v){return (u < v ? -1 : (u == v ? 0 : 1));})(t, u, v);})}, (new l())));});e = (function(r){{};});f = (function(r,s,t,u){if ((u.Tag == 1.000000)) {var v = u.Item1;var w = r.Compare(s, v);if ((w < 0)) {return (new m(s, t, (new l()), u, 2));}else{if ((w == 0)) {return (new n(s, t));}else{return (new m(s, t, u, (new l()), 2));};};}else{if ((u.Tag == 2.000000)) {var x = u.Item2;var y = u.Item4;var z = u.Item3;var A = u.Item1;var B = u.Item5;var C = r.Compare(s, A);if ((C < 0)) {return i(f(r, s, t, z), A, x, y);}else{if ((C == 0)) {return (new m(s, t, z, y, B));}else{return i(z, A, x, f(r, s, t, y));};};}else{return (new n(s, t));};};});g = (function(r){if ((r.Tag == 1.000000)) {return 1;}else{if ((r.Tag == 2.000000)) {var s = r.Item5;return s;}else{return 0;};};});h = (function(r,s,t,u){var v = (new q(r, u));if ((v.Items[0.000000].Tag == 0.000000)) {if ((v.Items[1.000000].Tag == 0.000000)) {return (new n(s, t));}else{var w = g(r);var x = g(u);var y;if ((w < x)) {y = x;}else{y = w;};var z = y;return (new m(s, t, r, u, (z + 1)));};}else{var A = g(r);var B = g(u);var C;if ((A < B)) {C = B;}else{C = A;};var D = C;return (new m(s, t, r, u, (D + 1)));};});i = (function(r,s,t,u){var v = g(r);var w = g(u);if ((w > (v + 2))) {if ((u.Tag == 2.000000)) {var x = u.Item2;var y = u.Item4;var z = u.Item3;var A = u.Item1;if ((g(z) > (v + 1))) {if ((z.Tag == 2.000000)) {var B = z.Item2;var C = z.Item4;var D = z.Item3;var E = z.Item1;return h(h(r, s, t, D), E, B, h(C, A, x, y));}else{throw ("rebalance");return null;};}else{return h(h(r, s, t, z), A, x, y);};}else{throw ("rebalance");return null;};}else{if ((v > (w + 2))) {if ((r.Tag == 2.000000)) {var F = r.Item2;var G = r.Item4;var H = r.Item3;var I = r.Item1;if ((g(G) > (w + 1))) {if ((G.Tag == 2.000000)) {var J = G.Item2;var K = G.Item4;var L = G.Item3;var M = G.Item1;return h(h(H, I, F, L), M, J, h(K, s, t, u));}else{throw ("re balance");return null;};}else{return h(H, I, F, h(G, s, t, u));};}else{throw ("rebalance");return null;};}else{return h(r, s, t, u);};};});j = (function(r){return k(0, r);});k = (function(r,s){if ((s.Tag == 1.000000)) {return (r + 1);}else{if ((s.Tag == 2.000000)) {var t = s.Item4;var u = s.Item3;return k(k((r + 1), u), t);}else{return r;};};});l = (function(){var r = this;r.Tag = 0.000000;r._CaseName = "MapEmpty";});m = (function(Item1,Item2,Item3,Item4,Item5){var w = this;w.Tag = 2.000000;w._CaseName = "MapNode";w.Item1 = Item1;w.Item2 = Item2;w.Item3 = Item3;w.Item4 = Item4;w.Item5 = Item5;});n = (function(Item1,Item2){var t = this;t.Tag = 1.000000;t._CaseName = "MapOne";t.Item1 = Item1;t.Item2 = Item2;});o = (function(r,s,t){return b(t, r, s);});p = (function(){return d();});q = (function(Item0,Item1){var t = this;t.Items = [Item0, Item1];});var r = 1;var s = 1;var t = (function(u){return o(r, s, u);})(p());return a(t) | |
***** FunScript.Tests.Maps.Map.Add works | |
// Code: | |
var r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(s,t,u){return (new b(s.comparer_386, g(s.comparer_386, t, u, s.tree_390)));});b = (function(s,t){var u = this;{};u.comparer_386 = s;u.tree_390 = t;});c = (function(s,t){return k(s.tree_390);});d = (function(s,t){var u = this;{};u.comparer_386 = s;u.tree_390 = t;});e = (function(s){var t = (new f());var u;u = t;return (new d({Compare: (function(v,w){return (function(x,v,w){return (v < w ? -1 : (v == w ? 0 : 1));})(u, v, w);})}, (new p())));});f = (function(s){{};});g = (function(s,t,u,v){if ((v.Tag == 1.000000)) {var w = v.Item1;var x = s.Compare(t, w);if ((x < 0)) {return (new n(t, u, (new m()), v, 2));}else{if ((x == 0)) {return (new o(t, u));}else{return (new n(t, u, v, (new m()), 2));};};}else{if ((v.Tag == 2.000000)) {var y = v.Item2;var z = v.Item4;var A = v.Item3;var B = v.Item1;var C = v.Item5;var D = s.Compare(t, B);if ((D < 0)) {return j(g(s, t, u, A), B, y, z);}else{if ((D == 0)) {return (new n(t, u, A, z, C));}else{return j(A, B, y, g(s, t, u, z));};};}else{return (new o(t, u));};};});h = (function(s){if ((s.Tag == 1.000000)) {return 1;}else{if ((s.Tag == 2.000000)) {var t = s.Item5;return t;}else{return 0;};};});i = (function(s,t,u,v){var w = (new r(s, v));if ((w.Items[0.000000].Tag == 0.000000)) {if ((w.Items[1.000000].Tag == 0.000000)) {return (new o(t, u));}else{var x = h(s);var y = h(v);var z;if ((x < y)) {z = y;}else{z = x;};var A = z;return (new n(t, u, s, v, (A + 1)));};}else{var B = h(s);var C = h(v);var D;if ((B < C)) {D = C;}else{D = B;};var E = D;return (new n(t, u, s, v, (E + 1)));};});j = (function(s,t,u,v){var w = h(s);var x = h(v);if ((x > (w + 2))) {if ((v.Tag == 2.000000)) {var y = v.Item2;var z = v.Item4;var A = v.Item3;var B = v.Item1;if ((h(A) > (w + 1))) {if ((A.Tag == 2.000000)) {var C = A.Item2;var D = A.Item4;var E = A.Item3;var F = A.Item1;return i(i(s, t, u, E), F, C, i(D, B, y, z));}else{throw ("rebalance");return null;};}else{return i(i(s, t, u, A), B, y, z);};}else{throw ("rebalance");return null;};}else{if ((w > (x + 2))) {if ((s.Tag == 2.000000)) {var G = s.Item2;var H = s.Item4;var I = s.Item3;var J = s.Item1;if ((h(H) > (x + 1))) {if ((H.Tag == 2.000000)) {var K = H.Item2;var L = H.Item4;var M = H.Item3;var N = H.Item1;return i(i(I, J, G, M), N, K, i(L, t, u, v));}else{throw ("re balance");return null;};}else{return i(I, J, G, i(H, t, u, v));};}else{throw ("rebalance");return null;};}else{return i(s, t, u, v);};};});k = (function(s){return l(0, s);});l = (function(s,t){if ((t.Tag == 1.000000)) {return (s + 1);}else{if ((t.Tag == 2.000000)) {var u = t.Item4;var v = t.Item3;return l(l((s + 1), v), u);}else{return s;};};});m = (function(){var s = this;s.Tag = 0.000000;s._CaseName = "MapEmpty";});n = (function(Item1,Item2,Item3,Item4,Item5){var x = this;x.Tag = 2.000000;x._CaseName = "MapNode";x.Item1 = Item1;x.Item2 = Item2;x.Item3 = Item3;x.Item4 = Item4;x.Item5 = Item5;});o = (function(Item1,Item2){var u = this;u.Tag = 1.000000;u._CaseName = "MapOne";u.Item1 = Item1;u.Item2 = Item2;});p = (function(){var s = this;s.Tag = 0.000000;s._CaseName = "MapEmpty";});q = (function(){return e();});r = (function(Item0,Item1){var u = this;u.Items = [Item0, Item1];});var s = a(q(), 1, 1);return c(s) | |
***** FunScript.Tests.Maps.Map.containsKey works | |
// Code: | |
var q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(r,s,t){return (new c(r.comparer_386, f(r.comparer_386, s, t, r.tree_390)));});b = (function(r,s){return h(r.comparer_386, s, r.tree_390);});c = (function(r,s){var t = this;{};t.comparer_386 = r;t.tree_390 = s;});d = (function(r){var s = (new e());var t;t = s;return (new c({Compare: (function(u,v){return (function(w,u,v){return (u < v ? -1 : (u == v ? 0 : 1));})(t, u, v);})}, (new k())));});e = (function(r){{};});f = (function(r,s,t,u){if ((u.Tag == 1.000000)) {var v = u.Item1;var w = r.Compare(s, v);if ((w < 0)) {return (new l(s, t, (new k()), u, 2));}else{if ((w == 0)) {return (new m(s, t));}else{return (new l(s, t, u, (new k()), 2));};};}else{if ((u.Tag == 2.000000)) {var x = u.Item2;var y = u.Item4;var z = u.Item3;var A = u.Item1;var B = u.Item5;var C = r.Compare(s, A);if ((C < 0)) {return j(f(r, s, t, z), A, x, y);}else{if ((C == 0)) {return (new l(s, t, z, y, B));}else{return j(z, A, x, f(r, s, t, y));};};}else{return (new m(s, t));};};});g = (function(r){if ((r.Tag == 1.000000)) {return 1;}else{if ((r.Tag == 2.000000)) {var s = r.Item5;return s;}else{return 0;};};});h = (function(r,s,t){if ((t.Tag == 1.000000)) {var u = t.Item1;return (r.Compare(s, u) == 0);}else{return ((t.Tag == 2.000000) && (function(){var v = t.Item4;var w = t.Item3;var x = t.Item1;var y = r.Compare(s, x);if ((y < 0)) {return h(r, s, w);}else{return ((y == 0) || h(r, s, v));};})());};});i = (function(r,s,t,u){var v = (new q(r, u));if ((v.Items[0.000000].Tag == 0.000000)) {if ((v.Items[1.000000].Tag == 0.000000)) {return (new m(s, t));}else{var w = g(r);var x = g(u);var y;if ((w < x)) {y = x;}else{y = w;};var z = y;return (new l(s, t, r, u, (z + 1)));};}else{var A = g(r);var B = g(u);var C;if ((A < B)) {C = B;}else{C = A;};var D = C;return (new l(s, t, r, u, (D + 1)));};});j = (function(r,s,t,u){var v = g(r);var w = g(u);if ((w > (v + 2))) {if ((u.Tag == 2.000000)) {var x = u.Item2;var y = u.Item4;var z = u.Item3;var A = u.Item1;if ((g(z) > (v + 1))) {if ((z.Tag == 2.000000)) {var B = z.Item2;var C = z.Item4;var D = z.Item3;var E = z.Item1;return i(i(r, s, t, D), E, B, i(C, A, x, y));}else{throw ("rebalance");return null;};}else{return i(i(r, s, t, z), A, x, y);};}else{throw ("rebalance");return null;};}else{if ((v > (w + 2))) {if ((r.Tag == 2.000000)) {var F = r.Item2;var G = r.Item4;var H = r.Item3;var I = r.Item1;if ((g(G) > (w + 1))) {if ((G.Tag == 2.000000)) {var J = G.Item2;var K = G.Item4;var L = G.Item3;var M = G.Item1;return i(i(H, I, F, L), M, J, i(K, s, t, u));}else{throw ("re balance");return null;};}else{return i(H, I, F, i(G, s, t, u));};}else{throw ("rebalance");return null;};}else{return i(r, s, t, u);};};});k = (function(){var r = this;r.Tag = 0.000000;r._CaseName = "MapEmpty";});l = (function(Item1,Item2,Item3,Item4,Item5){var w = this;w.Tag = 2.000000;w._CaseName = "MapNode";w.Item1 = Item1;w.Item2 = Item2;w.Item3 = Item3;w.Item4 = Item4;w.Item5 = Item5;});m = (function(Item1,Item2){var t = this;t.Tag = 1.000000;t._CaseName = "MapOne";t.Item1 = Item1;t.Item2 = Item2;});n = (function(r,s,t){return a(t, r, s);});o = (function(r,s){return b(s, r);});p = (function(){return d();});q = (function(Item0,Item1){var t = this;t.Items = [Item0, Item1];});var r = 1;var s = 1;var t = (function(u){return n(r, s, u);})(p());return o(1, t) | |
***** FunScript.Tests.Maps.Map.ContainsKey works | |
// Code: | |
var p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(q,r){return h(q.comparer_386, r, q.tree_390);});b = (function(q,r,s){return (new c(q.comparer_386, f(q.comparer_386, r, s, q.tree_390)));});c = (function(q,r){var s = this;{};s.comparer_386 = q;s.tree_390 = r;});d = (function(q){var r = (new e());var s;s = r;return (new c({Compare: (function(t,u){return (function(v,t,u){return (t < u ? -1 : (t == u ? 0 : 1));})(s, t, u);})}, (new k())));});e = (function(q){{};});f = (function(q,r,s,t){if ((t.Tag == 1.000000)) {var u = t.Item1;var v = q.Compare(r, u);if ((v < 0)) {return (new l(r, s, (new k()), t, 2));}else{if ((v == 0)) {return (new m(r, s));}else{return (new l(r, s, t, (new k()), 2));};};}else{if ((t.Tag == 2.000000)) {var w = t.Item2;var x = t.Item4;var y = t.Item3;var z = t.Item1;var A = t.Item5;var B = q.Compare(r, z);if ((B < 0)) {return j(f(q, r, s, y), z, w, x);}else{if ((B == 0)) {return (new l(r, s, y, x, A));}else{return j(y, z, w, f(q, r, s, x));};};}else{return (new m(r, s));};};});g = (function(q){if ((q.Tag == 1.000000)) {return 1;}else{if ((q.Tag == 2.000000)) {var r = q.Item5;return r;}else{return 0;};};});h = (function(q,r,s){if ((s.Tag == 1.000000)) {var t = s.Item1;return (q.Compare(r, t) == 0);}else{return ((s.Tag == 2.000000) && (function(){var u = s.Item4;var v = s.Item3;var w = s.Item1;var x = q.Compare(r, w);if ((x < 0)) {return h(q, r, v);}else{return ((x == 0) || h(q, r, u));};})());};});i = (function(q,r,s,t){var u = (new p(q, t));if ((u.Items[0.000000].Tag == 0.000000)) {if ((u.Items[1.000000].Tag == 0.000000)) {return (new m(r, s));}else{var v = g(q);var w = g(t);var x;if ((v < w)) {x = w;}else{x = v;};var y = x;return (new l(r, s, q, t, (y + 1)));};}else{var z = g(q);var A = g(t);var B;if ((z < A)) {B = A;}else{B = z;};var C = B;return (new l(r, s, q, t, (C + 1)));};});j = (function(q,r,s,t){var u = g(q);var v = g(t);if ((v > (u + 2))) {if ((t.Tag == 2.000000)) {var w = t.Item2;var x = t.Item4;var y = t.Item3;var z = t.Item1;if ((g(y) > (u + 1))) {if ((y.Tag == 2.000000)) {var A = y.Item2;var B = y.Item4;var C = y.Item3;var D = y.Item1;return i(i(q, r, s, C), D, A, i(B, z, w, x));}else{throw ("rebalance");return null;};}else{return i(i(q, r, s, y), z, w, x);};}else{throw ("rebalance");return null;};}else{if ((u > (v + 2))) {if ((q.Tag == 2.000000)) {var E = q.Item2;var F = q.Item4;var G = q.Item3;var H = q.Item1;if ((g(F) > (v + 1))) {if ((F.Tag == 2.000000)) {var I = F.Item2;var J = F.Item4;var K = F.Item3;var L = F.Item1;return i(i(G, H, E, K), L, I, i(J, r, s, t));}else{throw ("re balance");return null;};}else{return i(G, H, E, i(F, r, s, t));};}else{throw ("rebalance");return null;};}else{return i(q, r, s, t);};};});k = (function(){var q = this;q.Tag = 0.000000;q._CaseName = "MapEmpty";});l = (function(Item1,Item2,Item3,Item4,Item5){var v = this;v.Tag = 2.000000;v._CaseName = "MapNode";v.Item1 = Item1;v.Item2 = Item2;v.Item3 = Item3;v.Item4 = Item4;v.Item5 = Item5;});m = (function(Item1,Item2){var s = this;s.Tag = 1.000000;s._CaseName = "MapOne";s.Item1 = Item1;s.Item2 = Item2;});n = (function(q,r,s){return b(s, q, r);});o = (function(){return d();});p = (function(Item0,Item1){var s = this;s.Items = [Item0, Item1];});var q = 1;var r = 1;var s = (function(t){return n(q, r, t);})(o());return a(s, 1) | |
***** FunScript.Tests.Maps.Map.Count works | |
// Code: | |
var h, g, f, e, d, c, b, a;a = (function(i,j){return e(i.tree_390);});b = (function(i,j){var k = this;{};k.comparer_386 = i;k.tree_390 = j;});c = (function(i){var j = (new d());var k;k = j;return (new b({Compare: (function(l,m){return (function(n,l,m){return (l < m ? -1 : (l == m ? 0 : 1));})(k, l, m);})}, (new g())));});d = (function(i){{};});e = (function(i){return f(0, i);});f = (function(i,j){if ((j.Tag == 1.000000)) {return (i + 1);}else{if ((j.Tag == 2.000000)) {var k = j.Item4;var l = j.Item3;return f(f((i + 1), l), k);}else{return i;};};});g = (function(){var i = this;i.Tag = 0.000000;i._CaseName = "MapEmpty";});h = (function(){return c();});var i = h();return a(i) | |
***** FunScript.Tests.Maps.Map.empty works | |
// Code: | |
var e, d, c, b, a;a = (function(f,g){var h = this;{};h.comparer_386 = f;h.tree_390 = g;});b = (function(f){var g = (new c());var h;h = g;return (new a({Compare: (function(i,j){return (function(k,i,j){return (i < j ? -1 : (i == j ? 0 : 1));})(h, i, j);})}, (new d())));});c = (function(f){{};});d = (function(){var f = this;f.Tag = 0.000000;f._CaseName = "MapEmpty";});e = (function(){return b();});var f = e() | |
***** FunScript.Tests.Maps.Map.exists works | |
// Code: | |
var H, G, F, E, D, C, B, A, z, y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(I){var J = this;{};J.factory = I;});b = (function(I){var J = (new e());var K;K = J;var L;L = J;return (new d({Compare: (function(M,N){return (function(O,M,N){return (M < N ? -1 : (M == N ? 0 : 1));})(K, M, N);})}, p({Compare: (function(M,N){return (function(O,M,N){return (M < N ? -1 : (M == N ? 0 : 1));})(L, M, N);})}, I)));});c = (function(I,J){return l(J, I.tree_390);});d = (function(I,J){var K = this;{};K.comparer_386 = I;K.tree_390 = J;});e = (function(I){{};});f = (function(I,J){return (new G(I, J));});g = (function(){return (new H());});h = (function(I){if ((I.Tag == 1.000000)) {var J = I.Item2;var K = I.Item1;return K;}else{throw ("List was empty");return null;};});i = (function(I){if ((I.Tag == 1.000000)) {var J = I.Item2;var K = I.Item1;return J;}else{throw ("List was empty");return null;};});j = (function(I,J,K,L){if ((L.Tag == 1.000000)) {var M = L.Item1;var N = I.Compare(J, M);if ((N < 0)) {return (new s(J, K, (new r()), L, 2));}else{if ((N == 0)) {return (new t(J, K));}else{return (new s(J, K, L, (new r()), 2));};};}else{if ((L.Tag == 2.000000)) {var O = L.Item2;var P = L.Item4;var Q = L.Item3;var R = L.Item1;var S = L.Item5;var T = I.Compare(J, R);if ((T < 0)) {return q(j(I, J, K, Q), R, O, P);}else{if ((T == 0)) {return (new s(J, K, Q, P, S));}else{return q(Q, R, O, j(I, J, K, P));};};}else{return (new t(J, K));};};});k = (function(){return (new r());});l = (function(I,J){if ((J.Tag == 1.000000)) {var K = J.Item2;var L = J.Item1;return I(L)(K);}else{return ((J.Tag == 2.000000) && (function(){var M = J.Item2;var N = J.Item4;var O = J.Item3;var P = J.Item1;return ((l(I, O) || I(P)(M)) || l(I, N));})());};});m = (function(I){if ((I.Tag == 1.000000)) {return 1;}else{if ((I.Tag == 2.000000)) {var J = I.Item5;return J;}else{return 0;};};});n = (function(I,J,K,L){var M = (new D(I, L));if ((M.Items[0.000000].Tag == 0.000000)) {if ((M.Items[1.000000].Tag == 0.000000)) {return (new t(J, K));}else{var N = m(I);var O = m(L);var P;if ((N < O)) {P = O;}else{P = N;};var Q = P;return (new s(J, K, I, L, (Q + 1)));};}else{var R = m(I);var S = m(L);var T;if ((R < S)) {T = S;}else{T = R;};var U = T;return (new s(J, K, I, L, (U + 1)));};});o = (function(I,J,K){if (K.MoveNext()) {var L = K.get_Current();var M = L.Items[1.000000];var N = L.Items[0.000000];return o(I, j(I, N, M, J), K);}else{return J;};});p = (function(I,J){var K = J.GetEnumerator();try{return o(I, k(), K);}finally{if (false) {K.Dispose();}else{;};};});q = (function(I,J,K,L){var M = m(I);var N = m(L);if ((N > (M + 2))) {if ((L.Tag == 2.000000)) {var O = L.Item2;var P = L.Item4;var Q = L.Item3;var R = L.Item1;if ((m(Q) > (M + 1))) {if ((Q.Tag == 2.000000)) {var S = Q.Item2;var T = Q.Item4;var U = Q.Item3;var V = Q.Item1;return n(n(I, J, K, U), V, S, n(T, R, O, P));}else{throw ("rebalance");return null;};}else{return n(n(I, J, K, Q), R, O, P);};}else{throw ("rebalance");return null;};}else{if ((M > (N + 2))) {if ((I.Tag == 2.000000)) {var W = I.Item2;var X = I.Item4;var Y = I.Item3;var Z = I.Item1;if ((m(X) > (N + 1))) {if ((X.Tag == 2.000000)) {var _ = X.Item2;var ab = X.Item4;var bb = X.Item3;var cb = X.Item1;return n(n(Y, Z, W, bb), cb, _, n(ab, J, K, L));}else{throw ("re balance");return null;};}else{return n(Y, Z, W, n(X, J, K, L));};}else{throw ("rebalance");return null;};}else{return n(I, J, K, L);};};});r = (function(){var I = this;I.Tag = 0.000000;I._CaseName = "MapEmpty";});s = (function(Item1,Item2,Item3,Item4,Item5){var N = this;N.Tag = 2.000000;N._CaseName = "MapNode";N.Item1 = Item1;N.Item2 = Item2;N.Item3 = Item3;N.Item4 = Item4;N.Item5 = Item5;});t = (function(Item1,Item2){var K = this;K.Tag = 1.000000;K._CaseName = "MapOne";K.Item1 = Item1;K.Item2 = Item2;});u = (function(I,J){return c(J, I);});v = (function(I){return b(I);});w = (function(I){return I.Value;;});x = (function(I){return I.Value;;});y = (function(I){return ((I.Tag == 1.000000) && true);});z = (function(I){var J;J = (new a(I));return {GetEnumerator: (function(K){return (function(L,K){var M;return L.factory(M);})(J, K);})};});A = (function(I){return B((function(J){if ((J.Tag == 1.000000)) {var K = i(J);var L = h(J);return {Tag: 1.000000, Value: (new E(L, K))};}else{return {Tag: 0.000000};};}), I);});B = (function(I,J){return z((function(K){var L;L = (new F(J, I));return {get_Current: (function(M){return (function(N,M){return N.current;})(L, M);}), MoveNext: (function(M){return (function(N,M){var O = (function(P){var Q = w(N.acc);var R = N.unfold(Q);if ((R.Tag == 1.000000)) {var S = x(R).Items[0.000000];var T = x(R).Items[1.000000];N.acc = {Tag: 1.000000, Value: T};N.current = S;return true;}else{N.acc = {Tag: 0.000000};N.current = null;return false;};});return (y(N.acc) && (function(){var P;return O(P);})());})(L, M);}), Reset: (function(M){return (function(N,M){N.acc = {Tag: 1.000000, Value: N.seed};N.current = null;})(L, M);}), Dispose: (function(M){return (function(N,M){;})(L, M);})};}));});C = (function(Item0,Item1){var K = this;K.Items = [Item0, Item1];});D = (function(Item0,Item1){var K = this;K.Items = [Item0, Item1];});E = (function(Item0,Item1){var K = this;K.Items = [Item0, Item1];});F = (function(I,J){var K = this;{};K.seed = I;K.unfold = J;K.acc = {Tag: 1.000000, Value: K.seed};K.current = null;});G = (function(Item1,Item2){var K = this;K.Tag = 1.000000;K._CaseName = "Cons";K.Item1 = Item1;K.Item2 = Item2;});H = (function(){var I = this;I.Tag = 0.000000;I._CaseName = "Nil";});var I = v(A(f((new C(1, 1.000000)), f((new C(2, 4.000000)), f((new C(3, 9.000000)), f((new C(4, 16.000000)), g()))))));return u((function(J){return (function(K){return (J == 2);});}), I) | |
***** FunScript.Tests.Maps.Map.filter works | |
// Code: | |
var M, L, K, J, I, H, G, F, E, D, C, B, A, z, y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(N){var O = this;{};O.factory = N;});b = (function(N,O){return u(N.tree_390);});c = (function(N){var O = (new f());var P;P = O;var Q;Q = O;return (new e({Compare: (function(R,S){return (function(T,R,S){return (R < S ? -1 : (R == S ? 0 : 1));})(P, R, S);})}, s({Compare: (function(R,S){return (function(T,R,S){return (R < S ? -1 : (R == S ? 0 : 1));})(Q, R, S);})}, N)));});d = (function(N,O){return (new e(N.comparer_386, m(N.comparer_386, O, N.tree_390)));});e = (function(N,O){var P = this;{};P.comparer_386 = N;P.tree_390 = O;});f = (function(N){{};});g = (function(N,O){return (new L(N, O));});h = (function(){return (new M());});i = (function(N){if ((N.Tag == 1.000000)) {var O = N.Item2;var P = N.Item1;return P;}else{throw ("List was empty");return null;};});j = (function(N){if ((N.Tag == 1.000000)) {var O = N.Item2;var P = N.Item1;return O;}else{throw ("List was empty");return null;};});k = (function(N,O,P,Q){if ((Q.Tag == 1.000000)) {var R = Q.Item1;var S = N.Compare(O, R);if ((S < 0)) {return (new x(O, P, (new w()), Q, 2));}else{if ((S == 0)) {return (new y(O, P));}else{return (new x(O, P, Q, (new w()), 2));};};}else{if ((Q.Tag == 2.000000)) {var T = Q.Item2;var U = Q.Item4;var V = Q.Item3;var W = Q.Item1;var X = Q.Item5;var Y = N.Compare(O, W);if ((Y < 0)) {return t(k(N, O, P, V), W, T, U);}else{if ((Y == 0)) {return (new x(O, P, V, U, X));}else{return t(V, W, T, k(N, O, P, U));};};}else{return (new y(O, P));};};});l = (function(){return (new w());});m = (function(N,O,P){return o(N, O, P, l());});n = (function(N,O,P,Q,R){if (O(P)(Q)) {return k(N, P, Q, R);}else{return R;};});o = (function(N,O,P,Q){if ((P.Tag == 1.000000)) {var R = P.Item2;var S = P.Item1;return n(N, O, S, R, Q);}else{if ((P.Tag == 2.000000)) {var T = P.Item2;var U = P.Item4;var V = P.Item3;var W = P.Item1;var X = o(N, O, V, Q);var Y = n(N, O, W, T, X);return o(N, O, U, Y);}else{return Q;};};});p = (function(N){if ((N.Tag == 1.000000)) {return 1;}else{if ((N.Tag == 2.000000)) {var O = N.Item5;return O;}else{return 0;};};});q = (function(N,O,P,Q){var R = (new I(N, Q));if ((R.Items[0.000000].Tag == 0.000000)) {if ((R.Items[1.000000].Tag == 0.000000)) {return (new y(O, P));}else{var S = p(N);var T = p(Q);var U;if ((S < T)) {U = T;}else{U = S;};var V = U;return (new x(O, P, N, Q, (V + 1)));};}else{var W = p(N);var X = p(Q);var Y;if ((W < X)) {Y = X;}else{Y = W;};var Z = Y;return (new x(O, P, N, Q, (Z + 1)));};});r = (function(N,O,P){if (P.MoveNext()) {var Q = P.get_Current();var R = Q.Items[1.000000];var S = Q.Items[0.000000];return r(N, k(N, S, R, O), P);}else{return O;};});s = (function(N,O){var P = O.GetEnumerator();try{return r(N, l(), P);}finally{if (false) {P.Dispose();}else{;};};});t = (function(N,O,P,Q){var R = p(N);var S = p(Q);if ((S > (R + 2))) {if ((Q.Tag == 2.000000)) {var T = Q.Item2;var U = Q.Item4;var V = Q.Item3;var W = Q.Item1;if ((p(V) > (R + 1))) {if ((V.Tag == 2.000000)) {var X = V.Item2;var Y = V.Item4;var Z = V.Item3;var _ = V.Item1;return q(q(N, O, P, Z), _, X, q(Y, W, T, U));}else{throw ("rebalance");return null;};}else{return q(q(N, O, P, V), W, T, U);};}else{throw ("rebalance");return null;};}else{if ((R > (S + 2))) {if ((N.Tag == 2.000000)) {var ab = N.Item2;var bb = N.Item4;var cb = N.Item3;var db = N.Item1;if ((p(bb) > (S + 1))) {if ((bb.Tag == 2.000000)) {var eb = bb.Item2;var fb = bb.Item4;var gb = bb.Item3;var hb = bb.Item1;return q(q(cb, db, ab, gb), hb, eb, q(fb, O, P, Q));}else{throw ("re balance");return null;};}else{return q(cb, db, ab, q(bb, O, P, Q));};}else{throw ("rebalance");return null;};}else{return q(N, O, P, Q);};};});u = (function(N){return v(0, N);});v = (function(N,O){if ((O.Tag == 1.000000)) {return (N + 1);}else{if ((O.Tag == 2.000000)) {var P = O.Item4;var Q = O.Item3;return v(v((N + 1), Q), P);}else{return N;};};});w = (function(){var N = this;N.Tag = 0.000000;N._CaseName = "MapEmpty";});x = (function(Item1,Item2,Item3,Item4,Item5){var S = this;S.Tag = 2.000000;S._CaseName = "MapNode";S.Item1 = Item1;S.Item2 = Item2;S.Item3 = Item3;S.Item4 = Item4;S.Item5 = Item5;});y = (function(Item1,Item2){var P = this;P.Tag = 1.000000;P._CaseName = "MapOne";P.Item1 = Item1;P.Item2 = Item2;});z = (function(N,O){return d(O, N);});A = (function(N){return c(N);});B = (function(N){return N.Value;;});C = (function(N){return N.Value;;});D = (function(N){return ((N.Tag == 1.000000) && true);});E = (function(N){var O;O = (new a(N));return {GetEnumerator: (function(P){return (function(Q,P){var R;return Q.factory(R);})(O, P);})};});F = (function(N){return G((function(O){if ((O.Tag == 1.000000)) {var P = j(O);var Q = i(O);return {Tag: 1.000000, Value: (new J(Q, P))};}else{return {Tag: 0.000000};};}), N);});G = (function(N,O){return E((function(P){var Q;Q = (new K(O, N));return {get_Current: (function(R){return (function(S,R){return S.current;})(Q, R);}), MoveNext: (function(R){return (function(S,R){var T = (function(U){var V = B(S.acc);var W = S.unfold(V);if ((W.Tag == 1.000000)) {var X = C(W).Items[0.000000];var Y = C(W).Items[1.000000];S.acc = {Tag: 1.000000, Value: Y};S.current = X;return true;}else{S.acc = {Tag: 0.000000};S.current = null;return false;};});return (D(S.acc) && (function(){var U;return T(U);})());})(Q, R);}), Reset: (function(R){return (function(S,R){S.acc = {Tag: 1.000000, Value: S.seed};S.current = null;})(Q, R);}), Dispose: (function(R){return (function(S,R){;})(Q, R);})};}));});H = (function(Item0,Item1){var P = this;P.Items = [Item0, Item1];});I = (function(Item0,Item1){var P = this;P.Items = [Item0, Item1];});J = (function(Item0,Item1){var P = this;P.Items = [Item0, Item1];});K = (function(N,O){var P = this;{};P.seed = N;P.unfold = O;P.acc = {Tag: 1.000000, Value: P.seed};P.current = null;});L = (function(Item1,Item2){var P = this;P.Tag = 1.000000;P._CaseName = "Cons";P.Item1 = Item1;P.Item2 = Item2;});M = (function(){var N = this;N.Tag = 0.000000;N._CaseName = "Nil";});var N = A(F(g((new H(1, 1.000000)), g((new H(2, 4.000000)), g((new H(3, 9.000000)), g((new H(4, 16.000000)), h()))))));var O = z((function(P){return (function(Q){return ((P % 2) == 0);});}), N);return b(O) | |
***** FunScript.Tests.Maps.Map.find works | |
// Code: | |
var H, G, F, E, D, C, B, A, z, y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(I){var J = this;{};J.factory = I;});b = (function(I){var J = (new e());var K;K = J;var L;L = J;return (new c({Compare: (function(M,N){return (function(O,M,N){return (M < N ? -1 : (M == N ? 0 : 1));})(K, M, N);})}, p({Compare: (function(M,N){return (function(O,M,N){return (M < N ? -1 : (M == N ? 0 : 1));})(L, M, N);})}, I)));});c = (function(I,J){var K = this;{};K.comparer_386 = I;K.tree_390 = J;});d = (function(I,J){return l(I.comparer_386, J, I.tree_390);});e = (function(I){{};});f = (function(I,J){return (new G(I, J));});g = (function(){return (new H());});h = (function(I){if ((I.Tag == 1.000000)) {var J = I.Item2;var K = I.Item1;return K;}else{throw ("List was empty");return null;};});i = (function(I){if ((I.Tag == 1.000000)) {var J = I.Item2;var K = I.Item1;return J;}else{throw ("List was empty");return null;};});j = (function(I,J,K,L){if ((L.Tag == 1.000000)) {var M = L.Item1;var N = I.Compare(J, M);if ((N < 0)) {return (new s(J, K, (new r()), L, 2));}else{if ((N == 0)) {return (new t(J, K));}else{return (new s(J, K, L, (new r()), 2));};};}else{if ((L.Tag == 2.000000)) {var O = L.Item2;var P = L.Item4;var Q = L.Item3;var R = L.Item1;var S = L.Item5;var T = I.Compare(J, R);if ((T < 0)) {return q(j(I, J, K, Q), R, O, P);}else{if ((T == 0)) {return (new s(J, K, Q, P, S));}else{return q(Q, R, O, j(I, J, K, P));};};}else{return (new t(J, K));};};});k = (function(){return (new r());});l = (function(I,J,K){if ((K.Tag == 1.000000)) {var L = K.Item2;var M = K.Item1;var N = I.Compare(J, M);if ((N == 0)) {return L;}else{throw ("key not found");return null;};}else{if ((K.Tag == 2.000000)) {var O = K.Item2;var P = K.Item4;var Q = K.Item3;var R = K.Item1;var S = I.Compare(J, R);if ((S < 0)) {return l(I, J, Q);}else{if ((S == 0)) {return O;}else{return l(I, J, P);};};}else{throw ("key not found");return null;};};});m = (function(I){if ((I.Tag == 1.000000)) {return 1;}else{if ((I.Tag == 2.000000)) {var J = I.Item5;return J;}else{return 0;};};});n = (function(I,J,K,L){var M = (new D(I, L));if ((M.Items[0.000000].Tag == 0.000000)) {if ((M.Items[1.000000].Tag == 0.000000)) {return (new t(J, K));}else{var N = m(I);var O = m(L);var P;if ((N < O)) {P = O;}else{P = N;};var Q = P;return (new s(J, K, I, L, (Q + 1)));};}else{var R = m(I);var S = m(L);var T;if ((R < S)) {T = S;}else{T = R;};var U = T;return (new s(J, K, I, L, (U + 1)));};});o = (function(I,J,K){if (K.MoveNext()) {var L = K.get_Current();var M = L.Items[1.000000];var N = L.Items[0.000000];return o(I, j(I, N, M, J), K);}else{return J;};});p = (function(I,J){var K = J.GetEnumerator();try{return o(I, k(), K);}finally{if (false) {K.Dispose();}else{;};};});q = (function(I,J,K,L){var M = m(I);var N = m(L);if ((N > (M + 2))) {if ((L.Tag == 2.000000)) {var O = L.Item2;var P = L.Item4;var Q = L.Item3;var R = L.Item1;if ((m(Q) > (M + 1))) {if ((Q.Tag == 2.000000)) {var S = Q.Item2;var T = Q.Item4;var U = Q.Item3;var V = Q.Item1;return n(n(I, J, K, U), V, S, n(T, R, O, P));}else{throw ("rebalance");return null;};}else{return n(n(I, J, K, Q), R, O, P);};}else{throw ("rebalance");return null;};}else{if ((M > (N + 2))) {if ((I.Tag == 2.000000)) {var W = I.Item2;var X = I.Item4;var Y = I.Item3;var Z = I.Item1;if ((m(X) > (N + 1))) {if ((X.Tag == 2.000000)) {var _ = X.Item2;var ab = X.Item4;var bb = X.Item3;var cb = X.Item1;return n(n(Y, Z, W, bb), cb, _, n(ab, J, K, L));}else{throw ("re balance");return null;};}else{return n(Y, Z, W, n(X, J, K, L));};}else{throw ("rebalance");return null;};}else{return n(I, J, K, L);};};});r = (function(){var I = this;I.Tag = 0.000000;I._CaseName = "MapEmpty";});s = (function(Item1,Item2,Item3,Item4,Item5){var N = this;N.Tag = 2.000000;N._CaseName = "MapNode";N.Item1 = Item1;N.Item2 = Item2;N.Item3 = Item3;N.Item4 = Item4;N.Item5 = Item5;});t = (function(Item1,Item2){var K = this;K.Tag = 1.000000;K._CaseName = "MapOne";K.Item1 = Item1;K.Item2 = Item2;});u = (function(I,J){return d(J, I);});v = (function(I){return b(I);});w = (function(I){return I.Value;;});x = (function(I){return I.Value;;});y = (function(I){return ((I.Tag == 1.000000) && true);});z = (function(I){var J;J = (new a(I));return {GetEnumerator: (function(K){return (function(L,K){var M;return L.factory(M);})(J, K);})};});A = (function(I){return B((function(J){if ((J.Tag == 1.000000)) {var K = i(J);var L = h(J);return {Tag: 1.000000, Value: (new E(L, K))};}else{return {Tag: 0.000000};};}), I);});B = (function(I,J){return z((function(K){var L;L = (new F(J, I));return {get_Current: (function(M){return (function(N,M){return N.current;})(L, M);}), MoveNext: (function(M){return (function(N,M){var O = (function(P){var Q = w(N.acc);var R = N.unfold(Q);if ((R.Tag == 1.000000)) {var S = x(R).Items[0.000000];var T = x(R).Items[1.000000];N.acc = {Tag: 1.000000, Value: T};N.current = S;return true;}else{N.acc = {Tag: 0.000000};N.current = null;return false;};});return (y(N.acc) && (function(){var P;return O(P);})());})(L, M);}), Reset: (function(M){return (function(N,M){N.acc = {Tag: 1.000000, Value: N.seed};N.current = null;})(L, M);}), Dispose: (function(M){return (function(N,M){;})(L, M);})};}));});C = (function(Item0,Item1){var K = this;K.Items = [Item0, Item1];});D = (function(Item0,Item1){var K = this;K.Items = [Item0, Item1];});E = (function(Item0,Item1){var K = this;K.Items = [Item0, Item1];});F = (function(I,J){var K = this;{};K.seed = I;K.unfold = J;K.acc = {Tag: 1.000000, Value: K.seed};K.current = null;});G = (function(Item1,Item2){var K = this;K.Tag = 1.000000;K._CaseName = "Cons";K.Item1 = Item1;K.Item2 = Item2;});H = (function(){var I = this;I.Tag = 0.000000;I._CaseName = "Nil";});var I = v(A(f((new C(1, 1.000000)), f((new C(2, 4.000000)), f((new C(3, 9.000000)), f((new C(4, 16.000000)), g()))))));return u(1, I) | |
***** FunScript.Tests.Maps.Map.fold works | |
// Code: | |
var H, G, F, E, D, C, B, A, z, y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(I){var J = this;{};J.factory = I;});b = (function(I){var J = (new e());var K;K = J;var L;L = J;return (new c({Compare: (function(M,N){return (function(O,M,N){return (M < N ? -1 : (M == N ? 0 : 1));})(K, M, N);})}, p({Compare: (function(M,N){return (function(O,M,N){return (M < N ? -1 : (M == N ? 0 : 1));})(L, M, N);})}, I)));});c = (function(I,J){var K = this;{};K.comparer_386 = I;K.tree_390 = J;});d = (function(I,J){return I.tree_390;});e = (function(I){{};});f = (function(I,J){return (new G(I, J));});g = (function(){return (new H());});h = (function(I){if ((I.Tag == 1.000000)) {var J = I.Item2;var K = I.Item1;return K;}else{throw ("List was empty");return null;};});i = (function(I){if ((I.Tag == 1.000000)) {var J = I.Item2;var K = I.Item1;return J;}else{throw ("List was empty");return null;};});j = (function(I,J,K,L){if ((L.Tag == 1.000000)) {var M = L.Item1;var N = I.Compare(J, M);if ((N < 0)) {return (new s(J, K, (new r()), L, 2));}else{if ((N == 0)) {return (new t(J, K));}else{return (new s(J, K, L, (new r()), 2));};};}else{if ((L.Tag == 2.000000)) {var O = L.Item2;var P = L.Item4;var Q = L.Item3;var R = L.Item1;var S = L.Item5;var T = I.Compare(J, R);if ((T < 0)) {return q(j(I, J, K, Q), R, O, P);}else{if ((T == 0)) {return (new s(J, K, Q, P, S));}else{return q(Q, R, O, j(I, J, K, P));};};}else{return (new t(J, K));};};});k = (function(){return (new r());});l = (function(I,J,K){if ((K.Tag == 1.000000)) {var L = K.Item2;var M = K.Item1;return I(J)(M)(L);}else{if ((K.Tag == 2.000000)) {var N = K.Item2;var O = K.Item4;var P = K.Item3;var Q = K.Item1;var R = l(I, J, P);var S = I(R)(Q)(N);return l(I, S, O);}else{return J;};};});m = (function(I){if ((I.Tag == 1.000000)) {return 1;}else{if ((I.Tag == 2.000000)) {var J = I.Item5;return J;}else{return 0;};};});n = (function(I,J,K,L){var M = (new D(I, L));if ((M.Items[0.000000].Tag == 0.000000)) {if ((M.Items[1.000000].Tag == 0.000000)) {return (new t(J, K));}else{var N = m(I);var O = m(L);var P;if ((N < O)) {P = O;}else{P = N;};var Q = P;return (new s(J, K, I, L, (Q + 1)));};}else{var R = m(I);var S = m(L);var T;if ((R < S)) {T = S;}else{T = R;};var U = T;return (new s(J, K, I, L, (U + 1)));};});o = (function(I,J,K){if (K.MoveNext()) {var L = K.get_Current();var M = L.Items[1.000000];var N = L.Items[0.000000];return o(I, j(I, N, M, J), K);}else{return J;};});p = (function(I,J){var K = J.GetEnumerator();try{return o(I, k(), K);}finally{if (false) {K.Dispose();}else{;};};});q = (function(I,J,K,L){var M = m(I);var N = m(L);if ((N > (M + 2))) {if ((L.Tag == 2.000000)) {var O = L.Item2;var P = L.Item4;var Q = L.Item3;var R = L.Item1;if ((m(Q) > (M + 1))) {if ((Q.Tag == 2.000000)) {var S = Q.Item2;var T = Q.Item4;var U = Q.Item3;var V = Q.Item1;return n(n(I, J, K, U), V, S, n(T, R, O, P));}else{throw ("rebalance");return null;};}else{return n(n(I, J, K, Q), R, O, P);};}else{throw ("rebalance");return null;};}else{if ((M > (N + 2))) {if ((I.Tag == 2.000000)) {var W = I.Item2;var X = I.Item4;var Y = I.Item3;var Z = I.Item1;if ((m(X) > (N + 1))) {if ((X.Tag == 2.000000)) {var _ = X.Item2;var ab = X.Item4;var bb = X.Item3;var cb = X.Item1;return n(n(Y, Z, W, bb), cb, _, n(ab, J, K, L));}else{throw ("re balance");return null;};}else{return n(Y, Z, W, n(X, J, K, L));};}else{throw ("rebalance");return null;};}else{return n(I, J, K, L);};};});r = (function(){var I = this;I.Tag = 0.000000;I._CaseName = "MapEmpty";});s = (function(Item1,Item2,Item3,Item4,Item5){var N = this;N.Tag = 2.000000;N._CaseName = "MapNode";N.Item1 = Item1;N.Item2 = Item2;N.Item3 = Item3;N.Item4 = Item4;N.Item5 = Item5;});t = (function(Item1,Item2){var K = this;K.Tag = 1.000000;K._CaseName = "MapOne";K.Item1 = Item1;K.Item2 = Item2;});u = (function(I,J,K){var L = I;return l(L, J, d(K));});v = (function(I){return b(I);});w = (function(I){return I.Value;;});x = (function(I){return I.Value;;});y = (function(I){return ((I.Tag == 1.000000) && true);});z = (function(I){var J;J = (new a(I));return {GetEnumerator: (function(K){return (function(L,K){var M;return L.factory(M);})(J, K);})};});A = (function(I){return B((function(J){if ((J.Tag == 1.000000)) {var K = i(J);var L = h(J);return {Tag: 1.000000, Value: (new E(L, K))};}else{return {Tag: 0.000000};};}), I);});B = (function(I,J){return z((function(K){var L;L = (new F(J, I));return {get_Current: (function(M){return (function(N,M){return N.current;})(L, M);}), MoveNext: (function(M){return (function(N,M){var O = (function(P){var Q = w(N.acc);var R = N.unfold(Q);if ((R.Tag == 1.000000)) {var S = x(R).Items[0.000000];var T = x(R).Items[1.000000];N.acc = {Tag: 1.000000, Value: T};N.current = S;return true;}else{N.acc = {Tag: 0.000000};N.current = null;return false;};});return (y(N.acc) && (function(){var P;return O(P);})());})(L, M);}), Reset: (function(M){return (function(N,M){N.acc = {Tag: 1.000000, Value: N.seed};N.current = null;})(L, M);}), Dispose: (function(M){return (function(N,M){;})(L, M);})};}));});C = (function(Item0,Item1){var K = this;K.Items = [Item0, Item1];});D = (function(Item0,Item1){var K = this;K.Items = [Item0, Item1];});E = (function(Item0,Item1){var K = this;K.Items = [Item0, Item1];});F = (function(I,J){var K = this;{};K.seed = I;K.unfold = J;K.acc = {Tag: 1.000000, Value: K.seed};K.current = null;});G = (function(Item1,Item2){var K = this;K.Tag = 1.000000;K._CaseName = "Cons";K.Item1 = Item1;K.Item2 = Item2;});H = (function(){var I = this;I.Tag = 0.000000;I._CaseName = "Nil";});var I = v(A(f((new C(1, 1.000000)), f((new C(2, 4.000000)), f((new C(3, 9.000000)), f((new C(4, 16.000000)), g()))))));var J = (function(K){return (function(L){return (function(M){return (M + K);});});});var K = 0.000000;return (function(L){return u(J, K, L);})(I) | |
***** FunScript.Tests.Maps.Map.foldBack works | |
// Code: | |
var H, G, F, E, D, C, B, A, z, y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(I){var J = this;{};J.factory = I;});b = (function(I){var J = (new e());var K;K = J;var L;L = J;return (new c({Compare: (function(M,N){return (function(O,M,N){return (M < N ? -1 : (M == N ? 0 : 1));})(K, M, N);})}, p({Compare: (function(M,N){return (function(O,M,N){return (M < N ? -1 : (M == N ? 0 : 1));})(L, M, N);})}, I)));});c = (function(I,J){var K = this;{};K.comparer_386 = I;K.tree_390 = J;});d = (function(I,J){return I.tree_390;});e = (function(I){{};});f = (function(I,J){return (new G(I, J));});g = (function(){return (new H());});h = (function(I){if ((I.Tag == 1.000000)) {var J = I.Item2;var K = I.Item1;return K;}else{throw ("List was empty");return null;};});i = (function(I){if ((I.Tag == 1.000000)) {var J = I.Item2;var K = I.Item1;return J;}else{throw ("List was empty");return null;};});j = (function(I,J,K,L){if ((L.Tag == 1.000000)) {var M = L.Item1;var N = I.Compare(J, M);if ((N < 0)) {return (new s(J, K, (new r()), L, 2));}else{if ((N == 0)) {return (new t(J, K));}else{return (new s(J, K, L, (new r()), 2));};};}else{if ((L.Tag == 2.000000)) {var O = L.Item2;var P = L.Item4;var Q = L.Item3;var R = L.Item1;var S = L.Item5;var T = I.Compare(J, R);if ((T < 0)) {return q(j(I, J, K, Q), R, O, P);}else{if ((T == 0)) {return (new s(J, K, Q, P, S));}else{return q(Q, R, O, j(I, J, K, P));};};}else{return (new t(J, K));};};});k = (function(){return (new r());});l = (function(I,J,K){if ((J.Tag == 1.000000)) {var L = J.Item2;var M = J.Item1;return I(M)(L)(K);}else{if ((J.Tag == 2.000000)) {var N = J.Item2;var O = J.Item4;var P = J.Item3;var Q = J.Item1;var R = l(I, O, K);var S = I(Q)(N)(R);return l(I, P, S);}else{return K;};};});m = (function(I){if ((I.Tag == 1.000000)) {return 1;}else{if ((I.Tag == 2.000000)) {var J = I.Item5;return J;}else{return 0;};};});n = (function(I,J,K,L){var M = (new D(I, L));if ((M.Items[0.000000].Tag == 0.000000)) {if ((M.Items[1.000000].Tag == 0.000000)) {return (new t(J, K));}else{var N = m(I);var O = m(L);var P;if ((N < O)) {P = O;}else{P = N;};var Q = P;return (new s(J, K, I, L, (Q + 1)));};}else{var R = m(I);var S = m(L);var T;if ((R < S)) {T = S;}else{T = R;};var U = T;return (new s(J, K, I, L, (U + 1)));};});o = (function(I,J,K){if (K.MoveNext()) {var L = K.get_Current();var M = L.Items[1.000000];var N = L.Items[0.000000];return o(I, j(I, N, M, J), K);}else{return J;};});p = (function(I,J){var K = J.GetEnumerator();try{return o(I, k(), K);}finally{if (false) {K.Dispose();}else{;};};});q = (function(I,J,K,L){var M = m(I);var N = m(L);if ((N > (M + 2))) {if ((L.Tag == 2.000000)) {var O = L.Item2;var P = L.Item4;var Q = L.Item3;var R = L.Item1;if ((m(Q) > (M + 1))) {if ((Q.Tag == 2.000000)) {var S = Q.Item2;var T = Q.Item4;var U = Q.Item3;var V = Q.Item1;return n(n(I, J, K, U), V, S, n(T, R, O, P));}else{throw ("rebalance");return null;};}else{return n(n(I, J, K, Q), R, O, P);};}else{throw ("rebalance");return null;};}else{if ((M > (N + 2))) {if ((I.Tag == 2.000000)) {var W = I.Item2;var X = I.Item4;var Y = I.Item3;var Z = I.Item1;if ((m(X) > (N + 1))) {if ((X.Tag == 2.000000)) {var _ = X.Item2;var ab = X.Item4;var bb = X.Item3;var cb = X.Item1;return n(n(Y, Z, W, bb), cb, _, n(ab, J, K, L));}else{throw ("re balance");return null;};}else{return n(Y, Z, W, n(X, J, K, L));};}else{throw ("rebalance");return null;};}else{return n(I, J, K, L);};};});r = (function(){var I = this;I.Tag = 0.000000;I._CaseName = "MapEmpty";});s = (function(Item1,Item2,Item3,Item4,Item5){var N = this;N.Tag = 2.000000;N._CaseName = "MapNode";N.Item1 = Item1;N.Item2 = Item2;N.Item3 = Item3;N.Item4 = Item4;N.Item5 = Item5;});t = (function(Item1,Item2){var K = this;K.Tag = 1.000000;K._CaseName = "MapOne";K.Item1 = Item1;K.Item2 = Item2;});u = (function(I,J,K){var L = I;return l(L, d(J), K);});v = (function(I){return b(I);});w = (function(I){return I.Value;;});x = (function(I){return I.Value;;});y = (function(I){return ((I.Tag == 1.000000) && true);});z = (function(I){var J;J = (new a(I));return {GetEnumerator: (function(K){return (function(L,K){var M;return L.factory(M);})(J, K);})};});A = (function(I){return B((function(J){if ((J.Tag == 1.000000)) {var K = i(J);var L = h(J);return {Tag: 1.000000, Value: (new E(L, K))};}else{return {Tag: 0.000000};};}), I);});B = (function(I,J){return z((function(K){var L;L = (new F(J, I));return {get_Current: (function(M){return (function(N,M){return N.current;})(L, M);}), MoveNext: (function(M){return (function(N,M){var O = (function(P){var Q = w(N.acc);var R = N.unfold(Q);if ((R.Tag == 1.000000)) {var S = x(R).Items[0.000000];var T = x(R).Items[1.000000];N.acc = {Tag: 1.000000, Value: T};N.current = S;return true;}else{N.acc = {Tag: 0.000000};N.current = null;return false;};});return (y(N.acc) && (function(){var P;return O(P);})());})(L, M);}), Reset: (function(M){return (function(N,M){N.acc = {Tag: 1.000000, Value: N.seed};N.current = null;})(L, M);}), Dispose: (function(M){return (function(N,M){;})(L, M);})};}));});C = (function(Item0,Item1){var K = this;K.Items = [Item0, Item1];});D = (function(Item0,Item1){var K = this;K.Items = [Item0, Item1];});E = (function(Item0,Item1){var K = this;K.Items = [Item0, Item1];});F = (function(I,J){var K = this;{};K.seed = I;K.unfold = J;K.acc = {Tag: 1.000000, Value: K.seed};K.current = null;});G = (function(Item1,Item2){var K = this;K.Tag = 1.000000;K._CaseName = "Cons";K.Item1 = Item1;K.Item2 = Item2;});H = (function(){var I = this;I.Tag = 0.000000;I._CaseName = "Nil";});var I = v(A(f((new C(1, 1.000000)), f((new C(2, 4.000000)), f((new C(3, 9.000000)), f((new C(4, 16.000000)), g()))))));return u((function(J){return (function(K){return (function(L){return (K + L);});});}), I, 0.000000) | |
***** FunScript.Tests.Maps.Map.forAll works | |
// Code: | |
var H, G, F, E, D, C, B, A, z, y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(I){var J = this;{};J.factory = I;});b = (function(I){var J = (new e());var K;K = J;var L;L = J;return (new d({Compare: (function(M,N){return (function(O,M,N){return (M < N ? -1 : (M == N ? 0 : 1));})(K, M, N);})}, p({Compare: (function(M,N){return (function(O,M,N){return (M < N ? -1 : (M == N ? 0 : 1));})(L, M, N);})}, I)));});c = (function(I,J){return l(J, I.tree_390);});d = (function(I,J){var K = this;{};K.comparer_386 = I;K.tree_390 = J;});e = (function(I){{};});f = (function(I,J){return (new G(I, J));});g = (function(){return (new H());});h = (function(I){if ((I.Tag == 1.000000)) {var J = I.Item2;var K = I.Item1;return K;}else{throw ("List was empty");return null;};});i = (function(I){if ((I.Tag == 1.000000)) {var J = I.Item2;var K = I.Item1;return J;}else{throw ("List was empty");return null;};});j = (function(I,J,K,L){if ((L.Tag == 1.000000)) {var M = L.Item1;var N = I.Compare(J, M);if ((N < 0)) {return (new s(J, K, (new r()), L, 2));}else{if ((N == 0)) {return (new t(J, K));}else{return (new s(J, K, L, (new r()), 2));};};}else{if ((L.Tag == 2.000000)) {var O = L.Item2;var P = L.Item4;var Q = L.Item3;var R = L.Item1;var S = L.Item5;var T = I.Compare(J, R);if ((T < 0)) {return q(j(I, J, K, Q), R, O, P);}else{if ((T == 0)) {return (new s(J, K, Q, P, S));}else{return q(Q, R, O, j(I, J, K, P));};};}else{return (new t(J, K));};};});k = (function(){return (new r());});l = (function(I,J){if ((J.Tag == 1.000000)) {var K = J.Item2;var L = J.Item1;return I(L)(K);}else{if ((J.Tag == 2.000000)) {var M = J.Item2;var N = J.Item4;var O = J.Item3;var P = J.Item1;return ((l(I, O) && I(P)(M)) && l(I, N));}else{return true;};};});m = (function(I){if ((I.Tag == 1.000000)) {return 1;}else{if ((I.Tag == 2.000000)) {var J = I.Item5;return J;}else{return 0;};};});n = (function(I,J,K,L){var M = (new D(I, L));if ((M.Items[0.000000].Tag == 0.000000)) {if ((M.Items[1.000000].Tag == 0.000000)) {return (new t(J, K));}else{var N = m(I);var O = m(L);var P;if ((N < O)) {P = O;}else{P = N;};var Q = P;return (new s(J, K, I, L, (Q + 1)));};}else{var R = m(I);var S = m(L);var T;if ((R < S)) {T = S;}else{T = R;};var U = T;return (new s(J, K, I, L, (U + 1)));};});o = (function(I,J,K){if (K.MoveNext()) {var L = K.get_Current();var M = L.Items[1.000000];var N = L.Items[0.000000];return o(I, j(I, N, M, J), K);}else{return J;};});p = (function(I,J){var K = J.GetEnumerator();try{return o(I, k(), K);}finally{if (false) {K.Dispose();}else{;};};});q = (function(I,J,K,L){var M = m(I);var N = m(L);if ((N > (M + 2))) {if ((L.Tag == 2.000000)) {var O = L.Item2;var P = L.Item4;var Q = L.Item3;var R = L.Item1;if ((m(Q) > (M + 1))) {if ((Q.Tag == 2.000000)) {var S = Q.Item2;var T = Q.Item4;var U = Q.Item3;var V = Q.Item1;return n(n(I, J, K, U), V, S, n(T, R, O, P));}else{throw ("rebalance");return null;};}else{return n(n(I, J, K, Q), R, O, P);};}else{throw ("rebalance");return null;};}else{if ((M > (N + 2))) {if ((I.Tag == 2.000000)) {var W = I.Item2;var X = I.Item4;var Y = I.Item3;var Z = I.Item1;if ((m(X) > (N + 1))) {if ((X.Tag == 2.000000)) {var _ = X.Item2;var ab = X.Item4;var bb = X.Item3;var cb = X.Item1;return n(n(Y, Z, W, bb), cb, _, n(ab, J, K, L));}else{throw ("re balance");return null;};}else{return n(Y, Z, W, n(X, J, K, L));};}else{throw ("rebalance");return null;};}else{return n(I, J, K, L);};};});r = (function(){var I = this;I.Tag = 0.000000;I._CaseName = "MapEmpty";});s = (function(Item1,Item2,Item3,Item4,Item5){var N = this;N.Tag = 2.000000;N._CaseName = "MapNode";N.Item1 = Item1;N.Item2 = Item2;N.Item3 = Item3;N.Item4 = Item4;N.Item5 = Item5;});t = (function(Item1,Item2){var K = this;K.Tag = 1.000000;K._CaseName = "MapOne";K.Item1 = Item1;K.Item2 = Item2;});u = (function(I,J){return c(J, I);});v = (function(I){return b(I);});w = (function(I){return I.Value;;});x = (function(I){return I.Value;;});y = (function(I){return ((I.Tag == 1.000000) && true);});z = (function(I){var J;J = (new a(I));return {GetEnumerator: (function(K){return (function(L,K){var M;return L.factory(M);})(J, K);})};});A = (function(I){return B((function(J){if ((J.Tag == 1.000000)) {var K = i(J);var L = h(J);return {Tag: 1.000000, Value: (new E(L, K))};}else{return {Tag: 0.000000};};}), I);});B = (function(I,J){return z((function(K){var L;L = (new F(J, I));return {get_Current: (function(M){return (function(N,M){return N.current;})(L, M);}), MoveNext: (function(M){return (function(N,M){var O = (function(P){var Q = w(N.acc);var R = N.unfold(Q);if ((R.Tag == 1.000000)) {var S = x(R).Items[0.000000];var T = x(R).Items[1.000000];N.acc = {Tag: 1.000000, Value: T};N.current = S;return true;}else{N.acc = {Tag: 0.000000};N.current = null;return false;};});return (y(N.acc) && (function(){var P;return O(P);})());})(L, M);}), Reset: (function(M){return (function(N,M){N.acc = {Tag: 1.000000, Value: N.seed};N.current = null;})(L, M);}), Dispose: (function(M){return (function(N,M){;})(L, M);})};}));});C = (function(Item0,Item1){var K = this;K.Items = [Item0, Item1];});D = (function(Item0,Item1){var K = this;K.Items = [Item0, Item1];});E = (function(Item0,Item1){var K = this;K.Items = [Item0, Item1];});F = (function(I,J){var K = this;{};K.seed = I;K.unfold = J;K.acc = {Tag: 1.000000, Value: K.seed};K.current = null;});G = (function(Item1,Item2){var K = this;K.Tag = 1.000000;K._CaseName = "Cons";K.Item1 = Item1;K.Item2 = Item2;});H = (function(){var I = this;I.Tag = 0.000000;I._CaseName = "Nil";});var I = v(A(f((new C(1.000000, 1.000000)), f((new C(2.000000, 4.000000)), f((new C(3.000000, 9.000000)), f((new C(4.000000, 16.000000)), g()))))));return u((function(J){return (function(K){return (J < 5.000000);});}), I) | |
***** FunScript.Tests.Maps.Map.isEmpty works | |
// Code: | |
var y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(z,A){var B = this;{};B.comparer_386 = z;B.tree_390 = A;});b = (function(z){var A = (new c());var B;B = A;return (new a({Compare: (function(C,D){return (function(E,C,D){return (C < D ? -1 : (C == D ? 0 : 1));})(B, C, D);})}, (new r())));});c = (function(z){{};});d = (function(z,A){var B = this;{};B.key = z;B.value = A;});e = (function(z,A){return (new w(z, A));});f = (function(){return (new x());});g = (function(z){if ((z.Tag == 1.000000)) {var A = z.Item2;var B = z.Item1;return B;}else{throw ("List was empty");return null;};});h = (function(z){return ((z.Tag == 0.000000) && true);});i = (function(z){if ((z.Tag == 1.000000)) {var A = z.Item2;var B = z.Item1;return A;}else{throw ("List was empty");return null;};});j = (function(z,A){var B = this;B.stack = z;B.started = A;});k = (function(z){throw ("enumeration already finished");return null;});l = (function(z){if ((z.Tag == 1.000000)) {if ((g(z).Tag == 1.000000)) {return z;}else{if ((g(z).Tag == 2.000000)) {var A = g(z).Item1;var B = g(z).Item3;var C = g(z).Item4;var D = i(z);var E = g(z).Item2;return l(e(B, e((new s(A, E)), e(C, D))));}else{var F = i(z);return l(F);};};}else{return f();};});m = (function(z){if (z.started) {var A = z.stack;if ((A.Tag == 0.000000)) {return k();}else{if ((g(A).Tag == 1.000000)) {var B = g(A).Item1;var C = g(A).Item2;return (new d(B, C));}else{throw ("Please report error: Map iterator, unexpected stack for current");return null;};};}else{return q();};});n = (function(z){var A;A = (new y(z));return {get_Current: (function(B){return (function(C,B){return m(C.i.contents);})(A, B);}), MoveNext: (function(B){return (function(C,B){return p(C.i.contents);})(A, B);}), Reset: (function(B){return (function(C,B){C.i.contents = o(C.s);})(A, B);}), Dispose: (function(B){return (function(C,B){;})(A, B);})};});o = (function(z){return (new j(l(e(z, f())), false));});p = (function(z){if (z.started) {var A = z.stack;if ((A.Tag == 0.000000)) {return false;}else{if ((g(A).Tag == 1.000000)) {var B = i(A);z.stack = l(B);null;return (!h(z.stack));}else{throw ("Please report error: Map iterator, unexpected stack for moveNext");return null;};};}else{z.started = true;null;return (!h(z.stack));};});q = (function(z){throw ("enumeration not started");return null;});r = (function(){var z = this;z.Tag = 0.000000;z._CaseName = "MapEmpty";});s = (function(Item1,Item2){var B = this;B.Tag = 1.000000;B._CaseName = "MapOne";B.Item1 = Item1;B.Item2 = Item2;});t = (function(){return b();});u = (function(z){return z.GetEnumerator();});v = (function(z){return (!u(z).MoveNext());});w = (function(Item1,Item2){var B = this;B.Tag = 1.000000;B._CaseName = "Cons";B.Item1 = Item1;B.Item2 = Item2;});x = (function(){var z = this;z.Tag = 0.000000;z._CaseName = "Nil";});y = (function(z){var A = this;{};A.s = z;A.i = {contents: o(A.s)};});var z = t();var A;A = z;return v({GetEnumerator: (function(B){return (function(C,B){return n(C.tree_390);})(A, B);})}) | |
***** FunScript.Tests.Maps.Map.IsEmpty works | |
// Code: | |
var g, f, e, d, c, b, a;a = (function(h,i){return e(h.tree_390);});b = (function(h,i){var j = this;{};j.comparer_386 = h;j.tree_390 = i;});c = (function(h){var i = (new d());var j;j = i;return (new b({Compare: (function(k,l){return (function(m,k,l){return (k < l ? -1 : (k == l ? 0 : 1));})(j, k, l);})}, (new f())));});d = (function(h){{};});e = (function(h){return ((h.Tag == 0.000000) && true);});f = (function(){var h = this;h.Tag = 0.000000;h._CaseName = "MapEmpty";});g = (function(){return c();});var h = g();return a(h) | |
***** FunScript.Tests.Maps.Map.iter works | |
// Code: | |
var H, G, F, E, D, C, B, A, z, y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(I){var J = this;{};J.factory = I;});b = (function(I){var J = (new e());var K;K = J;var L;L = J;return (new d({Compare: (function(M,N){return (function(O,M,N){return (M < N ? -1 : (M == N ? 0 : 1));})(K, M, N);})}, p({Compare: (function(M,N){return (function(O,M,N){return (M < N ? -1 : (M == N ? 0 : 1));})(L, M, N);})}, I)));});c = (function(I,J){return m(J, I.tree_390);});d = (function(I,J){var K = this;{};K.comparer_386 = I;K.tree_390 = J;});e = (function(I){{};});f = (function(I,J){return (new G(I, J));});g = (function(){return (new H());});h = (function(I){if ((I.Tag == 1.000000)) {var J = I.Item2;var K = I.Item1;return K;}else{throw ("List was empty");return null;};});i = (function(I){if ((I.Tag == 1.000000)) {var J = I.Item2;var K = I.Item1;return J;}else{throw ("List was empty");return null;};});j = (function(I,J,K,L){if ((L.Tag == 1.000000)) {var M = L.Item1;var N = I.Compare(J, M);if ((N < 0)) {return (new s(J, K, (new r()), L, 2));}else{if ((N == 0)) {return (new t(J, K));}else{return (new s(J, K, L, (new r()), 2));};};}else{if ((L.Tag == 2.000000)) {var O = L.Item2;var P = L.Item4;var Q = L.Item3;var R = L.Item1;var S = L.Item5;var T = I.Compare(J, R);if ((T < 0)) {return q(j(I, J, K, Q), R, O, P);}else{if ((T == 0)) {return (new s(J, K, Q, P, S));}else{return q(Q, R, O, j(I, J, K, P));};};}else{return (new t(J, K));};};});k = (function(){return (new r());});l = (function(I){if ((I.Tag == 1.000000)) {return 1;}else{if ((I.Tag == 2.000000)) {var J = I.Item5;return J;}else{return 0;};};});m = (function(I,J){if ((J.Tag == 1.000000)) {var K = J.Item2;var L = J.Item1;return I(L)(K);}else{if ((J.Tag == 2.000000)) {var M = J.Item2;var N = J.Item4;var O = J.Item3;var P = J.Item1;m(I, O);I(P)(M);return m(I, N);}else{;};};});n = (function(I,J,K,L){var M = (new D(I, L));if ((M.Items[0.000000].Tag == 0.000000)) {if ((M.Items[1.000000].Tag == 0.000000)) {return (new t(J, K));}else{var N = l(I);var O = l(L);var P;if ((N < O)) {P = O;}else{P = N;};var Q = P;return (new s(J, K, I, L, (Q + 1)));};}else{var R = l(I);var S = l(L);var T;if ((R < S)) {T = S;}else{T = R;};var U = T;return (new s(J, K, I, L, (U + 1)));};});o = (function(I,J,K){if (K.MoveNext()) {var L = K.get_Current();var M = L.Items[1.000000];var N = L.Items[0.000000];return o(I, j(I, N, M, J), K);}else{return J;};});p = (function(I,J){var K = J.GetEnumerator();try{return o(I, k(), K);}finally{if (false) {K.Dispose();}else{;};};});q = (function(I,J,K,L){var M = l(I);var N = l(L);if ((N > (M + 2))) {if ((L.Tag == 2.000000)) {var O = L.Item2;var P = L.Item4;var Q = L.Item3;var R = L.Item1;if ((l(Q) > (M + 1))) {if ((Q.Tag == 2.000000)) {var S = Q.Item2;var T = Q.Item4;var U = Q.Item3;var V = Q.Item1;return n(n(I, J, K, U), V, S, n(T, R, O, P));}else{throw ("rebalance");return null;};}else{return n(n(I, J, K, Q), R, O, P);};}else{throw ("rebalance");return null;};}else{if ((M > (N + 2))) {if ((I.Tag == 2.000000)) {var W = I.Item2;var X = I.Item4;var Y = I.Item3;var Z = I.Item1;if ((l(X) > (N + 1))) {if ((X.Tag == 2.000000)) {var _ = X.Item2;var ab = X.Item4;var bb = X.Item3;var cb = X.Item1;return n(n(Y, Z, W, bb), cb, _, n(ab, J, K, L));}else{throw ("re balance");return null;};}else{return n(Y, Z, W, n(X, J, K, L));};}else{throw ("rebalance");return null;};}else{return n(I, J, K, L);};};});r = (function(){var I = this;I.Tag = 0.000000;I._CaseName = "MapEmpty";});s = (function(Item1,Item2,Item3,Item4,Item5){var N = this;N.Tag = 2.000000;N._CaseName = "MapNode";N.Item1 = Item1;N.Item2 = Item2;N.Item3 = Item3;N.Item4 = Item4;N.Item5 = Item5;});t = (function(Item1,Item2){var K = this;K.Tag = 1.000000;K._CaseName = "MapOne";K.Item1 = Item1;K.Item2 = Item2;});u = (function(I,J){return c(J, I);});v = (function(I){return b(I);});w = (function(I){return I.Value;;});x = (function(I){return I.Value;;});y = (function(I){return ((I.Tag == 1.000000) && true);});z = (function(I){var J;J = (new a(I));return {GetEnumerator: (function(K){return (function(L,K){var M;return L.factory(M);})(J, K);})};});A = (function(I){return B((function(J){if ((J.Tag == 1.000000)) {var K = i(J);var L = h(J);return {Tag: 1.000000, Value: (new E(L, K))};}else{return {Tag: 0.000000};};}), I);});B = (function(I,J){return z((function(K){var L;L = (new F(J, I));return {get_Current: (function(M){return (function(N,M){return N.current;})(L, M);}), MoveNext: (function(M){return (function(N,M){var O = (function(P){var Q = w(N.acc);var R = N.unfold(Q);if ((R.Tag == 1.000000)) {var S = x(R).Items[0.000000];var T = x(R).Items[1.000000];N.acc = {Tag: 1.000000, Value: T};N.current = S;return true;}else{N.acc = {Tag: 0.000000};N.current = null;return false;};});return (y(N.acc) && (function(){var P;return O(P);})());})(L, M);}), Reset: (function(M){return (function(N,M){N.acc = {Tag: 1.000000, Value: N.seed};N.current = null;})(L, M);}), Dispose: (function(M){return (function(N,M){;})(L, M);})};}));});C = (function(Item0,Item1){var K = this;K.Items = [Item0, Item1];});D = (function(Item0,Item1){var K = this;K.Items = [Item0, Item1];});E = (function(Item0,Item1){var K = this;K.Items = [Item0, Item1];});F = (function(I,J){var K = this;{};K.seed = I;K.unfold = J;K.acc = {Tag: 1.000000, Value: K.seed};K.current = null;});G = (function(Item1,Item2){var K = this;K.Tag = 1.000000;K._CaseName = "Cons";K.Item1 = Item1;K.Item2 = Item2;});H = (function(){var I = this;I.Tag = 0.000000;I._CaseName = "Nil";});var I = v(A(f((new C(1.000000, 1.000000)), f((new C(2.000000, 4.000000)), f((new C(3.000000, 9.000000)), f((new C(4.000000, 16.000000)), g()))))));var J = {contents: 0.000000};u((function(K){return (function(L){J.contents = ((J.contents + K) + L);});}), I);return J.contents | |
***** FunScript.Tests.Maps.Map.map works | |
// Code: | |
var J, I, H, G, F, E, D, C, B, A, z, y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(K){var L = this;{};L.factory = K;});b = (function(K,L){return o(K.comparer_386, L, K.tree_390);});c = (function(K){var L = (new f());var M;M = L;var N;N = L;return (new e({Compare: (function(O,P){return (function(Q,O,P){return (O < P ? -1 : (O == P ? 0 : 1));})(M, O, P);})}, r({Compare: (function(O,P){return (function(Q,O,P){return (O < P ? -1 : (O == P ? 0 : 1));})(N, O, P);})}, K)));});d = (function(K,L){return (new e(K.comparer_386, n(L, K.tree_390)));});e = (function(K,L){var M = this;{};M.comparer_386 = K;M.tree_390 = L;});f = (function(K){{};});g = (function(K,L){return (new I(K, L));});h = (function(){return (new J());});i = (function(K){if ((K.Tag == 1.000000)) {var L = K.Item2;var M = K.Item1;return M;}else{throw ("List was empty");return null;};});j = (function(K){if ((K.Tag == 1.000000)) {var L = K.Item2;var M = K.Item1;return L;}else{throw ("List was empty");return null;};});k = (function(K,L,M,N){if ((N.Tag == 1.000000)) {var O = N.Item1;var P = K.Compare(L, O);if ((P < 0)) {return (new u(L, M, (new t()), N, 2));}else{if ((P == 0)) {return (new v(L, M));}else{return (new u(L, M, N, (new t()), 2));};};}else{if ((N.Tag == 2.000000)) {var Q = N.Item2;var R = N.Item4;var S = N.Item3;var T = N.Item1;var U = N.Item5;var V = K.Compare(L, T);if ((V < 0)) {return s(k(K, L, M, S), T, Q, R);}else{if ((V == 0)) {return (new u(L, M, S, R, U));}else{return s(S, T, Q, k(K, L, M, R));};};}else{return (new v(L, M));};};});l = (function(){return (new t());});m = (function(K){if ((K.Tag == 1.000000)) {return 1;}else{if ((K.Tag == 2.000000)) {var L = K.Item5;return L;}else{return 0;};};});n = (function(K,L){if ((L.Tag == 1.000000)) {var M = L.Item2;var N = L.Item1;return (new v(N, K(N)(M)));}else{if ((L.Tag == 2.000000)) {var O = L.Item2;var P = L.Item4;var Q = L.Item3;var R = L.Item1;var S = L.Item5;var T = n(K, Q);var U = K(R)(O);var V = n(K, P);return (new u(R, U, T, V, S));}else{return l();};};});o = (function(K,L,M){if ((M.Tag == 1.000000)) {var N = M.Item1;return (K.Compare(L, N) == 0);}else{return ((M.Tag == 2.000000) && (function(){var O = M.Item4;var P = M.Item3;var Q = M.Item1;var R = K.Compare(L, Q);if ((R < 0)) {return o(K, L, P);}else{return ((R == 0) || o(K, L, O));};})());};});p = (function(K,L,M,N){var O = (new F(K, N));if ((O.Items[0.000000].Tag == 0.000000)) {if ((O.Items[1.000000].Tag == 0.000000)) {return (new v(L, M));}else{var P = m(K);var Q = m(N);var R;if ((P < Q)) {R = Q;}else{R = P;};var S = R;return (new u(L, M, K, N, (S + 1)));};}else{var T = m(K);var U = m(N);var V;if ((T < U)) {V = U;}else{V = T;};var W = V;return (new u(L, M, K, N, (W + 1)));};});q = (function(K,L,M){if (M.MoveNext()) {var N = M.get_Current();var O = N.Items[1.000000];var P = N.Items[0.000000];return q(K, k(K, P, O, L), M);}else{return L;};});r = (function(K,L){var M = L.GetEnumerator();try{return q(K, l(), M);}finally{if (false) {M.Dispose();}else{;};};});s = (function(K,L,M,N){var O = m(K);var P = m(N);if ((P > (O + 2))) {if ((N.Tag == 2.000000)) {var Q = N.Item2;var R = N.Item4;var S = N.Item3;var T = N.Item1;if ((m(S) > (O + 1))) {if ((S.Tag == 2.000000)) {var U = S.Item2;var V = S.Item4;var W = S.Item3;var X = S.Item1;return p(p(K, L, M, W), X, U, p(V, T, Q, R));}else{throw ("rebalance");return null;};}else{return p(p(K, L, M, S), T, Q, R);};}else{throw ("rebalance");return null;};}else{if ((O > (P + 2))) {if ((K.Tag == 2.000000)) {var Y = K.Item2;var Z = K.Item4;var _ = K.Item3;var ab = K.Item1;if ((m(Z) > (P + 1))) {if ((Z.Tag == 2.000000)) {var bb = Z.Item2;var cb = Z.Item4;var db = Z.Item3;var eb = Z.Item1;return p(p(_, ab, Y, db), eb, bb, p(cb, L, M, N));}else{throw ("re balance");return null;};}else{return p(_, ab, Y, p(Z, L, M, N));};}else{throw ("rebalance");return null;};}else{return p(K, L, M, N);};};});t = (function(){var K = this;K.Tag = 0.000000;K._CaseName = "MapEmpty";});u = (function(Item1,Item2,Item3,Item4,Item5){var P = this;P.Tag = 2.000000;P._CaseName = "MapNode";P.Item1 = Item1;P.Item2 = Item2;P.Item3 = Item3;P.Item4 = Item4;P.Item5 = Item5;});v = (function(Item1,Item2){var M = this;M.Tag = 1.000000;M._CaseName = "MapOne";M.Item1 = Item1;M.Item2 = Item2;});w = (function(K,L){return d(L, K);});x = (function(K){return c(K);});y = (function(K){return K.Value;;});z = (function(K){return K.Value;;});A = (function(K){return ((K.Tag == 1.000000) && true);});B = (function(K){var L;L = (new a(K));return {GetEnumerator: (function(M){return (function(N,M){var O;return N.factory(O);})(L, M);})};});C = (function(K){return D((function(L){if ((L.Tag == 1.000000)) {var M = j(L);var N = i(L);return {Tag: 1.000000, Value: (new G(N, M))};}else{return {Tag: 0.000000};};}), K);});D = (function(K,L){return B((function(M){var N;N = (new H(L, K));return {get_Current: (function(O){return (function(P,O){return P.current;})(N, O);}), MoveNext: (function(O){return (function(P,O){var Q = (function(R){var S = y(P.acc);var T = P.unfold(S);if ((T.Tag == 1.000000)) {var U = z(T).Items[0.000000];var V = z(T).Items[1.000000];P.acc = {Tag: 1.000000, Value: V};P.current = U;return true;}else{P.acc = {Tag: 0.000000};P.current = null;return false;};});return (A(P.acc) && (function(){var R;return Q(R);})());})(N, O);}), Reset: (function(O){return (function(P,O){P.acc = {Tag: 1.000000, Value: P.seed};P.current = null;})(N, O);}), Dispose: (function(O){return (function(P,O){;})(N, O);})};}));});E = (function(Item0,Item1){var M = this;M.Items = [Item0, Item1];});F = (function(Item0,Item1){var M = this;M.Items = [Item0, Item1];});G = (function(Item0,Item1){var M = this;M.Items = [Item0, Item1];});H = (function(K,L){var M = this;{};M.seed = K;M.unfold = L;M.acc = {Tag: 1.000000, Value: M.seed};M.current = null;});I = (function(Item1,Item2){var M = this;M.Tag = 1.000000;M._CaseName = "Cons";M.Item1 = Item1;M.Item2 = Item2;});J = (function(){var K = this;K.Tag = 0.000000;K._CaseName = "Nil";});var K = x(C(g((new E(1, 1.000000)), g((new E(2, 4.000000)), g((new E(3, 9.000000)), g((new E(4, 16.000000)), h()))))));var L = w((function(M){return (function(N){return (N * 2.000000);});}), K);return b(L, 1) | |
***** FunScript.Tests.Maps.Map.ofArray works | |
// Code: | |
var r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(s){return s.length;;});b = (function(s,t){return k(s.tree_390);});c = (function(s,t){var u = this;{};u.comparer_386 = s;u.tree_390 = t;});d = (function(s){{};});e = (function(s,t,u,v){if ((v.Tag == 1.000000)) {var w = v.Item1;var x = s.Compare(t, w);if ((x < 0)) {return (new n(t, u, (new m()), v, 2));}else{if ((x == 0)) {return (new o(t, u));}else{return (new n(t, u, v, (new m()), 2));};};}else{if ((v.Tag == 2.000000)) {var y = v.Item2;var z = v.Item4;var A = v.Item3;var B = v.Item1;var C = v.Item5;var D = s.Compare(t, B);if ((D < 0)) {return j(e(s, t, u, A), B, y, z);}else{if ((D == 0)) {return (new n(t, u, A, z, C));}else{return j(A, B, y, e(s, t, u, z));};};}else{return (new o(t, u));};};});f = (function(){return (new m());});g = (function(s){if ((s.Tag == 1.000000)) {return 1;}else{if ((s.Tag == 2.000000)) {var t = s.Item5;return t;}else{return 0;};};});h = (function(s,t,u,v){var w = (new r(s, v));if ((w.Items[0.000000].Tag == 0.000000)) {if ((w.Items[1.000000].Tag == 0.000000)) {return (new o(t, u));}else{var x = g(s);var y = g(v);var z;if ((x < y)) {z = y;}else{z = x;};var A = z;return (new n(t, u, s, v, (A + 1)));};}else{var B = g(s);var C = g(v);var D;if ((B < C)) {D = C;}else{D = B;};var E = D;return (new n(t, u, s, v, (E + 1)));};});i = (function(s,t){var u = f();for (var v = 0; v <= (a(t) - 1); v++){var w = t[v];var x = w.Items[1.000000];var y = w.Items[0.000000];u = e(s, y, x, u);null;};return u;});j = (function(s,t,u,v){var w = g(s);var x = g(v);if ((x > (w + 2))) {if ((v.Tag == 2.000000)) {var y = v.Item2;var z = v.Item4;var A = v.Item3;var B = v.Item1;if ((g(A) > (w + 1))) {if ((A.Tag == 2.000000)) {var C = A.Item2;var D = A.Item4;var E = A.Item3;var F = A.Item1;return h(h(s, t, u, E), F, C, h(D, B, y, z));}else{throw ("rebalance");return null;};}else{return h(h(s, t, u, A), B, y, z);};}else{throw ("rebalance");return null;};}else{if ((w > (x + 2))) {if ((s.Tag == 2.000000)) {var G = s.Item2;var H = s.Item4;var I = s.Item3;var J = s.Item1;if ((g(H) > (x + 1))) {if ((H.Tag == 2.000000)) {var K = H.Item2;var L = H.Item4;var M = H.Item3;var N = H.Item1;return h(h(I, J, G, M), N, K, h(L, t, u, v));}else{throw ("re balance");return null;};}else{return h(I, J, G, h(H, t, u, v));};}else{throw ("rebalance");return null;};}else{return h(s, t, u, v);};};});k = (function(s){return l(0, s);});l = (function(s,t){if ((t.Tag == 1.000000)) {return (s + 1);}else{if ((t.Tag == 2.000000)) {var u = t.Item4;var v = t.Item3;return l(l((s + 1), v), u);}else{return s;};};});m = (function(){var s = this;s.Tag = 0.000000;s._CaseName = "MapEmpty";});n = (function(Item1,Item2,Item3,Item4,Item5){var x = this;x.Tag = 2.000000;x._CaseName = "MapNode";x.Item1 = Item1;x.Item2 = Item2;x.Item3 = Item3;x.Item4 = Item4;x.Item5 = Item5;});o = (function(Item1,Item2){var u = this;u.Tag = 1.000000;u._CaseName = "MapOne";u.Item1 = Item1;u.Item2 = Item2;});p = (function(s){var t = (new d());var u;u = t;var v;v = t;return (new c({Compare: (function(w,x){return (function(y,w,x){return (w < x ? -1 : (w == x ? 0 : 1));})(u, w, x);})}, i({Compare: (function(w,x){return (function(y,w,x){return (w < x ? -1 : (w == x ? 0 : 1));})(v, w, x);})}, s)));});q = (function(Item0,Item1){var u = this;u.Items = [Item0, Item1];});r = (function(Item0,Item1){var u = this;u.Items = [Item0, Item1];});var s = p([(new q(1, 1.000000)), (new q(2, 4.000000)), (new q(3, 9.000000)), (new q(4, 16.000000))]);return b(s) | |
***** FunScript.Tests.Maps.Map.ofList works | |
// Code: | |
var y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(z,A){return p(z.tree_390);});b = (function(z,A){var B = this;{};B.comparer_386 = z;B.tree_390 = A;});c = (function(z){var A = (new d());var B;B = A;var C;C = A;return (new b({Compare: (function(D,E){return (function(F,D,E){return (D < E ? -1 : (D == E ? 0 : 1));})(B, D, E);})}, n({Compare: (function(D,E){return (function(F,D,E){return (D < E ? -1 : (D == E ? 0 : 1));})(C, D, E);})}, z)));});d = (function(z){{};});e = (function(z,A){return (new x(z, A));});f = (function(){return (new y());});g = (function(z,A,B){return h((function(C){return (function(D){return (function(E){return z(D)(E);});});}), A, B);});h = (function(z,A,B){return i(z, 0, A, B);});i = (function(z,A,B,C){if ((C.Tag == 1.000000)) {var D = C.Item2;var E = C.Item1;return i(z, (A + 1), z(A)(B)(E), D);}else{return B;};});j = (function(z,A,B,C){if ((C.Tag == 1.000000)) {var D = C.Item1;var E = z.Compare(A, D);if ((E < 0)) {return (new s(A, B, (new r()), C, 2));}else{if ((E == 0)) {return (new t(A, B));}else{return (new s(A, B, C, (new r()), 2));};};}else{if ((C.Tag == 2.000000)) {var F = C.Item2;var G = C.Item4;var H = C.Item3;var I = C.Item1;var J = C.Item5;var K = z.Compare(A, I);if ((K < 0)) {return o(j(z, A, B, H), I, F, G);}else{if ((K == 0)) {return (new s(A, B, H, G, J));}else{return o(H, I, F, j(z, A, B, G));};};}else{return (new t(A, B));};};});k = (function(){return (new r());});l = (function(z){if ((z.Tag == 1.000000)) {return 1;}else{if ((z.Tag == 2.000000)) {var A = z.Item5;return A;}else{return 0;};};});m = (function(z,A,B,C){var D = (new w(z, C));if ((D.Items[0.000000].Tag == 0.000000)) {if ((D.Items[1.000000].Tag == 0.000000)) {return (new t(A, B));}else{var E = l(z);var F = l(C);var G;if ((E < F)) {G = F;}else{G = E;};var H = G;return (new s(A, B, z, C, (H + 1)));};}else{var I = l(z);var J = l(C);var K;if ((I < J)) {K = J;}else{K = I;};var L = K;return (new s(A, B, z, C, (L + 1)));};});n = (function(z,A){return g((function(B){return (function(C){var D = C.Items[0.000000];var E = C.Items[1.000000];return j(z, D, E, B);});}), k(), A);});o = (function(z,A,B,C){var D = l(z);var E = l(C);if ((E > (D + 2))) {if ((C.Tag == 2.000000)) {var F = C.Item2;var G = C.Item4;var H = C.Item3;var I = C.Item1;if ((l(H) > (D + 1))) {if ((H.Tag == 2.000000)) {var J = H.Item2;var K = H.Item4;var L = H.Item3;var M = H.Item1;return m(m(z, A, B, L), M, J, m(K, I, F, G));}else{throw ("rebalance");return null;};}else{return m(m(z, A, B, H), I, F, G);};}else{throw ("rebalance");return null;};}else{if ((D > (E + 2))) {if ((z.Tag == 2.000000)) {var N = z.Item2;var O = z.Item4;var P = z.Item3;var Q = z.Item1;if ((l(O) > (E + 1))) {if ((O.Tag == 2.000000)) {var R = O.Item2;var S = O.Item4;var T = O.Item3;var U = O.Item1;return m(m(P, Q, N, T), U, R, m(S, A, B, C));}else{throw ("re balance");return null;};}else{return m(P, Q, N, m(O, A, B, C));};}else{throw ("rebalance");return null;};}else{return m(z, A, B, C);};};});p = (function(z){return q(0, z);});q = (function(z,A){if ((A.Tag == 1.000000)) {return (z + 1);}else{if ((A.Tag == 2.000000)) {var B = A.Item4;var C = A.Item3;return q(q((z + 1), C), B);}else{return z;};};});r = (function(){var z = this;z.Tag = 0.000000;z._CaseName = "MapEmpty";});s = (function(Item1,Item2,Item3,Item4,Item5){var E = this;E.Tag = 2.000000;E._CaseName = "MapNode";E.Item1 = Item1;E.Item2 = Item2;E.Item3 = Item3;E.Item4 = Item4;E.Item5 = Item5;});t = (function(Item1,Item2){var B = this;B.Tag = 1.000000;B._CaseName = "MapOne";B.Item1 = Item1;B.Item2 = Item2;});u = (function(z){return c(z);});v = (function(Item0,Item1){var B = this;B.Items = [Item0, Item1];});w = (function(Item0,Item1){var B = this;B.Items = [Item0, Item1];});x = (function(Item1,Item2){var B = this;B.Tag = 1.000000;B._CaseName = "Cons";B.Item1 = Item1;B.Item2 = Item2;});y = (function(){var z = this;z.Tag = 0.000000;z._CaseName = "Nil";});var z = u(e((new v(1, 1.000000)), e((new v(2, 4.000000)), e((new v(3, 9.000000)), e((new v(4, 16.000000)), f())))));return a(z) | |
***** FunScript.Tests.Maps.Map.ofSeq works | |
// Code: | |
var H, G, F, E, D, C, B, A, z, y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(I){var J = this;{};J.factory = I;});b = (function(I,J){return q(I.tree_390);});c = (function(I){var J = (new e());var K;K = J;var L;L = J;return (new d({Compare: (function(M,N){return (function(O,M,N){return (M < N ? -1 : (M == N ? 0 : 1));})(K, M, N);})}, o({Compare: (function(M,N){return (function(O,M,N){return (M < N ? -1 : (M == N ? 0 : 1));})(L, M, N);})}, I)));});d = (function(I,J){var K = this;{};K.comparer_386 = I;K.tree_390 = J;});e = (function(I){{};});f = (function(I,J){return (new G(I, J));});g = (function(){return (new H());});h = (function(I){if ((I.Tag == 1.000000)) {var J = I.Item2;var K = I.Item1;return K;}else{throw ("List was empty");return null;};});i = (function(I){if ((I.Tag == 1.000000)) {var J = I.Item2;var K = I.Item1;return J;}else{throw ("List was empty");return null;};});j = (function(I,J,K,L){if ((L.Tag == 1.000000)) {var M = L.Item1;var N = I.Compare(J, M);if ((N < 0)) {return (new t(J, K, (new s()), L, 2));}else{if ((N == 0)) {return (new u(J, K));}else{return (new t(J, K, L, (new s()), 2));};};}else{if ((L.Tag == 2.000000)) {var O = L.Item2;var P = L.Item4;var Q = L.Item3;var R = L.Item1;var S = L.Item5;var T = I.Compare(J, R);if ((T < 0)) {return p(j(I, J, K, Q), R, O, P);}else{if ((T == 0)) {return (new t(J, K, Q, P, S));}else{return p(Q, R, O, j(I, J, K, P));};};}else{return (new u(J, K));};};});k = (function(){return (new s());});l = (function(I){if ((I.Tag == 1.000000)) {return 1;}else{if ((I.Tag == 2.000000)) {var J = I.Item5;return J;}else{return 0;};};});m = (function(I,J,K,L){var M = (new D(I, L));if ((M.Items[0.000000].Tag == 0.000000)) {if ((M.Items[1.000000].Tag == 0.000000)) {return (new u(J, K));}else{var N = l(I);var O = l(L);var P;if ((N < O)) {P = O;}else{P = N;};var Q = P;return (new t(J, K, I, L, (Q + 1)));};}else{var R = l(I);var S = l(L);var T;if ((R < S)) {T = S;}else{T = R;};var U = T;return (new t(J, K, I, L, (U + 1)));};});n = (function(I,J,K){if (K.MoveNext()) {var L = K.get_Current();var M = L.Items[1.000000];var N = L.Items[0.000000];return n(I, j(I, N, M, J), K);}else{return J;};});o = (function(I,J){var K = J.GetEnumerator();try{return n(I, k(), K);}finally{if (false) {K.Dispose();}else{;};};});p = (function(I,J,K,L){var M = l(I);var N = l(L);if ((N > (M + 2))) {if ((L.Tag == 2.000000)) {var O = L.Item2;var P = L.Item4;var Q = L.Item3;var R = L.Item1;if ((l(Q) > (M + 1))) {if ((Q.Tag == 2.000000)) {var S = Q.Item2;var T = Q.Item4;var U = Q.Item3;var V = Q.Item1;return m(m(I, J, K, U), V, S, m(T, R, O, P));}else{throw ("rebalance");return null;};}else{return m(m(I, J, K, Q), R, O, P);};}else{throw ("rebalance");return null;};}else{if ((M > (N + 2))) {if ((I.Tag == 2.000000)) {var W = I.Item2;var X = I.Item4;var Y = I.Item3;var Z = I.Item1;if ((l(X) > (N + 1))) {if ((X.Tag == 2.000000)) {var _ = X.Item2;var ab = X.Item4;var bb = X.Item3;var cb = X.Item1;return m(m(Y, Z, W, bb), cb, _, m(ab, J, K, L));}else{throw ("re balance");return null;};}else{return m(Y, Z, W, m(X, J, K, L));};}else{throw ("rebalance");return null;};}else{return m(I, J, K, L);};};});q = (function(I){return r(0, I);});r = (function(I,J){if ((J.Tag == 1.000000)) {return (I + 1);}else{if ((J.Tag == 2.000000)) {var K = J.Item4;var L = J.Item3;return r(r((I + 1), L), K);}else{return I;};};});s = (function(){var I = this;I.Tag = 0.000000;I._CaseName = "MapEmpty";});t = (function(Item1,Item2,Item3,Item4,Item5){var N = this;N.Tag = 2.000000;N._CaseName = "MapNode";N.Item1 = Item1;N.Item2 = Item2;N.Item3 = Item3;N.Item4 = Item4;N.Item5 = Item5;});u = (function(Item1,Item2){var K = this;K.Tag = 1.000000;K._CaseName = "MapOne";K.Item1 = Item1;K.Item2 = Item2;});v = (function(I){return c(I);});w = (function(I){return I.Value;;});x = (function(I){return I.Value;;});y = (function(I){return ((I.Tag == 1.000000) && true);});z = (function(I){var J;J = (new a(I));return {GetEnumerator: (function(K){return (function(L,K){var M;return L.factory(M);})(J, K);})};});A = (function(I){return B((function(J){if ((J.Tag == 1.000000)) {var K = i(J);var L = h(J);return {Tag: 1.000000, Value: (new E(L, K))};}else{return {Tag: 0.000000};};}), I);});B = (function(I,J){return z((function(K){var L;L = (new F(J, I));return {get_Current: (function(M){return (function(N,M){return N.current;})(L, M);}), MoveNext: (function(M){return (function(N,M){var O = (function(P){var Q = w(N.acc);var R = N.unfold(Q);if ((R.Tag == 1.000000)) {var S = x(R).Items[0.000000];var T = x(R).Items[1.000000];N.acc = {Tag: 1.000000, Value: T};N.current = S;return true;}else{N.acc = {Tag: 0.000000};N.current = null;return false;};});return (y(N.acc) && (function(){var P;return O(P);})());})(L, M);}), Reset: (function(M){return (function(N,M){N.acc = {Tag: 1.000000, Value: N.seed};N.current = null;})(L, M);}), Dispose: (function(M){return (function(N,M){;})(L, M);})};}));});C = (function(Item0,Item1){var K = this;K.Items = [Item0, Item1];});D = (function(Item0,Item1){var K = this;K.Items = [Item0, Item1];});E = (function(Item0,Item1){var K = this;K.Items = [Item0, Item1];});F = (function(I,J){var K = this;{};K.seed = I;K.unfold = J;K.acc = {Tag: 1.000000, Value: K.seed};K.current = null;});G = (function(Item1,Item2){var K = this;K.Tag = 1.000000;K._CaseName = "Cons";K.Item1 = Item1;K.Item2 = Item2;});H = (function(){var I = this;I.Tag = 0.000000;I._CaseName = "Nil";});var I = v(A(f((new C(1, 1.000000)), f((new C(2, 4.000000)), f((new C(3, 9.000000)), f((new C(4, 16.000000)), g()))))));return b(I) | |
***** FunScript.Tests.Maps.Map.partition works | |
// Code: | |
var N, M, L, K, J, I, H, G, F, E, D, C, B, A, z, y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(O){var P = this;{};P.factory = O;});b = (function(O,P){return u(O.tree_390);});c = (function(O){var P = (new f());var Q;Q = P;var R;R = P;return (new e({Compare: (function(S,T){return (function(U,S,T){return (S < T ? -1 : (S == T ? 0 : 1));})(Q, S, T);})}, p({Compare: (function(S,T){return (function(U,S,T){return (S < T ? -1 : (S == T ? 0 : 1));})(R, S, T);})}, O)));});d = (function(O,P){var Q = q(O.comparer_386, P, O.tree_390);var R = Q.Items[1.000000];var S = Q.Items[0.000000];return (new H((new e(O.comparer_386, S)), (new e(O.comparer_386, R))));});e = (function(O,P){var Q = this;{};Q.comparer_386 = O;Q.tree_390 = P;});f = (function(O){{};});g = (function(O,P){return (new M(O, P));});h = (function(){return (new N());});i = (function(O){if ((O.Tag == 1.000000)) {var P = O.Item2;var Q = O.Item1;return Q;}else{throw ("List was empty");return null;};});j = (function(O){if ((O.Tag == 1.000000)) {var P = O.Item2;var Q = O.Item1;return P;}else{throw ("List was empty");return null;};});k = (function(O,P,Q,R){if ((R.Tag == 1.000000)) {var S = R.Item1;var T = O.Compare(P, S);if ((T < 0)) {return (new x(P, Q, (new w()), R, 2));}else{if ((T == 0)) {return (new y(P, Q));}else{return (new x(P, Q, R, (new w()), 2));};};}else{if ((R.Tag == 2.000000)) {var U = R.Item2;var V = R.Item4;var W = R.Item3;var X = R.Item1;var Y = R.Item5;var Z = O.Compare(P, X);if ((Z < 0)) {return t(k(O, P, Q, W), X, U, V);}else{if ((Z == 0)) {return (new x(P, Q, W, V, Y));}else{return t(W, X, U, k(O, P, Q, V));};};}else{return (new y(P, Q));};};});l = (function(){return (new w());});m = (function(O){if ((O.Tag == 1.000000)) {return 1;}else{if ((O.Tag == 2.000000)) {var P = O.Item5;return P;}else{return 0;};};});n = (function(O,P,Q,R){var S = (new J(O, R));if ((S.Items[0.000000].Tag == 0.000000)) {if ((S.Items[1.000000].Tag == 0.000000)) {return (new y(P, Q));}else{var T = m(O);var U = m(R);var V;if ((T < U)) {V = U;}else{V = T;};var W = V;return (new x(P, Q, O, R, (W + 1)));};}else{var X = m(O);var Y = m(R);var Z;if ((X < Y)) {Z = Y;}else{Z = X;};var _ = Z;return (new x(P, Q, O, R, (_ + 1)));};});o = (function(O,P,Q){if (Q.MoveNext()) {var R = Q.get_Current();var S = R.Items[1.000000];var T = R.Items[0.000000];return o(O, k(O, T, S, P), Q);}else{return P;};});p = (function(O,P){var Q = P.GetEnumerator();try{return o(O, l(), Q);}finally{if (false) {Q.Dispose();}else{;};};});q = (function(O,P,Q){return s(O, P, Q, l(), l());});r = (function(O,P,Q,R,S,T){if (P(Q)(R)) {return (new J(k(O, Q, R, S), T));}else{return (new J(S, k(O, Q, R, T)));};});s = (function(O,P,Q,R,S){var T = (new J(R, S));if ((Q.Tag == 1.000000)) {var U = Q.Item2;var V = Q.Item1;var W = T.Items[0.000000];var X = T.Items[1.000000];return r(O, P, V, U, W, X);}else{if ((Q.Tag == 2.000000)) {var Y = Q.Item2;var Z = Q.Item4;var _ = Q.Item3;var ab = Q.Item1;var bb = T.Items[0.000000];var cb = T.Items[1.000000];var db = s(O, P, Z, bb, cb);var eb = db.Items[0.000000];var fb = db.Items[1.000000];var gb = r(O, P, ab, Y, eb, fb);var hb = gb.Items[0.000000];var ib = gb.Items[1.000000];return s(O, P, _, hb, ib);}else{return T;};};});t = (function(O,P,Q,R){var S = m(O);var T = m(R);if ((T > (S + 2))) {if ((R.Tag == 2.000000)) {var U = R.Item2;var V = R.Item4;var W = R.Item3;var X = R.Item1;if ((m(W) > (S + 1))) {if ((W.Tag == 2.000000)) {var Y = W.Item2;var Z = W.Item4;var _ = W.Item3;var ab = W.Item1;return n(n(O, P, Q, _), ab, Y, n(Z, X, U, V));}else{throw ("rebalance");return null;};}else{return n(n(O, P, Q, W), X, U, V);};}else{throw ("rebalance");return null;};}else{if ((S > (T + 2))) {if ((O.Tag == 2.000000)) {var bb = O.Item2;var cb = O.Item4;var db = O.Item3;var eb = O.Item1;if ((m(cb) > (T + 1))) {if ((cb.Tag == 2.000000)) {var fb = cb.Item2;var gb = cb.Item4;var hb = cb.Item3;var ib = cb.Item1;return n(n(db, eb, bb, hb), ib, fb, n(gb, P, Q, R));}else{throw ("re balance");return null;};}else{return n(db, eb, bb, n(cb, P, Q, R));};}else{throw ("rebalance");return null;};}else{return n(O, P, Q, R);};};});u = (function(O){return v(0, O);});v = (function(O,P){if ((P.Tag == 1.000000)) {return (O + 1);}else{if ((P.Tag == 2.000000)) {var Q = P.Item4;var R = P.Item3;return v(v((O + 1), R), Q);}else{return O;};};});w = (function(){var O = this;O.Tag = 0.000000;O._CaseName = "MapEmpty";});x = (function(Item1,Item2,Item3,Item4,Item5){var T = this;T.Tag = 2.000000;T._CaseName = "MapNode";T.Item1 = Item1;T.Item2 = Item2;T.Item3 = Item3;T.Item4 = Item4;T.Item5 = Item5;});y = (function(Item1,Item2){var Q = this;Q.Tag = 1.000000;Q._CaseName = "MapOne";Q.Item1 = Item1;Q.Item2 = Item2;});z = (function(O){return c(O);});A = (function(O,P){return d(P, O);});B = (function(O){return O.Value;;});C = (function(O){return O.Value;;});D = (function(O){return ((O.Tag == 1.000000) && true);});E = (function(O){var P;P = (new a(O));return {GetEnumerator: (function(Q){return (function(R,Q){var S;return R.factory(S);})(P, Q);})};});F = (function(O){return G((function(P){if ((P.Tag == 1.000000)) {var Q = j(P);var R = i(P);return {Tag: 1.000000, Value: (new K(R, Q))};}else{return {Tag: 0.000000};};}), O);});G = (function(O,P){return E((function(Q){var R;R = (new L(P, O));return {get_Current: (function(S){return (function(T,S){return T.current;})(R, S);}), MoveNext: (function(S){return (function(T,S){var U = (function(V){var W = B(T.acc);var X = T.unfold(W);if ((X.Tag == 1.000000)) {var Y = C(X).Items[0.000000];var Z = C(X).Items[1.000000];T.acc = {Tag: 1.000000, Value: Z};T.current = Y;return true;}else{T.acc = {Tag: 0.000000};T.current = null;return false;};});return (D(T.acc) && (function(){var V;return U(V);})());})(R, S);}), Reset: (function(S){return (function(T,S){T.acc = {Tag: 1.000000, Value: T.seed};T.current = null;})(R, S);}), Dispose: (function(S){return (function(T,S){;})(R, S);})};}));});H = (function(Item0,Item1){var Q = this;Q.Items = [Item0, Item1];});I = (function(Item0,Item1){var Q = this;Q.Items = [Item0, Item1];});J = (function(Item0,Item1){var Q = this;Q.Items = [Item0, Item1];});K = (function(Item0,Item1){var Q = this;Q.Items = [Item0, Item1];});L = (function(O,P){var Q = this;{};Q.seed = O;Q.unfold = P;Q.acc = {Tag: 1.000000, Value: Q.seed};Q.current = null;});M = (function(Item1,Item2){var Q = this;Q.Tag = 1.000000;Q._CaseName = "Cons";Q.Item1 = Item1;Q.Item2 = Item2;});N = (function(){var O = this;O.Tag = 0.000000;O._CaseName = "Nil";});var O = z(F(g((new I(1, 1.000000)), g((new I(2, 4.000000)), g((new I(3, 9.000000)), g((new I(4, 16.000000)), h()))))));var P = A((function(Q){return (function(R){return ((Q % 2) == 0);});}), O);var Q = P.Items[1.000000];var R = P.Items[0.000000];return (b(R) + b(Q)) | |
***** FunScript.Tests.Maps.Map.pick works | |
// Code: | |
var J, I, H, G, F, E, D, C, B, A, z, y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(K){var L = this;{};L.factory = K;});b = (function(K){var L = (new e());var M;M = L;var N;N = L;return (new d({Compare: (function(O,P){return (function(Q,O,P){return (O < P ? -1 : (O == P ? 0 : 1));})(M, O, P);})}, o({Compare: (function(O,P){return (function(Q,O,P){return (O < P ? -1 : (O == P ? 0 : 1));})(N, O, P);})}, K)));});c = (function(K,L){return q(L, K.tree_390);});d = (function(K,L){var M = this;{};M.comparer_386 = K;M.tree_390 = L;});e = (function(K){{};});f = (function(K,L){return (new I(K, L));});g = (function(){return (new J());});h = (function(K){if ((K.Tag == 1.000000)) {var L = K.Item2;var M = K.Item1;return M;}else{throw ("List was empty");return null;};});i = (function(K){if ((K.Tag == 1.000000)) {var L = K.Item2;var M = K.Item1;return L;}else{throw ("List was empty");return null;};});j = (function(K,L,M,N){if ((N.Tag == 1.000000)) {var O = N.Item1;var P = K.Compare(L, O);if ((P < 0)) {return (new s(L, M, (new r()), N, 2));}else{if ((P == 0)) {return (new t(L, M));}else{return (new s(L, M, N, (new r()), 2));};};}else{if ((N.Tag == 2.000000)) {var Q = N.Item2;var R = N.Item4;var S = N.Item3;var T = N.Item1;var U = N.Item5;var V = K.Compare(L, T);if ((V < 0)) {return p(j(K, L, M, S), T, Q, R);}else{if ((V == 0)) {return (new s(L, M, S, R, U));}else{return p(S, T, Q, j(K, L, M, R));};};}else{return (new t(L, M));};};});k = (function(){return (new r());});l = (function(K){if ((K.Tag == 1.000000)) {return 1;}else{if ((K.Tag == 2.000000)) {var L = K.Item5;return L;}else{return 0;};};});m = (function(K,L,M,N){var O = (new F(K, N));if ((O.Items[0.000000].Tag == 0.000000)) {if ((O.Items[1.000000].Tag == 0.000000)) {return (new t(L, M));}else{var P = l(K);var Q = l(N);var R;if ((P < Q)) {R = Q;}else{R = P;};var S = R;return (new s(L, M, K, N, (S + 1)));};}else{var T = l(K);var U = l(N);var V;if ((T < U)) {V = U;}else{V = T;};var W = V;return (new s(L, M, K, N, (W + 1)));};});n = (function(K,L,M){if (M.MoveNext()) {var N = M.get_Current();var O = N.Items[1.000000];var P = N.Items[0.000000];return n(K, j(K, P, O, L), M);}else{return L;};});o = (function(K,L){var M = L.GetEnumerator();try{return n(K, k(), M);}finally{if (false) {M.Dispose();}else{;};};});p = (function(K,L,M,N){var O = l(K);var P = l(N);if ((P > (O + 2))) {if ((N.Tag == 2.000000)) {var Q = N.Item2;var R = N.Item4;var S = N.Item3;var T = N.Item1;if ((l(S) > (O + 1))) {if ((S.Tag == 2.000000)) {var U = S.Item2;var V = S.Item4;var W = S.Item3;var X = S.Item1;return m(m(K, L, M, W), X, U, m(V, T, Q, R));}else{throw ("rebalance");return null;};}else{return m(m(K, L, M, S), T, Q, R);};}else{throw ("rebalance");return null;};}else{if ((O > (P + 2))) {if ((K.Tag == 2.000000)) {var Y = K.Item2;var Z = K.Item4;var _ = K.Item3;var ab = K.Item1;if ((l(Z) > (P + 1))) {if ((Z.Tag == 2.000000)) {var bb = Z.Item2;var cb = Z.Item4;var db = Z.Item3;var eb = Z.Item1;return m(m(_, ab, Y, db), eb, bb, m(cb, L, M, N));}else{throw ("re balance");return null;};}else{return m(_, ab, Y, m(Z, L, M, N));};}else{throw ("rebalance");return null;};}else{return m(K, L, M, N);};};});q = (function(K,L){if ((L.Tag == 1.000000)) {var M = L.Item2;var N = L.Item1;return K(N)(M);}else{if ((L.Tag == 2.000000)) {var O = L.Item2;var P = L.Item4;var Q = L.Item3;var R = L.Item1;var S = q(K, Q);if ((S.Tag == 0.000000)) {var T = K(R)(O);if ((T.Tag == 0.000000)) {return q(K, P);}else{var U = T;return U;};}else{var V = S;return V;};}else{return {Tag: 0.000000};};};});r = (function(){var K = this;K.Tag = 0.000000;K._CaseName = "MapEmpty";});s = (function(Item1,Item2,Item3,Item4,Item5){var P = this;P.Tag = 2.000000;P._CaseName = "MapNode";P.Item1 = Item1;P.Item2 = Item2;P.Item3 = Item3;P.Item4 = Item4;P.Item5 = Item5;});t = (function(Item1,Item2){var M = this;M.Tag = 1.000000;M._CaseName = "MapOne";M.Item1 = Item1;M.Item2 = Item2;});u = (function(K){return b(K);});v = (function(K,L){var M = w(K, L);if ((M.Tag == 1.000000)) {var N = y(M);return N;}else{throw ("key not found");return null;};});w = (function(K,L){return c(L, K);});x = (function(K){return K.Value;;});y = (function(K){return K.Value;;});z = (function(K){return K.Value;;});A = (function(K){return ((K.Tag == 1.000000) && true);});B = (function(K){var L;L = (new a(K));return {GetEnumerator: (function(M){return (function(N,M){var O;return N.factory(O);})(L, M);})};});C = (function(K){return D((function(L){if ((L.Tag == 1.000000)) {var M = i(L);var N = h(L);return {Tag: 1.000000, Value: (new G(N, M))};}else{return {Tag: 0.000000};};}), K);});D = (function(K,L){return B((function(M){var N;N = (new H(L, K));return {get_Current: (function(O){return (function(P,O){return P.current;})(N, O);}), MoveNext: (function(O){return (function(P,O){var Q = (function(R){var S = x(P.acc);var T = P.unfold(S);if ((T.Tag == 1.000000)) {var U = z(T).Items[0.000000];var V = z(T).Items[1.000000];P.acc = {Tag: 1.000000, Value: V};P.current = U;return true;}else{P.acc = {Tag: 0.000000};P.current = null;return false;};});return (A(P.acc) && (function(){var R;return Q(R);})());})(N, O);}), Reset: (function(O){return (function(P,O){P.acc = {Tag: 1.000000, Value: P.seed};P.current = null;})(N, O);}), Dispose: (function(O){return (function(P,O){;})(N, O);})};}));});E = (function(Item0,Item1){var M = this;M.Items = [Item0, Item1];});F = (function(Item0,Item1){var M = this;M.Items = [Item0, Item1];});G = (function(Item0,Item1){var M = this;M.Items = [Item0, Item1];});H = (function(K,L){var M = this;{};M.seed = K;M.unfold = L;M.acc = {Tag: 1.000000, Value: M.seed};M.current = null;});I = (function(Item1,Item2){var M = this;M.Tag = 1.000000;M._CaseName = "Cons";M.Item1 = Item1;M.Item2 = Item2;});J = (function(){var K = this;K.Tag = 0.000000;K._CaseName = "Nil";});var K = u(C(f((new E(1, 1.000000)), f((new E(2, 4.000000)), f((new E(3, 9.000000)), f((new E(4, 16.000000)), g()))))));var L = v((function(M){return (function(N){if ((M == 3)) {return {Tag: 1.000000, Value: 10};}else{return {Tag: 0.000000};};});}), K);return L | |
***** FunScript.Tests.Maps.Map.remove works | |
// Code: | |
var v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(w,x){return j(w.tree_390);});b = (function(w,x,y){return (new d(w.comparer_386, g(w.comparer_386, x, y, w.tree_390)));});c = (function(w,x){return (new d(w.comparer_386, m(w.comparer_386, x, w.tree_390)));});d = (function(w,x){var y = this;{};y.comparer_386 = w;y.tree_390 = x;});e = (function(w){var x = (new f());var y;y = x;return (new d({Compare: (function(z,A){return (function(B,z,A){return (z < A ? -1 : (z == A ? 0 : 1));})(y, z, A);})}, (new o())));});f = (function(w){{};});g = (function(w,x,y,z){if ((z.Tag == 1.000000)) {var A = z.Item1;var B = w.Compare(x, A);if ((B < 0)) {return (new p(x, y, (new o()), z, 2));}else{if ((B == 0)) {return (new q(x, y));}else{return (new p(x, y, z, (new o()), 2));};};}else{if ((z.Tag == 2.000000)) {var C = z.Item2;var D = z.Item4;var E = z.Item3;var F = z.Item1;var G = z.Item5;var H = w.Compare(x, F);if ((H < 0)) {return l(g(w, x, y, E), F, C, D);}else{if ((H == 0)) {return (new p(x, y, E, D, G));}else{return l(E, F, C, g(w, x, y, D));};};}else{return (new q(x, y));};};});h = (function(){return (new o());});i = (function(w){if ((w.Tag == 1.000000)) {return 1;}else{if ((w.Tag == 2.000000)) {var x = w.Item5;return x;}else{return 0;};};});j = (function(w){return ((w.Tag == 0.000000) && true);});k = (function(w,x,y,z){var A = (new v(w, z));if ((A.Items[0.000000].Tag == 0.000000)) {if ((A.Items[1.000000].Tag == 0.000000)) {return (new q(x, y));}else{var B = i(w);var C = i(z);var D;if ((B < C)) {D = C;}else{D = B;};var E = D;return (new p(x, y, w, z, (E + 1)));};}else{var F = i(w);var G = i(z);var H;if ((F < G)) {H = G;}else{H = F;};var I = H;return (new p(x, y, w, z, (I + 1)));};});l = (function(w,x,y,z){var A = i(w);var B = i(z);if ((B > (A + 2))) {if ((z.Tag == 2.000000)) {var C = z.Item2;var D = z.Item4;var E = z.Item3;var F = z.Item1;if ((i(E) > (A + 1))) {if ((E.Tag == 2.000000)) {var G = E.Item2;var H = E.Item4;var I = E.Item3;var J = E.Item1;return k(k(w, x, y, I), J, G, k(H, F, C, D));}else{throw ("rebalance");return null;};}else{return k(k(w, x, y, E), F, C, D);};}else{throw ("rebalance");return null;};}else{if ((A > (B + 2))) {if ((w.Tag == 2.000000)) {var K = w.Item2;var L = w.Item4;var M = w.Item3;var N = w.Item1;if ((i(L) > (B + 1))) {if ((L.Tag == 2.000000)) {var O = L.Item2;var P = L.Item4;var Q = L.Item3;var R = L.Item1;return k(k(M, N, K, Q), R, O, k(P, x, y, z));}else{throw ("re balance");return null;};}else{return k(M, N, K, k(L, x, y, z));};}else{throw ("rebalance");return null;};}else{return k(w, x, y, z);};};});m = (function(w,x,y){if ((y.Tag == 1.000000)) {var z = y.Item1;var A = w.Compare(x, z);if ((A == 0)) {return (new o());}else{return y;};}else{if ((y.Tag == 2.000000)) {var B = y.Item2;var C = y.Item4;var D = y.Item3;var E = y.Item1;var F = w.Compare(x, E);if ((F < 0)) {return l(m(w, x, D), E, B, C);}else{if ((F == 0)) {var G = (new v(D, C));if ((G.Items[0.000000].Tag == 0.000000)) {return C;}else{if ((G.Items[1.000000].Tag == 0.000000)) {return D;}else{var H = n(C);var I = H.Items[1.000000];var J = H.Items[0.000000];var K = H.Items[2.000000];return k(D, J, I, K);};};}else{return l(D, E, B, m(w, x, C));};};}else{return h();};};});n = (function(w){if ((w.Tag == 1.000000)) {var x = w.Item2;var y = w.Item1;return (new u(y, x, (new o())));}else{if ((w.Tag == 2.000000)) {var z = w.Item2;var A = w.Item4;var B = w.Item3;var C = w.Item1;if ((B.Tag == 0.000000)) {return (new u(C, z, A));}else{var D = n(B);var E = D.Items[1.000000];var F = D.Items[2.000000];var G = D.Items[0.000000];return (new u(G, E, k(F, C, z, A)));};}else{throw ("internal error: Map.spliceOutSuccessor");return null;};};});o = (function(){var w = this;w.Tag = 0.000000;w._CaseName = "MapEmpty";});p = (function(Item1,Item2,Item3,Item4,Item5){var B = this;B.Tag = 2.000000;B._CaseName = "MapNode";B.Item1 = Item1;B.Item2 = Item2;B.Item3 = Item3;B.Item4 = Item4;B.Item5 = Item5;});q = (function(Item1,Item2){var y = this;y.Tag = 1.000000;y._CaseName = "MapOne";y.Item1 = Item1;y.Item2 = Item2;});r = (function(w,x,y){return b(y, w, x);});s = (function(){return e();});t = (function(w,x){return c(x, w);});u = (function(Item0,Item1,Item2){var z = this;z.Items = [Item0, Item1, Item2];});v = (function(Item0,Item1){var y = this;y.Items = [Item0, Item1];});var w = 1;var x = 1;var y = t(1, (function(z){return r(w, x, z);})(s()));return a(y) | |
***** FunScript.Tests.Maps.Map.Remove works | |
// Code: | |
var C, B, A, z, y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(D,E){return (new b(D.comparer_386, q(D.comparer_386, E, D.tree_390)));});b = (function(D,E){var F = this;{};F.comparer_386 = D;F.tree_390 = E;});c = (function(D,E){return l(D.tree_390);});d = (function(D,E,F){return (new e(D.comparer_386, h(D.comparer_386, E, F, D.tree_390)));});e = (function(D,E){var F = this;{};F.comparer_386 = D;F.tree_390 = E;});f = (function(D){var E = (new g());var F;F = E;return (new e({Compare: (function(G,H){return (function(I,G,H){return (G < H ? -1 : (G == H ? 0 : 1));})(F, G, H);})}, (new v())));});g = (function(D){{};});h = (function(D,E,F,G){if ((G.Tag == 1.000000)) {var H = G.Item1;var I = D.Compare(E, H);if ((I < 0)) {return (new w(E, F, (new v()), G, 2));}else{if ((I == 0)) {return (new x(E, F));}else{return (new w(E, F, G, (new v()), 2));};};}else{if ((G.Tag == 2.000000)) {var J = G.Item2;var K = G.Item4;var L = G.Item3;var M = G.Item1;var N = G.Item5;var O = D.Compare(E, M);if ((O < 0)) {return p(h(D, E, F, L), M, J, K);}else{if ((O == 0)) {return (new w(E, F, L, K, N));}else{return p(L, M, J, h(D, E, F, K));};};}else{return (new x(E, F));};};});i = (function(){return (new s());});j = (function(D){if ((D.Tag == 1.000000)) {return 1;}else{if ((D.Tag == 2.000000)) {var E = D.Item5;return E;}else{return 0;};};});k = (function(D){if ((D.Tag == 1.000000)) {return 1;}else{if ((D.Tag == 2.000000)) {var E = D.Item5;return E;}else{return 0;};};});l = (function(D){return ((D.Tag == 0.000000) && true);});m = (function(D,E,F,G){var H = (new B(D, G));if ((H.Items[0.000000].Tag == 0.000000)) {if ((H.Items[1.000000].Tag == 0.000000)) {return (new u(E, F));}else{var I = j(D);var J = j(G);var K;if ((I < J)) {K = J;}else{K = I;};var L = K;return (new t(E, F, D, G, (L + 1)));};}else{var M = j(D);var N = j(G);var O;if ((M < N)) {O = N;}else{O = M;};var P = O;return (new t(E, F, D, G, (P + 1)));};});n = (function(D,E,F,G){var H = (new C(D, G));if ((H.Items[0.000000].Tag == 0.000000)) {if ((H.Items[1.000000].Tag == 0.000000)) {return (new x(E, F));}else{var I = k(D);var J = k(G);var K;if ((I < J)) {K = J;}else{K = I;};var L = K;return (new w(E, F, D, G, (L + 1)));};}else{var M = k(D);var N = k(G);var O;if ((M < N)) {O = N;}else{O = M;};var P = O;return (new w(E, F, D, G, (P + 1)));};});o = (function(D,E,F,G){var H = j(D);var I = j(G);if ((I > (H + 2))) {if ((G.Tag == 2.000000)) {var J = G.Item2;var K = G.Item4;var L = G.Item3;var M = G.Item1;if ((j(L) > (H + 1))) {if ((L.Tag == 2.000000)) {var N = L.Item2;var O = L.Item4;var P = L.Item3;var Q = L.Item1;return m(m(D, E, F, P), Q, N, m(O, M, J, K));}else{throw ("rebalance");return null;};}else{return m(m(D, E, F, L), M, J, K);};}else{throw ("rebalance");return null;};}else{if ((H > (I + 2))) {if ((D.Tag == 2.000000)) {var R = D.Item2;var S = D.Item4;var T = D.Item3;var U = D.Item1;if ((j(S) > (I + 1))) {if ((S.Tag == 2.000000)) {var V = S.Item2;var W = S.Item4;var X = S.Item3;var Y = S.Item1;return m(m(T, U, R, X), Y, V, m(W, E, F, G));}else{throw ("re balance");return null;};}else{return m(T, U, R, m(S, E, F, G));};}else{throw ("rebalance");return null;};}else{return m(D, E, F, G);};};});p = (function(D,E,F,G){var H = k(D);var I = k(G);if ((I > (H + 2))) {if ((G.Tag == 2.000000)) {var J = G.Item2;var K = G.Item4;var L = G.Item3;var M = G.Item1;if ((k(L) > (H + 1))) {if ((L.Tag == 2.000000)) {var N = L.Item2;var O = L.Item4;var P = L.Item3;var Q = L.Item1;return n(n(D, E, F, P), Q, N, n(O, M, J, K));}else{throw ("rebalance");return null;};}else{return n(n(D, E, F, L), M, J, K);};}else{throw ("rebalance");return null;};}else{if ((H > (I + 2))) {if ((D.Tag == 2.000000)) {var R = D.Item2;var S = D.Item4;var T = D.Item3;var U = D.Item1;if ((k(S) > (I + 1))) {if ((S.Tag == 2.000000)) {var V = S.Item2;var W = S.Item4;var X = S.Item3;var Y = S.Item1;return n(n(T, U, R, X), Y, V, n(W, E, F, G));}else{throw ("re balance");return null;};}else{return n(T, U, R, n(S, E, F, G));};}else{throw ("rebalance");return null;};}else{return n(D, E, F, G);};};});q = (function(D,E,F){if ((F.Tag == 1.000000)) {var G = F.Item1;var H = D.Compare(E, G);if ((H == 0)) {return (new s());}else{return F;};}else{if ((F.Tag == 2.000000)) {var I = F.Item2;var J = F.Item4;var K = F.Item3;var L = F.Item1;var M = D.Compare(E, L);if ((M < 0)) {return o(q(D, E, K), L, I, J);}else{if ((M == 0)) {var N = (new B(K, J));if ((N.Items[0.000000].Tag == 0.000000)) {return J;}else{if ((N.Items[1.000000].Tag == 0.000000)) {return K;}else{var O = r(J);var P = O.Items[1.000000];var Q = O.Items[0.000000];var R = O.Items[2.000000];return m(K, Q, P, R);};};}else{return o(K, L, I, q(D, E, J));};};}else{return i();};};});r = (function(D){if ((D.Tag == 1.000000)) {var E = D.Item2;var F = D.Item1;return (new A(F, E, (new s())));}else{if ((D.Tag == 2.000000)) {var G = D.Item2;var H = D.Item4;var I = D.Item3;var J = D.Item1;if ((I.Tag == 0.000000)) {return (new A(J, G, H));}else{var K = r(I);var L = K.Items[1.000000];var M = K.Items[2.000000];var N = K.Items[0.000000];return (new A(N, L, m(M, J, G, H)));};}else{throw ("internal error: Map.spliceOutSuccessor");return null;};};});s = (function(){var D = this;D.Tag = 0.000000;D._CaseName = "MapEmpty";});t = (function(Item1,Item2,Item3,Item4,Item5){var I = this;I.Tag = 2.000000;I._CaseName = "MapNode";I.Item1 = Item1;I.Item2 = Item2;I.Item3 = Item3;I.Item4 = Item4;I.Item5 = Item5;});u = (function(Item1,Item2){var F = this;F.Tag = 1.000000;F._CaseName = "MapOne";F.Item1 = Item1;F.Item2 = Item2;});v = (function(){var D = this;D.Tag = 0.000000;D._CaseName = "MapEmpty";});w = (function(Item1,Item2,Item3,Item4,Item5){var I = this;I.Tag = 2.000000;I._CaseName = "MapNode";I.Item1 = Item1;I.Item2 = Item2;I.Item3 = Item3;I.Item4 = Item4;I.Item5 = Item5;});x = (function(Item1,Item2){var F = this;F.Tag = 1.000000;F._CaseName = "MapOne";F.Item1 = Item1;F.Item2 = Item2;});y = (function(D,E,F){return d(F, D, E);});z = (function(){return f();});A = (function(Item0,Item1,Item2){var G = this;G.Items = [Item0, Item1, Item2];});B = (function(Item0,Item1){var F = this;F.Items = [Item0, Item1];});C = (function(Item0,Item1){var F = this;F.Items = [Item0, Item1];});var D = 1;var E = 1;var F = a((function(G){return y(D, E, G);})(z()), 1);return c(F) | |
***** FunScript.Tests.Maps.Map.toArray works | |
***** FunScript.Tests.Maps.Map.toList works | |
// Code: | |
var D, C, B, A, z, y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(E){return (function(F){var G = (E.Tag == 0.000000);var H = (F.Tag == 0.000000);if ((G && H)) {return 0;}else{if (G) {return -1;}else{if (H) {return 1;}else{var I = (E.Tag == 1.000000);var J = (F.Tag == 1.000000);if ((I && J)) {var K = B(k(E))(k(F));if ((K != 0)) {return K;}else{var L = a(l(E))(l(F));if ((L != 0)) {return L;}else{return 0;};};}else{if (I) {return -1;}else{if (J) {return 1;}else{throw ("Unknown union case");return null;};};};};};};});});b = (function(E,F){return t(E.tree_390);});c = (function(E,F){var G = this;{};G.comparer_386 = E;G.tree_390 = F;});d = (function(E){var F = (new e());var G;G = F;var H;H = F;return (new c({Compare: (function(I,J){return (function(K,I,J){return (I < J ? -1 : (I == J ? 0 : 1));})(G, I, J);})}, r({Compare: (function(I,J){return (function(K,I,J){return (I < J ? -1 : (I == J ? 0 : 1));})(H, I, J);})}, E)));});e = (function(E){{};});f = (function(E,F){return (new C(E, F));});g = (function(){return (new D());});h = (function(E,F,G){return i((function(H){return (function(I){return (function(J){return E(I)(J);});});}), F, G);});i = (function(E,F,G){return j(E, 0, F, G);});j = (function(E,F,G,H){if ((H.Tag == 1.000000)) {var I = H.Item2;var J = H.Item1;return j(E, (F + 1), E(F)(G)(J), I);}else{return G;};});k = (function(E){if ((E.Tag == 1.000000)) {var F = E.Item2;var G = E.Item1;return G;}else{throw ("List was empty");return null;};});l = (function(E){if ((E.Tag == 1.000000)) {var F = E.Item2;var G = E.Item1;return F;}else{throw ("List was empty");return null;};});m = (function(E,F,G,H){if ((H.Tag == 1.000000)) {var I = H.Item1;var J = E.Compare(F, I);if ((J < 0)) {return (new v(F, G, (new u()), H, 2));}else{if ((J == 0)) {return (new w(F, G));}else{return (new v(F, G, H, (new u()), 2));};};}else{if ((H.Tag == 2.000000)) {var K = H.Item2;var L = H.Item4;var M = H.Item3;var N = H.Item1;var O = H.Item5;var P = E.Compare(F, N);if ((P < 0)) {return s(m(E, F, G, M), N, K, L);}else{if ((P == 0)) {return (new v(F, G, M, L, O));}else{return s(M, N, K, m(E, F, G, L));};};}else{return (new w(F, G));};};});n = (function(){return (new u());});o = (function(E){if ((E.Tag == 1.000000)) {return 1;}else{if ((E.Tag == 2.000000)) {var F = E.Item5;return F;}else{return 0;};};});p = (function(E,F){if ((E.Tag == 1.000000)) {var G = E.Item2;var H = E.Item1;return f((new z(H, G)), F);}else{if ((E.Tag == 2.000000)) {var I = E.Item2;var J = E.Item4;var K = E.Item3;var L = E.Item1;return p(K, f((new z(L, I)), p(J, F)));}else{return F;};};});q = (function(E,F,G,H){var I = (new A(E, H));if ((I.Items[0.000000].Tag == 0.000000)) {if ((I.Items[1.000000].Tag == 0.000000)) {return (new w(F, G));}else{var J = o(E);var K = o(H);var L;if ((J < K)) {L = K;}else{L = J;};var M = L;return (new v(F, G, E, H, (M + 1)));};}else{var N = o(E);var O = o(H);var P;if ((N < O)) {P = O;}else{P = N;};var Q = P;return (new v(F, G, E, H, (Q + 1)));};});r = (function(E,F){return h((function(G){return (function(H){var I = H.Items[0.000000];var J = H.Items[1.000000];return m(E, I, J, G);});}), n(), F);});s = (function(E,F,G,H){var I = o(E);var J = o(H);if ((J > (I + 2))) {if ((H.Tag == 2.000000)) {var K = H.Item2;var L = H.Item4;var M = H.Item3;var N = H.Item1;if ((o(M) > (I + 1))) {if ((M.Tag == 2.000000)) {var O = M.Item2;var P = M.Item4;var Q = M.Item3;var R = M.Item1;return q(q(E, F, G, Q), R, O, q(P, N, K, L));}else{throw ("rebalance");return null;};}else{return q(q(E, F, G, M), N, K, L);};}else{throw ("rebalance");return null;};}else{if ((I > (J + 2))) {if ((E.Tag == 2.000000)) {var S = E.Item2;var T = E.Item4;var U = E.Item3;var V = E.Item1;if ((o(T) > (J + 1))) {if ((T.Tag == 2.000000)) {var W = T.Item2;var X = T.Item4;var Y = T.Item3;var Z = T.Item1;return q(q(U, V, S, Y), Z, W, q(X, F, G, H));}else{throw ("re balance");return null;};}else{return q(U, V, S, q(T, F, G, H));};}else{throw ("rebalance");return null;};}else{return q(E, F, G, H);};};});t = (function(E){return p(E, g());});u = (function(){var E = this;E.Tag = 0.000000;E._CaseName = "MapEmpty";});v = (function(Item1,Item2,Item3,Item4,Item5){var J = this;J.Tag = 2.000000;J._CaseName = "MapNode";J.Item1 = Item1;J.Item2 = Item2;J.Item3 = Item3;J.Item4 = Item4;J.Item5 = Item5;});w = (function(Item1,Item2){var G = this;G.Tag = 1.000000;G._CaseName = "MapOne";G.Item1 = Item1;G.Item2 = Item2;});x = (function(E){return d(E);});y = (function(E){return b(E);});z = (function(Item0,Item1){var G = this;G.Items = [Item0, Item1];});A = (function(Item0,Item1){var G = this;G.Items = [Item0, Item1];});B = (function(E){return (function(F){var G = (E.Items[0.000000] < F.Items[0.000000] ? -1 : (E.Items[0.000000] == F.Items[0.000000] ? 0 : 1));if ((G != 0)) {return G;}else{var H = (E.Items[1.000000] < F.Items[1.000000] ? -1 : (E.Items[1.000000] == F.Items[1.000000] ? 0 : 1));if ((H != 0)) {return H;}else{return 0;};};});});C = (function(Item1,Item2){var G = this;G.Tag = 1.000000;G._CaseName = "Cons";G.Item1 = Item1;G.Item2 = Item2;});D = (function(){var E = this;E.Tag = 0.000000;E._CaseName = "Nil";});var E = f((new z(1, 1.000000)), f((new z(2, 4.000000)), f((new z(3, 9.000000)), f((new z(4, 16.000000)), g()))));var F = x(E);var G = y(F);return (a(E)(G) == 0) | |
***** FunScript.Tests.Maps.Map.toSeq works | |
// Code: | |
var hb, gb, fb, eb, db, cb, bb, ab, _, Z, Y, X, W, V, U, T, S, R, Q, P, O, N, M, L, K, J, I, H, G, F, E, D, C, B, A, z, y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(ib){var jb = this;{};jb.factory = ib;});b = (function(ib){var jb = (new d());var kb;kb = jb;var lb;lb = jb;return (new c({Compare: (function(mb,nb){return (function(ob,mb,nb){return (mb < nb ? -1 : (mb == nb ? 0 : 1));})(kb, mb, nb);})}, D({Compare: (function(mb,nb){return (function(ob,mb,nb){return (mb < nb ? -1 : (mb == nb ? 0 : 1));})(lb, mb, nb);})}, ib)));});c = (function(ib,jb){var kb = this;{};kb.comparer_386 = ib;kb.tree_390 = jb;});d = (function(ib){{};});e = (function(ib,jb){var kb = this;{};kb.key = ib;kb.value = jb;});f = (function(ib,jb){return ib.key;});g = (function(ib,jb){return ib.value;});h = (function(ib,jb){return (new db(ib, jb));});i = (function(ib,jb){return (new fb(ib, jb));});j = (function(){return (new eb());});k = (function(){return (new gb());});l = (function(ib){if ((ib.Tag == 1.000000)) {var jb = ib.Item2;var kb = ib.Item1;return kb;}else{throw ("List was empty");return null;};});m = (function(ib){if ((ib.Tag == 1.000000)) {var jb = ib.Item2;var kb = ib.Item1;return kb;}else{throw ("List was empty");return null;};});n = (function(ib){return ((ib.Tag == 0.000000) && true);});o = (function(ib){if ((ib.Tag == 1.000000)) {var jb = ib.Item2;var kb = ib.Item1;return jb;}else{throw ("List was empty");return null;};});p = (function(ib){if ((ib.Tag == 1.000000)) {var jb = ib.Item2;var kb = ib.Item1;return jb;}else{throw ("List was empty");return null;};});q = (function(ib,jb){var kb = this;kb.stack = ib;kb.started = jb;});r = (function(ib,jb,kb,lb){if ((lb.Tag == 1.000000)) {var mb = lb.Item1;var nb = ib.Compare(jb, mb);if ((nb < 0)) {return (new G(jb, kb, (new F()), lb, 2));}else{if ((nb == 0)) {return (new H(jb, kb));}else{return (new G(jb, kb, lb, (new F()), 2));};};}else{if ((lb.Tag == 2.000000)) {var ob = lb.Item2;var pb = lb.Item4;var qb = lb.Item3;var rb = lb.Item1;var sb = lb.Item5;var tb = ib.Compare(jb, rb);if ((tb < 0)) {return E(r(ib, jb, kb, qb), rb, ob, pb);}else{if ((tb == 0)) {return (new G(jb, kb, qb, pb, sb));}else{return E(qb, rb, ob, r(ib, jb, kb, pb));};};}else{return (new H(jb, kb));};};});s = (function(ib){throw ("enumeration already finished");return null;});t = (function(ib){if ((ib.Tag == 1.000000)) {if ((l(ib).Tag == 1.000000)) {return ib;}else{if ((l(ib).Tag == 2.000000)) {var jb = l(ib).Item1;var kb = l(ib).Item3;var lb = l(ib).Item4;var mb = o(ib);var nb = l(ib).Item2;return t(h(kb, h((new H(jb, nb)), h(lb, mb))));}else{var ob = o(ib);return t(ob);};};}else{return j();};});u = (function(ib){if (ib.started) {var jb = ib.stack;if ((jb.Tag == 0.000000)) {return s();}else{if ((l(jb).Tag == 1.000000)) {var kb = l(jb).Item1;var lb = l(jb).Item2;return (new e(kb, lb));}else{throw ("Please report error: Map iterator, unexpected stack for current");return null;};};}else{return C();};});v = (function(){return (new F());});w = (function(ib){if ((ib.Tag == 1.000000)) {return 1;}else{if ((ib.Tag == 2.000000)) {var jb = ib.Item5;return jb;}else{return 0;};};});x = (function(ib,jb,kb,lb){var mb = (new Z(ib, lb));if ((mb.Items[0.000000].Tag == 0.000000)) {if ((mb.Items[1.000000].Tag == 0.000000)) {return (new H(jb, kb));}else{var nb = w(ib);var ob = w(lb);var pb;if ((nb < ob)) {pb = ob;}else{pb = nb;};var qb = pb;return (new G(jb, kb, ib, lb, (qb + 1)));};}else{var rb = w(ib);var sb = w(lb);var tb;if ((rb < sb)) {tb = sb;}else{tb = rb;};var ub = tb;return (new G(jb, kb, ib, lb, (ub + 1)));};});y = (function(ib,jb,kb){if (kb.MoveNext()) {var lb = kb.get_Current();var mb = lb.Items[1.000000];var nb = lb.Items[0.000000];return y(ib, r(ib, nb, mb, jb), kb);}else{return jb;};});z = (function(ib){var jb;jb = (new hb(ib));return {get_Current: (function(kb){return (function(lb,kb){return u(lb.i.contents);})(jb, kb);}), MoveNext: (function(kb){return (function(lb,kb){return B(lb.i.contents);})(jb, kb);}), Reset: (function(kb){return (function(lb,kb){lb.i.contents = A(lb.s);})(jb, kb);}), Dispose: (function(kb){return (function(lb,kb){;})(jb, kb);})};});A = (function(ib){return (new q(t(h(ib, j())), false));});B = (function(ib){if (ib.started) {var jb = ib.stack;if ((jb.Tag == 0.000000)) {return false;}else{if ((l(jb).Tag == 1.000000)) {var kb = o(jb);ib.stack = t(kb);null;return (!n(ib.stack));}else{throw ("Please report error: Map iterator, unexpected stack for moveNext");return null;};};}else{ib.started = true;null;return (!n(ib.stack));};});C = (function(ib){throw ("enumeration not started");return null;});D = (function(ib,jb){var kb = jb.GetEnumerator();try{return y(ib, v(), kb);}finally{if (false) {kb.Dispose();}else{;};};});E = (function(ib,jb,kb,lb){var mb = w(ib);var nb = w(lb);if ((nb > (mb + 2))) {if ((lb.Tag == 2.000000)) {var ob = lb.Item2;var pb = lb.Item4;var qb = lb.Item3;var rb = lb.Item1;if ((w(qb) > (mb + 1))) {if ((qb.Tag == 2.000000)) {var sb = qb.Item2;var tb = qb.Item4;var ub = qb.Item3;var vb = qb.Item1;return x(x(ib, jb, kb, ub), vb, sb, x(tb, rb, ob, pb));}else{throw ("rebalance");return null;};}else{return x(x(ib, jb, kb, qb), rb, ob, pb);};}else{throw ("rebalance");return null;};}else{if ((mb > (nb + 2))) {if ((ib.Tag == 2.000000)) {var wb = ib.Item2;var xb = ib.Item4;var yb = ib.Item3;var zb = ib.Item1;if ((w(xb) > (nb + 1))) {if ((xb.Tag == 2.000000)) {var Ab = xb.Item2;var Bb = xb.Item4;var Cb = xb.Item3;var Db = xb.Item1;return x(x(yb, zb, wb, Cb), Db, Ab, x(Bb, jb, kb, lb));}else{throw ("re balance");return null;};}else{return x(yb, zb, wb, x(xb, jb, kb, lb));};}else{throw ("rebalance");return null;};}else{return x(ib, jb, kb, lb);};};});F = (function(){var ib = this;ib.Tag = 0.000000;ib._CaseName = "MapEmpty";});G = (function(Item1,Item2,Item3,Item4,Item5){var nb = this;nb.Tag = 2.000000;nb._CaseName = "MapNode";nb.Item1 = Item1;nb.Item2 = Item2;nb.Item3 = Item3;nb.Item4 = Item4;nb.Item5 = Item5;});H = (function(Item1,Item2){var kb = this;kb.Tag = 1.000000;kb._CaseName = "MapOne";kb.Item1 = Item1;kb.Item2 = Item2;});I = (function(ib){return b(ib);});J = (function(ib){var jb;jb = ib;return U((function(kb){return (new Y(f(kb), g(kb)));}), {GetEnumerator: (function(kb){return (function(lb,kb){return z(lb.tree_390);})(jb, kb);})});});K = (function(ib){return ib.Value;;});L = (function(ib){return ib.Value;;});M = (function(ib){return ib.Value;;});N = (function(ib){return ib.Value;;});O = (function(ib){return ((ib.Tag == 1.000000) && true);});P = (function(ib){return ((ib.Tag == 1.000000) && true);});Q = (function(ib){return T((function(jb){var kb;return S(ib(kb));}));});R = (function(ib){return ib.GetEnumerator();});S = (function(ib){return ib.GetEnumerator();});T = (function(ib){var jb;jb = (new a(ib));return {GetEnumerator: (function(kb){return (function(lb,kb){var mb;return lb.factory(mb);})(jb, kb);})};});U = (function(ib,jb){return Q((function(kb){return X((function(lb){if (lb.MoveNext()) {return {Tag: 1.000000, Value: (new ab(ib(lb.get_Current()), lb))};}else{return {Tag: 0.000000};};}), R(jb));}));});V = (function(ib){return W((function(jb){if ((jb.Tag == 1.000000)) {var kb = p(jb);var lb = m(jb);return {Tag: 1.000000, Value: (new _(lb, kb))};}else{return {Tag: 0.000000};};}), ib);});W = (function(ib,jb){return T((function(kb){var lb;lb = (new bb(jb, ib));return {get_Current: (function(mb){return (function(nb,mb){return nb.current;})(lb, mb);}), MoveNext: (function(mb){return (function(nb,mb){var ob = (function(pb){var qb = K(nb.acc);var rb = nb.unfold(qb);if ((rb.Tag == 1.000000)) {var sb = M(rb).Items[0.000000];var tb = M(rb).Items[1.000000];nb.acc = {Tag: 1.000000, Value: tb};nb.current = sb;return true;}else{nb.acc = {Tag: 0.000000};nb.current = null;return false;};});return (O(nb.acc) && (function(){var pb;return ob(pb);})());})(lb, mb);}), Reset: (function(mb){return (function(nb,mb){nb.acc = {Tag: 1.000000, Value: nb.seed};nb.current = null;})(lb, mb);}), Dispose: (function(mb){return (function(nb,mb){;})(lb, mb);})};}));});X = (function(ib,jb){return T((function(kb){var lb;lb = (new cb(jb, ib));return {get_Current: (function(mb){return (function(nb,mb){return nb.current;})(lb, mb);}), MoveNext: (function(mb){return (function(nb,mb){var ob = (function(pb){var qb = L(nb.acc);var rb = nb.unfold(qb);if ((rb.Tag == 1.000000)) {var sb = N(rb).Items[0.000000];var tb = N(rb).Items[1.000000];nb.acc = {Tag: 1.000000, Value: tb};nb.current = sb;return true;}else{nb.acc = {Tag: 0.000000};nb.current = null;return false;};});return (P(nb.acc) && (function(){var pb;return ob(pb);})());})(lb, mb);}), Reset: (function(mb){return (function(nb,mb){nb.acc = {Tag: 1.000000, Value: nb.seed};nb.current = null;})(lb, mb);}), Dispose: (function(mb){return (function(nb,mb){;})(lb, mb);})};}));});Y = (function(Item0,Item1){var kb = this;kb.Items = [Item0, Item1];});Z = (function(Item0,Item1){var kb = this;kb.Items = [Item0, Item1];});_ = (function(Item0,Item1){var kb = this;kb.Items = [Item0, Item1];});ab = (function(Item0,Item1){var kb = this;kb.Items = [Item0, Item1];});bb = (function(ib,jb){var kb = this;{};kb.seed = ib;kb.unfold = jb;kb.acc = {Tag: 1.000000, Value: kb.seed};kb.current = null;});cb = (function(ib,jb){var kb = this;{};kb.seed = ib;kb.unfold = jb;kb.acc = {Tag: 1.000000, Value: kb.seed};kb.current = null;});db = (function(Item1,Item2){var kb = this;kb.Tag = 1.000000;kb._CaseName = "Cons";kb.Item1 = Item1;kb.Item2 = Item2;});eb = (function(){var ib = this;ib.Tag = 0.000000;ib._CaseName = "Nil";});fb = (function(Item1,Item2){var kb = this;kb.Tag = 1.000000;kb._CaseName = "Cons";kb.Item1 = Item1;kb.Item2 = Item2;});gb = (function(){var ib = this;ib.Tag = 0.000000;ib._CaseName = "Nil";});hb = (function(ib){var jb = this;{};jb.s = ib;jb.i = {contents: A(jb.s)};});var ib = V(i((new Y(1, 1.000000)), i((new Y(2, 4.000000)), i((new Y(3, 9.000000)), i((new Y(4, 16.000000)), k())))));var jb = I(ib);var kb = J(jb) | |
***** FunScript.Tests.Maps.Map.tryFind works | |
// Code: | |
var J, I, H, G, F, E, D, C, B, A, z, y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(K){var L = this;{};L.factory = K;});b = (function(K){var L = (new e());var M;M = L;var N;N = L;return (new d({Compare: (function(O,P){return (function(Q,O,P){return (O < P ? -1 : (O == P ? 0 : 1));})(M, O, P);})}, o({Compare: (function(O,P){return (function(Q,O,P){return (O < P ? -1 : (O == P ? 0 : 1));})(N, O, P);})}, K)));});c = (function(K,L){return q(K.comparer_386, L, K.tree_390);});d = (function(K,L){var M = this;{};M.comparer_386 = K;M.tree_390 = L;});e = (function(K){{};});f = (function(K,L){return (new I(K, L));});g = (function(){return (new J());});h = (function(K){if ((K.Tag == 1.000000)) {var L = K.Item2;var M = K.Item1;return M;}else{throw ("List was empty");return null;};});i = (function(K){if ((K.Tag == 1.000000)) {var L = K.Item2;var M = K.Item1;return L;}else{throw ("List was empty");return null;};});j = (function(K,L,M,N){if ((N.Tag == 1.000000)) {var O = N.Item1;var P = K.Compare(L, O);if ((P < 0)) {return (new s(L, M, (new r()), N, 2));}else{if ((P == 0)) {return (new t(L, M));}else{return (new s(L, M, N, (new r()), 2));};};}else{if ((N.Tag == 2.000000)) {var Q = N.Item2;var R = N.Item4;var S = N.Item3;var T = N.Item1;var U = N.Item5;var V = K.Compare(L, T);if ((V < 0)) {return p(j(K, L, M, S), T, Q, R);}else{if ((V == 0)) {return (new s(L, M, S, R, U));}else{return p(S, T, Q, j(K, L, M, R));};};}else{return (new t(L, M));};};});k = (function(){return (new r());});l = (function(K){if ((K.Tag == 1.000000)) {return 1;}else{if ((K.Tag == 2.000000)) {var L = K.Item5;return L;}else{return 0;};};});m = (function(K,L,M,N){var O = (new F(K, N));if ((O.Items[0.000000].Tag == 0.000000)) {if ((O.Items[1.000000].Tag == 0.000000)) {return (new t(L, M));}else{var P = l(K);var Q = l(N);var R;if ((P < Q)) {R = Q;}else{R = P;};var S = R;return (new s(L, M, K, N, (S + 1)));};}else{var T = l(K);var U = l(N);var V;if ((T < U)) {V = U;}else{V = T;};var W = V;return (new s(L, M, K, N, (W + 1)));};});n = (function(K,L,M){if (M.MoveNext()) {var N = M.get_Current();var O = N.Items[1.000000];var P = N.Items[0.000000];return n(K, j(K, P, O, L), M);}else{return L;};});o = (function(K,L){var M = L.GetEnumerator();try{return n(K, k(), M);}finally{if (false) {M.Dispose();}else{;};};});p = (function(K,L,M,N){var O = l(K);var P = l(N);if ((P > (O + 2))) {if ((N.Tag == 2.000000)) {var Q = N.Item2;var R = N.Item4;var S = N.Item3;var T = N.Item1;if ((l(S) > (O + 1))) {if ((S.Tag == 2.000000)) {var U = S.Item2;var V = S.Item4;var W = S.Item3;var X = S.Item1;return m(m(K, L, M, W), X, U, m(V, T, Q, R));}else{throw ("rebalance");return null;};}else{return m(m(K, L, M, S), T, Q, R);};}else{throw ("rebalance");return null;};}else{if ((O > (P + 2))) {if ((K.Tag == 2.000000)) {var Y = K.Item2;var Z = K.Item4;var _ = K.Item3;var ab = K.Item1;if ((l(Z) > (P + 1))) {if ((Z.Tag == 2.000000)) {var bb = Z.Item2;var cb = Z.Item4;var db = Z.Item3;var eb = Z.Item1;return m(m(_, ab, Y, db), eb, bb, m(cb, L, M, N));}else{throw ("re balance");return null;};}else{return m(_, ab, Y, m(Z, L, M, N));};}else{throw ("rebalance");return null;};}else{return m(K, L, M, N);};};});q = (function(K,L,M){if ((M.Tag == 1.000000)) {var N = M.Item2;var O = M.Item1;var P = K.Compare(L, O);if ((P == 0)) {return {Tag: 1.000000, Value: N};}else{return {Tag: 0.000000};};}else{if ((M.Tag == 2.000000)) {var Q = M.Item2;var R = M.Item4;var S = M.Item3;var T = M.Item1;var U = K.Compare(L, T);if ((U < 0)) {return q(K, L, S);}else{if ((U == 0)) {return {Tag: 1.000000, Value: Q};}else{return q(K, L, R);};};}else{return {Tag: 0.000000};};};});r = (function(){var K = this;K.Tag = 0.000000;K._CaseName = "MapEmpty";});s = (function(Item1,Item2,Item3,Item4,Item5){var P = this;P.Tag = 2.000000;P._CaseName = "MapNode";P.Item1 = Item1;P.Item2 = Item2;P.Item3 = Item3;P.Item4 = Item4;P.Item5 = Item5;});t = (function(Item1,Item2){var M = this;M.Tag = 1.000000;M._CaseName = "MapOne";M.Item1 = Item1;M.Item2 = Item2;});u = (function(K){return b(K);});v = (function(K,L){return c(L, K);});w = (function(K){return K.Value;;});x = (function(K){return K.Value;;});y = (function(K){return (!z(K));});z = (function(K){return ((K.Tag == 1.000000) && true);});A = (function(K){return ((K.Tag == 1.000000) && true);});B = (function(K){var L;L = (new a(K));return {GetEnumerator: (function(M){return (function(N,M){var O;return N.factory(O);})(L, M);})};});C = (function(K){return D((function(L){if ((L.Tag == 1.000000)) {var M = i(L);var N = h(L);return {Tag: 1.000000, Value: (new G(N, M))};}else{return {Tag: 0.000000};};}), K);});D = (function(K,L){return B((function(M){var N;N = (new H(L, K));return {get_Current: (function(O){return (function(P,O){return P.current;})(N, O);}), MoveNext: (function(O){return (function(P,O){var Q = (function(R){var S = w(P.acc);var T = P.unfold(S);if ((T.Tag == 1.000000)) {var U = x(T).Items[0.000000];var V = x(T).Items[1.000000];P.acc = {Tag: 1.000000, Value: V};P.current = U;return true;}else{P.acc = {Tag: 0.000000};P.current = null;return false;};});return (A(P.acc) && (function(){var R;return Q(R);})());})(N, O);}), Reset: (function(O){return (function(P,O){P.acc = {Tag: 1.000000, Value: P.seed};P.current = null;})(N, O);}), Dispose: (function(O){return (function(P,O){;})(N, O);})};}));});E = (function(Item0,Item1){var M = this;M.Items = [Item0, Item1];});F = (function(Item0,Item1){var M = this;M.Items = [Item0, Item1];});G = (function(Item0,Item1){var M = this;M.Items = [Item0, Item1];});H = (function(K,L){var M = this;{};M.seed = K;M.unfold = L;M.acc = {Tag: 1.000000, Value: M.seed};M.current = null;});I = (function(Item1,Item2){var M = this;M.Tag = 1.000000;M._CaseName = "Cons";M.Item1 = Item1;M.Item2 = Item2;});J = (function(){var K = this;K.Tag = 0.000000;K._CaseName = "Nil";});var K = u(C(f((new E(1, 1.000000)), f((new E(2, 4.000000)), f((new E(3, 9.000000)), f((new E(4, 16.000000)), g()))))));return y(v(0, K)) | |
***** FunScript.Tests.Maps.Map.TryFind works | |
// Code: | |
var H, G, F, E, D, C, B, A, z, y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(I){var J = this;{};J.factory = I;});b = (function(I,J){return q(I.comparer_386, J, I.tree_390);});c = (function(I){var J = (new e());var K;K = J;var L;L = J;return (new d({Compare: (function(M,N){return (function(O,M,N){return (M < N ? -1 : (M == N ? 0 : 1));})(K, M, N);})}, o({Compare: (function(M,N){return (function(O,M,N){return (M < N ? -1 : (M == N ? 0 : 1));})(L, M, N);})}, I)));});d = (function(I,J){var K = this;{};K.comparer_386 = I;K.tree_390 = J;});e = (function(I){{};});f = (function(I,J){return (new G(I, J));});g = (function(){return (new H());});h = (function(I){if ((I.Tag == 1.000000)) {var J = I.Item2;var K = I.Item1;return K;}else{throw ("List was empty");return null;};});i = (function(I){if ((I.Tag == 1.000000)) {var J = I.Item2;var K = I.Item1;return J;}else{throw ("List was empty");return null;};});j = (function(I,J,K,L){if ((L.Tag == 1.000000)) {var M = L.Item1;var N = I.Compare(J, M);if ((N < 0)) {return (new s(J, K, (new r()), L, 2));}else{if ((N == 0)) {return (new t(J, K));}else{return (new s(J, K, L, (new r()), 2));};};}else{if ((L.Tag == 2.000000)) {var O = L.Item2;var P = L.Item4;var Q = L.Item3;var R = L.Item1;var S = L.Item5;var T = I.Compare(J, R);if ((T < 0)) {return p(j(I, J, K, Q), R, O, P);}else{if ((T == 0)) {return (new s(J, K, Q, P, S));}else{return p(Q, R, O, j(I, J, K, P));};};}else{return (new t(J, K));};};});k = (function(){return (new r());});l = (function(I){if ((I.Tag == 1.000000)) {return 1;}else{if ((I.Tag == 2.000000)) {var J = I.Item5;return J;}else{return 0;};};});m = (function(I,J,K,L){var M = (new D(I, L));if ((M.Items[0.000000].Tag == 0.000000)) {if ((M.Items[1.000000].Tag == 0.000000)) {return (new t(J, K));}else{var N = l(I);var O = l(L);var P;if ((N < O)) {P = O;}else{P = N;};var Q = P;return (new s(J, K, I, L, (Q + 1)));};}else{var R = l(I);var S = l(L);var T;if ((R < S)) {T = S;}else{T = R;};var U = T;return (new s(J, K, I, L, (U + 1)));};});n = (function(I,J,K){if (K.MoveNext()) {var L = K.get_Current();var M = L.Items[1.000000];var N = L.Items[0.000000];return n(I, j(I, N, M, J), K);}else{return J;};});o = (function(I,J){var K = J.GetEnumerator();try{return n(I, k(), K);}finally{if (false) {K.Dispose();}else{;};};});p = (function(I,J,K,L){var M = l(I);var N = l(L);if ((N > (M + 2))) {if ((L.Tag == 2.000000)) {var O = L.Item2;var P = L.Item4;var Q = L.Item3;var R = L.Item1;if ((l(Q) > (M + 1))) {if ((Q.Tag == 2.000000)) {var S = Q.Item2;var T = Q.Item4;var U = Q.Item3;var V = Q.Item1;return m(m(I, J, K, U), V, S, m(T, R, O, P));}else{throw ("rebalance");return null;};}else{return m(m(I, J, K, Q), R, O, P);};}else{throw ("rebalance");return null;};}else{if ((M > (N + 2))) {if ((I.Tag == 2.000000)) {var W = I.Item2;var X = I.Item4;var Y = I.Item3;var Z = I.Item1;if ((l(X) > (N + 1))) {if ((X.Tag == 2.000000)) {var _ = X.Item2;var ab = X.Item4;var bb = X.Item3;var cb = X.Item1;return m(m(Y, Z, W, bb), cb, _, m(ab, J, K, L));}else{throw ("re balance");return null;};}else{return m(Y, Z, W, m(X, J, K, L));};}else{throw ("rebalance");return null;};}else{return m(I, J, K, L);};};});q = (function(I,J,K){if ((K.Tag == 1.000000)) {var L = K.Item2;var M = K.Item1;var N = I.Compare(J, M);if ((N == 0)) {return {Tag: 1.000000, Value: L};}else{return {Tag: 0.000000};};}else{if ((K.Tag == 2.000000)) {var O = K.Item2;var P = K.Item4;var Q = K.Item3;var R = K.Item1;var S = I.Compare(J, R);if ((S < 0)) {return q(I, J, Q);}else{if ((S == 0)) {return {Tag: 1.000000, Value: O};}else{return q(I, J, P);};};}else{return {Tag: 0.000000};};};});r = (function(){var I = this;I.Tag = 0.000000;I._CaseName = "MapEmpty";});s = (function(Item1,Item2,Item3,Item4,Item5){var N = this;N.Tag = 2.000000;N._CaseName = "MapNode";N.Item1 = Item1;N.Item2 = Item2;N.Item3 = Item3;N.Item4 = Item4;N.Item5 = Item5;});t = (function(Item1,Item2){var K = this;K.Tag = 1.000000;K._CaseName = "MapOne";K.Item1 = Item1;K.Item2 = Item2;});u = (function(I){return c(I);});v = (function(I){return I.Value;;});w = (function(I){return I.Value;;});x = (function(I){return ((I.Tag == 1.000000) && true);});y = (function(I){return ((I.Tag == 1.000000) && true);});z = (function(I){var J;J = (new a(I));return {GetEnumerator: (function(K){return (function(L,K){var M;return L.factory(M);})(J, K);})};});A = (function(I){return B((function(J){if ((J.Tag == 1.000000)) {var K = i(J);var L = h(J);return {Tag: 1.000000, Value: (new E(L, K))};}else{return {Tag: 0.000000};};}), I);});B = (function(I,J){return z((function(K){var L;L = (new F(J, I));return {get_Current: (function(M){return (function(N,M){return N.current;})(L, M);}), MoveNext: (function(M){return (function(N,M){var O = (function(P){var Q = v(N.acc);var R = N.unfold(Q);if ((R.Tag == 1.000000)) {var S = w(R).Items[0.000000];var T = w(R).Items[1.000000];N.acc = {Tag: 1.000000, Value: T};N.current = S;return true;}else{N.acc = {Tag: 0.000000};N.current = null;return false;};});return (y(N.acc) && (function(){var P;return O(P);})());})(L, M);}), Reset: (function(M){return (function(N,M){N.acc = {Tag: 1.000000, Value: N.seed};N.current = null;})(L, M);}), Dispose: (function(M){return (function(N,M){;})(L, M);})};}));});C = (function(Item0,Item1){var K = this;K.Items = [Item0, Item1];});D = (function(Item0,Item1){var K = this;K.Items = [Item0, Item1];});E = (function(Item0,Item1){var K = this;K.Items = [Item0, Item1];});F = (function(I,J){var K = this;{};K.seed = I;K.unfold = J;K.acc = {Tag: 1.000000, Value: K.seed};K.current = null;});G = (function(Item1,Item2){var K = this;K.Tag = 1.000000;K._CaseName = "Cons";K.Item1 = Item1;K.Item2 = Item2;});H = (function(){var I = this;I.Tag = 0.000000;I._CaseName = "Nil";});var I = u(A(f((new C(1, 1.000000)), f((new C(2, 4.000000)), f((new C(3, 9.000000)), f((new C(4, 16.000000)), g()))))));return x(b(I, 3)) | |
***** FunScript.Tests.Maps.Map.tryFindKey works | |
// Code: | |
var mb, lb, kb, jb, ib, hb, gb, fb, eb, db, cb, bb, ab, _, Z, Y, X, W, V, U, T, S, R, Q, P, O, N, M, L, K, J, I, H, G, F, E, D, C, B, A, z, y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(nb){var ob = this;{};ob.factory = nb;});b = (function(nb){var ob = (new d());var pb;pb = ob;var qb;qb = ob;return (new c({Compare: (function(rb,sb){return (function(tb,rb,sb){return (rb < sb ? -1 : (rb == sb ? 0 : 1));})(pb, rb, sb);})}, D({Compare: (function(rb,sb){return (function(tb,rb,sb){return (rb < sb ? -1 : (rb == sb ? 0 : 1));})(qb, rb, sb);})}, nb)));});c = (function(nb,ob){var pb = this;{};pb.comparer_386 = nb;pb.tree_390 = ob;});d = (function(nb){{};});e = (function(nb,ob){var pb = this;{};pb.key = nb;pb.value = ob;});f = (function(nb,ob){return nb.key;});g = (function(nb,ob){return nb.value;});h = (function(nb,ob){return (new ib(nb, ob));});i = (function(nb,ob){return (new kb(nb, ob));});j = (function(){return (new jb());});k = (function(){return (new lb());});l = (function(nb){if ((nb.Tag == 1.000000)) {var ob = nb.Item2;var pb = nb.Item1;return pb;}else{throw ("List was empty");return null;};});m = (function(nb){if ((nb.Tag == 1.000000)) {var ob = nb.Item2;var pb = nb.Item1;return pb;}else{throw ("List was empty");return null;};});n = (function(nb){return ((nb.Tag == 0.000000) && true);});o = (function(nb){if ((nb.Tag == 1.000000)) {var ob = nb.Item2;var pb = nb.Item1;return ob;}else{throw ("List was empty");return null;};});p = (function(nb){if ((nb.Tag == 1.000000)) {var ob = nb.Item2;var pb = nb.Item1;return ob;}else{throw ("List was empty");return null;};});q = (function(nb,ob){var pb = this;pb.stack = nb;pb.started = ob;});r = (function(nb,ob,pb,qb){if ((qb.Tag == 1.000000)) {var rb = qb.Item1;var sb = nb.Compare(ob, rb);if ((sb < 0)) {return (new G(ob, pb, (new F()), qb, 2));}else{if ((sb == 0)) {return (new H(ob, pb));}else{return (new G(ob, pb, qb, (new F()), 2));};};}else{if ((qb.Tag == 2.000000)) {var tb = qb.Item2;var ub = qb.Item4;var vb = qb.Item3;var wb = qb.Item1;var xb = qb.Item5;var yb = nb.Compare(ob, wb);if ((yb < 0)) {return E(r(nb, ob, pb, vb), wb, tb, ub);}else{if ((yb == 0)) {return (new G(ob, pb, vb, ub, xb));}else{return E(vb, wb, tb, r(nb, ob, pb, ub));};};}else{return (new H(ob, pb));};};});s = (function(nb){throw ("enumeration already finished");return null;});t = (function(nb){if ((nb.Tag == 1.000000)) {if ((l(nb).Tag == 1.000000)) {return nb;}else{if ((l(nb).Tag == 2.000000)) {var ob = l(nb).Item1;var pb = l(nb).Item3;var qb = l(nb).Item4;var rb = o(nb);var sb = l(nb).Item2;return t(h(pb, h((new H(ob, sb)), h(qb, rb))));}else{var tb = o(nb);return t(tb);};};}else{return j();};});u = (function(nb){if (nb.started) {var ob = nb.stack;if ((ob.Tag == 0.000000)) {return s();}else{if ((l(ob).Tag == 1.000000)) {var pb = l(ob).Item1;var qb = l(ob).Item2;return (new e(pb, qb));}else{throw ("Please report error: Map iterator, unexpected stack for current");return null;};};}else{return C();};});v = (function(){return (new F());});w = (function(nb){if ((nb.Tag == 1.000000)) {return 1;}else{if ((nb.Tag == 2.000000)) {var ob = nb.Item5;return ob;}else{return 0;};};});x = (function(nb,ob,pb,qb){var rb = (new db(nb, qb));if ((rb.Items[0.000000].Tag == 0.000000)) {if ((rb.Items[1.000000].Tag == 0.000000)) {return (new H(ob, pb));}else{var sb = w(nb);var tb = w(qb);var ub;if ((sb < tb)) {ub = tb;}else{ub = sb;};var vb = ub;return (new G(ob, pb, nb, qb, (vb + 1)));};}else{var wb = w(nb);var xb = w(qb);var yb;if ((wb < xb)) {yb = xb;}else{yb = wb;};var zb = yb;return (new G(ob, pb, nb, qb, (zb + 1)));};});y = (function(nb,ob,pb){if (pb.MoveNext()) {var qb = pb.get_Current();var rb = qb.Items[1.000000];var sb = qb.Items[0.000000];return y(nb, r(nb, sb, rb, ob), pb);}else{return ob;};});z = (function(nb){var ob;ob = (new mb(nb));return {get_Current: (function(pb){return (function(qb,pb){return u(qb.i.contents);})(ob, pb);}), MoveNext: (function(pb){return (function(qb,pb){return B(qb.i.contents);})(ob, pb);}), Reset: (function(pb){return (function(qb,pb){qb.i.contents = A(qb.s);})(ob, pb);}), Dispose: (function(pb){return (function(qb,pb){;})(ob, pb);})};});A = (function(nb){return (new q(t(h(nb, j())), false));});B = (function(nb){if (nb.started) {var ob = nb.stack;if ((ob.Tag == 0.000000)) {return false;}else{if ((l(ob).Tag == 1.000000)) {var pb = o(ob);nb.stack = t(pb);null;return (!n(nb.stack));}else{throw ("Please report error: Map iterator, unexpected stack for moveNext");return null;};};}else{nb.started = true;null;return (!n(nb.stack));};});C = (function(nb){throw ("enumeration not started");return null;});D = (function(nb,ob){var pb = ob.GetEnumerator();try{return y(nb, v(), pb);}finally{if (false) {pb.Dispose();}else{;};};});E = (function(nb,ob,pb,qb){var rb = w(nb);var sb = w(qb);if ((sb > (rb + 2))) {if ((qb.Tag == 2.000000)) {var tb = qb.Item2;var ub = qb.Item4;var vb = qb.Item3;var wb = qb.Item1;if ((w(vb) > (rb + 1))) {if ((vb.Tag == 2.000000)) {var xb = vb.Item2;var yb = vb.Item4;var zb = vb.Item3;var Ab = vb.Item1;return x(x(nb, ob, pb, zb), Ab, xb, x(yb, wb, tb, ub));}else{throw ("rebalance");return null;};}else{return x(x(nb, ob, pb, vb), wb, tb, ub);};}else{throw ("rebalance");return null;};}else{if ((rb > (sb + 2))) {if ((nb.Tag == 2.000000)) {var Bb = nb.Item2;var Cb = nb.Item4;var Db = nb.Item3;var Eb = nb.Item1;if ((w(Cb) > (sb + 1))) {if ((Cb.Tag == 2.000000)) {var Fb = Cb.Item2;var Gb = Cb.Item4;var Hb = Cb.Item3;var Ib = Cb.Item1;return x(x(Db, Eb, Bb, Hb), Ib, Fb, x(Gb, ob, pb, qb));}else{throw ("re balance");return null;};}else{return x(Db, Eb, Bb, x(Cb, ob, pb, qb));};}else{throw ("rebalance");return null;};}else{return x(nb, ob, pb, qb);};};});F = (function(){var nb = this;nb.Tag = 0.000000;nb._CaseName = "MapEmpty";});G = (function(Item1,Item2,Item3,Item4,Item5){var sb = this;sb.Tag = 2.000000;sb._CaseName = "MapNode";sb.Item1 = Item1;sb.Item2 = Item2;sb.Item3 = Item3;sb.Item4 = Item4;sb.Item5 = Item5;});H = (function(Item1,Item2){var pb = this;pb.Tag = 1.000000;pb._CaseName = "MapOne";pb.Item1 = Item1;pb.Item2 = Item2;});I = (function(nb){return b(nb);});J = (function(nb){var ob;ob = nb;return W((function(pb){return (new cb(f(pb), g(pb)));}), {GetEnumerator: (function(pb){return (function(qb,pb){return z(qb.tree_390);})(ob, pb);})});});K = (function(nb,ob){return Y((function(pb){var qb = pb.Items[0.000000];var rb = pb.Items[1.000000];if (nb(qb)(rb)) {return {Tag: 1.000000, Value: qb};}else{return {Tag: 0.000000};};}), J(ob));});L = (function(nb){return nb.Value;;});M = (function(nb){return nb.Value;;});N = (function(nb){return nb.Value;;});O = (function(nb){return nb.Value;;});P = (function(nb){return ((nb.Tag == 1.000000) && true);});Q = (function(nb){return ((nb.Tag == 1.000000) && true);});R = (function(nb){return ((nb.Tag == 1.000000) && true);});S = (function(nb){return V((function(ob){var pb;return U(nb(pb));}));});T = (function(nb){return nb.GetEnumerator();});U = (function(nb){return nb.GetEnumerator();});V = (function(nb){var ob;ob = (new a(nb));return {GetEnumerator: (function(pb){return (function(qb,pb){var rb;return qb.factory(rb);})(ob, pb);})};});W = (function(nb,ob){return S((function(pb){return bb((function(qb){if (qb.MoveNext()) {return {Tag: 1.000000, Value: (new fb(nb(qb.get_Current()), qb))};}else{return {Tag: 0.000000};};}), T(ob));}));});X = (function(nb){return ab((function(ob){if ((ob.Tag == 1.000000)) {var pb = p(ob);var qb = m(ob);return {Tag: 1.000000, Value: (new eb(qb, pb))};}else{return {Tag: 0.000000};};}), nb);});Y = (function(nb,ob){return Z((function(pb){return (function(qb){return nb(qb);});}), ob);});Z = (function(nb,ob){return _(nb, 0, U(ob));});_ = (function(nb,ob,pb){if (pb.MoveNext()) {var qb = nb(ob)(pb.get_Current());if ((qb.Tag == 0.000000)) {return _(nb, (ob + 1), pb);}else{return qb;};}else{return {Tag: 0.000000};};});ab = (function(nb,ob){return V((function(pb){var qb;qb = (new gb(ob, nb));return {get_Current: (function(rb){return (function(sb,rb){return sb.current;})(qb, rb);}), MoveNext: (function(rb){return (function(sb,rb){var tb = (function(ub){var vb = L(sb.acc);var wb = sb.unfold(vb);if ((wb.Tag == 1.000000)) {var xb = N(wb).Items[0.000000];var yb = N(wb).Items[1.000000];sb.acc = {Tag: 1.000000, Value: yb};sb.current = xb;return true;}else{sb.acc = {Tag: 0.000000};sb.current = null;return false;};});return (P(sb.acc) && (function(){var ub;return tb(ub);})());})(qb, rb);}), Reset: (function(rb){return (function(sb,rb){sb.acc = {Tag: 1.000000, Value: sb.seed};sb.current = null;})(qb, rb);}), Dispose: (function(rb){return (function(sb,rb){;})(qb, rb);})};}));});bb = (function(nb,ob){return V((function(pb){var qb;qb = (new hb(ob, nb));return {get_Current: (function(rb){return (function(sb,rb){return sb.current;})(qb, rb);}), MoveNext: (function(rb){return (function(sb,rb){var tb = (function(ub){var vb = M(sb.acc);var wb = sb.unfold(vb);if ((wb.Tag == 1.000000)) {var xb = O(wb).Items[0.000000];var yb = O(wb).Items[1.000000];sb.acc = {Tag: 1.000000, Value: yb};sb.current = xb;return true;}else{sb.acc = {Tag: 0.000000};sb.current = null;return false;};});return (Q(sb.acc) && (function(){var ub;return tb(ub);})());})(qb, rb);}), Reset: (function(rb){return (function(sb,rb){sb.acc = {Tag: 1.000000, Value: sb.seed};sb.current = null;})(qb, rb);}), Dispose: (function(rb){return (function(sb,rb){;})(qb, rb);})};}));});cb = (function(Item0,Item1){var pb = this;pb.Items = [Item0, Item1];});db = (function(Item0,Item1){var pb = this;pb.Items = [Item0, Item1];});eb = (function(Item0,Item1){var pb = this;pb.Items = [Item0, Item1];});fb = (function(Item0,Item1){var pb = this;pb.Items = [Item0, Item1];});gb = (function(nb,ob){var pb = this;{};pb.seed = nb;pb.unfold = ob;pb.acc = {Tag: 1.000000, Value: pb.seed};pb.current = null;});hb = (function(nb,ob){var pb = this;{};pb.seed = nb;pb.unfold = ob;pb.acc = {Tag: 1.000000, Value: pb.seed};pb.current = null;});ib = (function(Item1,Item2){var pb = this;pb.Tag = 1.000000;pb._CaseName = "Cons";pb.Item1 = Item1;pb.Item2 = Item2;});jb = (function(){var nb = this;nb.Tag = 0.000000;nb._CaseName = "Nil";});kb = (function(Item1,Item2){var pb = this;pb.Tag = 1.000000;pb._CaseName = "Cons";pb.Item1 = Item1;pb.Item2 = Item2;});lb = (function(){var nb = this;nb.Tag = 0.000000;nb._CaseName = "Nil";});mb = (function(nb){var ob = this;{};ob.s = nb;ob.i = {contents: A(ob.s)};});var nb = I(X(i((new cb(1, 1.000000)), i((new cb(2, 4.000000)), i((new cb(3, 9.000000)), i((new cb(4, 16.000000)), k()))))));return R(K((function(ob){return (function(pb){return (ob == 3);});}), nb)) | |
***** FunScript.Tests.Maps.Map.tryPick works | |
// Code: | |
var I, H, G, F, E, D, C, B, A, z, y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(J){var K = this;{};K.factory = J;});b = (function(J){var K = (new e());var L;L = K;var M;M = K;return (new d({Compare: (function(N,O){return (function(P,N,O){return (N < O ? -1 : (N == O ? 0 : 1));})(L, N, O);})}, o({Compare: (function(N,O){return (function(P,N,O){return (N < O ? -1 : (N == O ? 0 : 1));})(M, N, O);})}, J)));});c = (function(J,K){return q(K, J.tree_390);});d = (function(J,K){var L = this;{};L.comparer_386 = J;L.tree_390 = K;});e = (function(J){{};});f = (function(J,K){return (new H(J, K));});g = (function(){return (new I());});h = (function(J){if ((J.Tag == 1.000000)) {var K = J.Item2;var L = J.Item1;return L;}else{throw ("List was empty");return null;};});i = (function(J){if ((J.Tag == 1.000000)) {var K = J.Item2;var L = J.Item1;return K;}else{throw ("List was empty");return null;};});j = (function(J,K,L,M){if ((M.Tag == 1.000000)) {var N = M.Item1;var O = J.Compare(K, N);if ((O < 0)) {return (new s(K, L, (new r()), M, 2));}else{if ((O == 0)) {return (new t(K, L));}else{return (new s(K, L, M, (new r()), 2));};};}else{if ((M.Tag == 2.000000)) {var P = M.Item2;var Q = M.Item4;var R = M.Item3;var S = M.Item1;var T = M.Item5;var U = J.Compare(K, S);if ((U < 0)) {return p(j(J, K, L, R), S, P, Q);}else{if ((U == 0)) {return (new s(K, L, R, Q, T));}else{return p(R, S, P, j(J, K, L, Q));};};}else{return (new t(K, L));};};});k = (function(){return (new r());});l = (function(J){if ((J.Tag == 1.000000)) {return 1;}else{if ((J.Tag == 2.000000)) {var K = J.Item5;return K;}else{return 0;};};});m = (function(J,K,L,M){var N = (new E(J, M));if ((N.Items[0.000000].Tag == 0.000000)) {if ((N.Items[1.000000].Tag == 0.000000)) {return (new t(K, L));}else{var O = l(J);var P = l(M);var Q;if ((O < P)) {Q = P;}else{Q = O;};var R = Q;return (new s(K, L, J, M, (R + 1)));};}else{var S = l(J);var T = l(M);var U;if ((S < T)) {U = T;}else{U = S;};var V = U;return (new s(K, L, J, M, (V + 1)));};});n = (function(J,K,L){if (L.MoveNext()) {var M = L.get_Current();var N = M.Items[1.000000];var O = M.Items[0.000000];return n(J, j(J, O, N, K), L);}else{return K;};});o = (function(J,K){var L = K.GetEnumerator();try{return n(J, k(), L);}finally{if (false) {L.Dispose();}else{;};};});p = (function(J,K,L,M){var N = l(J);var O = l(M);if ((O > (N + 2))) {if ((M.Tag == 2.000000)) {var P = M.Item2;var Q = M.Item4;var R = M.Item3;var S = M.Item1;if ((l(R) > (N + 1))) {if ((R.Tag == 2.000000)) {var T = R.Item2;var U = R.Item4;var V = R.Item3;var W = R.Item1;return m(m(J, K, L, V), W, T, m(U, S, P, Q));}else{throw ("rebalance");return null;};}else{return m(m(J, K, L, R), S, P, Q);};}else{throw ("rebalance");return null;};}else{if ((N > (O + 2))) {if ((J.Tag == 2.000000)) {var X = J.Item2;var Y = J.Item4;var Z = J.Item3;var _ = J.Item1;if ((l(Y) > (O + 1))) {if ((Y.Tag == 2.000000)) {var ab = Y.Item2;var bb = Y.Item4;var cb = Y.Item3;var db = Y.Item1;return m(m(Z, _, X, cb), db, ab, m(bb, K, L, M));}else{throw ("re balance");return null;};}else{return m(Z, _, X, m(Y, K, L, M));};}else{throw ("rebalance");return null;};}else{return m(J, K, L, M);};};});q = (function(J,K){if ((K.Tag == 1.000000)) {var L = K.Item2;var M = K.Item1;return J(M)(L);}else{if ((K.Tag == 2.000000)) {var N = K.Item2;var O = K.Item4;var P = K.Item3;var Q = K.Item1;var R = q(J, P);if ((R.Tag == 0.000000)) {var S = J(Q)(N);if ((S.Tag == 0.000000)) {return q(J, O);}else{var T = S;return T;};}else{var U = R;return U;};}else{return {Tag: 0.000000};};};});r = (function(){var J = this;J.Tag = 0.000000;J._CaseName = "MapEmpty";});s = (function(Item1,Item2,Item3,Item4,Item5){var O = this;O.Tag = 2.000000;O._CaseName = "MapNode";O.Item1 = Item1;O.Item2 = Item2;O.Item3 = Item3;O.Item4 = Item4;O.Item5 = Item5;});t = (function(Item1,Item2){var L = this;L.Tag = 1.000000;L._CaseName = "MapOne";L.Item1 = Item1;L.Item2 = Item2;});u = (function(J){return b(J);});v = (function(J,K){return c(K, J);});w = (function(J){return J.Value;;});x = (function(J){return J.Value;;});y = (function(J){return J.Value;;});z = (function(J){return ((J.Tag == 1.000000) && true);});A = (function(J){var K;K = (new a(J));return {GetEnumerator: (function(L){return (function(M,L){var N;return M.factory(N);})(K, L);})};});B = (function(J){return C((function(K){if ((K.Tag == 1.000000)) {var L = i(K);var M = h(K);return {Tag: 1.000000, Value: (new F(M, L))};}else{return {Tag: 0.000000};};}), J);});C = (function(J,K){return A((function(L){var M;M = (new G(K, J));return {get_Current: (function(N){return (function(O,N){return O.current;})(M, N);}), MoveNext: (function(N){return (function(O,N){var P = (function(Q){var R = w(O.acc);var S = O.unfold(R);if ((S.Tag == 1.000000)) {var T = y(S).Items[0.000000];var U = y(S).Items[1.000000];O.acc = {Tag: 1.000000, Value: U};O.current = T;return true;}else{O.acc = {Tag: 0.000000};O.current = null;return false;};});return (z(O.acc) && (function(){var Q;return P(Q);})());})(M, N);}), Reset: (function(N){return (function(O,N){O.acc = {Tag: 1.000000, Value: O.seed};O.current = null;})(M, N);}), Dispose: (function(N){return (function(O,N){;})(M, N);})};}));});D = (function(Item0,Item1){var L = this;L.Items = [Item0, Item1];});E = (function(Item0,Item1){var L = this;L.Items = [Item0, Item1];});F = (function(Item0,Item1){var L = this;L.Items = [Item0, Item1];});G = (function(J,K){var L = this;{};L.seed = J;L.unfold = K;L.acc = {Tag: 1.000000, Value: L.seed};L.current = null;});H = (function(Item1,Item2){var L = this;L.Tag = 1.000000;L._CaseName = "Cons";L.Item1 = Item1;L.Item2 = Item2;});I = (function(){var J = this;J.Tag = 0.000000;J._CaseName = "Nil";});var J = u(B(f((new D(1, 1.000000)), f((new D(2, 4.000000)), f((new D(3, 9.000000)), f((new D(4, 16.000000)), g()))))));var K = v((function(L){return (function(M){if ((L == 3)) {return {Tag: 1.000000, Value: 11};}else{return {Tag: 0.000000};};});}), J);return x(K) | |
***** FunScript.Tests.Options.Empty Nullable construction works | |
// Code: | |
var a = null;return (a !== null) | |
***** FunScript.Tests.Options.Filled Nullable construction works | |
// Code: | |
var a = 12;return (a !== null) | |
***** FunScript.Tests.Options.Filled Nullable Value access works | |
// Code: | |
var a = 12.000000;return a | |
***** FunScript.Tests.Options.Option.bind works | |
// Code: | |
var b, a;a = (function(c,d){if ((d.Tag == 1.000000)) {var e = b(d);return c(e);}else{return {Tag: 0.000000};};});b = (function(c){return c.Value;;});var c = (function(d){if ((d == 1.000000)) {return {Tag: 1.000000, Value: d};}else{return {Tag: 0.000000};};});var d = a(c, {Tag: 1.000000, Value: 1.000000});return b(d) | |
***** FunScript.Tests.Options.Option.count works | |
// Code: | |
var a;a = (function(b){if ((b.Tag == 1.000000)) {return 1;}else{return 0;};});return a({Tag: 1.000000, Value: 1.000000}) | |
***** FunScript.Tests.Options.Option.exists works | |
// Code: | |
var b, a;a = (function(c,d){return ((d.Tag == 1.000000) && (function(){var e = b(d);return c(e);})());});b = (function(c){return c.Value;;});var c = 1.000000;return a((function(d){return (c == d);}), {Tag: 1.000000, Value: 1.000000}) | |
***** FunScript.Tests.Options.Option.fold works | |
// Code: | |
var b, a;a = (function(c,d,e){if ((e.Tag == 1.000000)) {var f = b(e);return c(d)(f);}else{return d;};});b = (function(c){return c.Value;;});var c = (function(d){return (function(e){return (d + e);});});var d = 1.000000;return (function(e){return a(c, d, e);})({Tag: 1.000000, Value: 1.000000}) | |
***** FunScript.Tests.Options.Option.foldBack works | |
// Code: | |
var b, a;a = (function(c,d,e){if ((d.Tag == 1.000000)) {var f = b(d);return c(f)(e);}else{return e;};});b = (function(c){return c.Value;;});return a((function(c){return (function(d){return (c + d);});}), {Tag: 1.000000, Value: 1.000000}, 1.000000) | |
***** FunScript.Tests.Options.Option.forall works | |
// Code: | |
var b, a;a = (function(c,d){if ((d.Tag == 1.000000)) {var e = b(d);return c(e);}else{return true;};});b = (function(c){return c.Value;;});var c = 1.000000;return a((function(d){return (c == d);}), {Tag: 1.000000, Value: 1.000000}) | |
***** FunScript.Tests.Options.Option.get works | |
// Code: | |
var a;a = (function(b){return b.Value;;});return a({Tag: 1.000000, Value: 1.000000}) | |
***** FunScript.Tests.Options.Option.isNone works | |
// Code: | |
var b, a;a = (function(c){return (!b(c));});b = (function(c){return ((c.Tag == 1.000000) && true);});return a({Tag: 1.000000, Value: 1.000000}) | |
***** FunScript.Tests.Options.Option.IsNone works | |
// Code: | |
var b, a;a = (function(c){return (!b(c));});b = (function(c){return ((c.Tag == 1.000000) && true);});var c = {Tag: 1.000000, Value: 1.000000};return a(c) | |
***** FunScript.Tests.Options.Option.isSome works | |
// Code: | |
var a;a = (function(b){return ((b.Tag == 1.000000) && true);});return a({Tag: 1.000000, Value: 1.000000}) | |
***** FunScript.Tests.Options.Option.IsSome works | |
// Code: | |
var a;a = (function(b){return ((b.Tag == 1.000000) && true);});var b = {Tag: 1.000000, Value: 1.000000};return a(b) | |
***** FunScript.Tests.Options.Option.iter works | |
// Code: | |
var b, a;a = (function(c){return c.Value;;});b = (function(c,d){if ((d.Tag == 1.000000)) {var e = a(d);return c(e);}else{;};});var c = {contents: 0.000000};b((function(d){c.contents = (c.contents + d);}), {Tag: 1.000000, Value: 1.000000});return c.contents | |
***** FunScript.Tests.Options.Option.map works | |
// Code: | |
var b, a;a = (function(c){return c.Value;;});b = (function(c,d){if ((d.Tag == 1.000000)) {var e = a(d);return {Tag: 1.000000, Value: c(e)};}else{return {Tag: 0.000000};};});var c = 2.000000;return a(b((function(d){return (c * d);}), {Tag: 1.000000, Value: 1.000000})) | |
***** FunScript.Tests.Options.Option.toArray works | |
// Code: | |
var b, a;a = (function(c){return c.Value;;});b = (function(c){if ((c.Tag == 1.000000)) {var d = a(c);return [d];}else{return [];};});var c = b({Tag: 1.000000, Value: 1.000000});return c[0] | |
***** FunScript.Tests.Options.Option.toList works | |
// Code: | |
var g, f, e, d, c, b, a;a = (function(h,i){return (new f(h, i));});b = (function(){return (new g());});c = (function(h){if ((h.Tag == 1.000000)) {var i = h.Item2;var j = h.Item1;return j;}else{throw ("List was empty");return null;};});d = (function(h){return h.Value;;});e = (function(h){if ((h.Tag == 1.000000)) {var i = d(h);return a(i, b());}else{return b();};});f = (function(Item1,Item2){var j = this;j.Tag = 1.000000;j._CaseName = "Cons";j.Item1 = Item1;j.Item2 = Item2;});g = (function(){var h = this;h.Tag = 0.000000;h._CaseName = "Nil";});var h = e({Tag: 1.000000, Value: 1.000000});return c(h) | |
***** FunScript.Tests.Options.Option.Value works | |
// Code: | |
var a;a = (function(b){return b.Value;;});var b = {Tag: 1.000000, Value: 1.000000};return a(b) | |
***** FunScript.Tests.Options.pattern matching on None works | |
// Code: | |
var a = {Tag: 0.000000};if ((a.Tag == 0.000000)) {return "bar";}else{return "foo";} | |
***** FunScript.Tests.Options.pattern matching on Some works | |
// Code: | |
var a = {Tag: 1.000000, Value: 1};if ((a.Tag == 1.000000)) {return "foo";}else{return "bar";} | |
***** FunScript.Tests.Options.Some unit via reflection works | |
// Code: | |
var a;var b = {Tag: 1.000000, Value: a};if ((b.Tag == 1.000000)) {return 1.000000;}else{return 0.000000;} | |
***** FunScript.Tests.Options.Some unit works | |
// Code: | |
var a;var b = {Tag: 1.000000, Value: a};if ((b.Tag == 1.000000)) {return 1.000000;}else{return 0.000000;} | |
***** FunScript.Tests.PrimitiveTypes.Bools are generated as bools | |
// Code: | |
return true | |
***** FunScript.Tests.PrimitiveTypes.Chars are generated as strings | |
// Code: | |
return "a" | |
***** FunScript.Tests.PrimitiveTypes.Floats are generated as numbers | |
// Code: | |
return 1.000000 | |
***** FunScript.Tests.PrimitiveTypes.Ints are generated as numbers | |
// Code: | |
return 1 | |
***** FunScript.Tests.PrimitiveTypes.Objects are generated as objects | |
// Code: | |
var a = {};var b = {};return (a == b) | |
***** FunScript.Tests.PrimitiveTypes.Strings are generated as strings | |
// Code: | |
return "test" | |
***** FunScript.Tests.PrimitiveTypes.Unit is generated as null | |
// Code: | |
***** FunScript.Tests.RecordTypes.Record constructors can be generated | |
// Code: | |
var a;a = (function(b,c){var d = this;d.Name = b;d.Age = c;});var b = (new a("Zach", 24.000000));return true | |
***** FunScript.Tests.RecordTypes.Record expression constructors can be generated | |
// Code: | |
var a;a = (function(b,c){var d = this;d.Name = b;d.Age = c;});var b = (new a("Zach", 24.000000));var c = 25.000000;var d = (new a(b.Name, c));return d.Age | |
***** FunScript.Tests.RecordTypes.Record property access can be generated | |
// Code: | |
var a;a = (function(b,c){var d = this;d.Name = b;d.Age = c;});var b = (new a("Zach", 24.000000));return b.Name | |
***** FunScript.Tests.RecordTypes.Records with key/reserved words are mapped correctly | |
// Code: | |
var a;a = (function(b,c){var d = this;d._for = b;d._class = c;});var b = (new a(1.000000, 2.000000));return b._class | |
***** FunScript.Tests.ReflectedDefinitions.application of a curried instance method works | |
// Code: | |
var b, a;a = (function(c){var d = this;{};d.y = (c * 2.000000);d.x_104 = 0.000000;d.current_ = d.x_104;});b = (function(c,d,e){return (d + e);});var c = (new a(10.000000));return (function(d){return (function(e){return b(c, d, e);});})(1.000000)(2.000000) | |
***** FunScript.Tests.ReflectedDefinitions.application of a curried module method works | |
// Code: | |
var a;a = (function(b,c){return (b + c);});return a(1.000000, 2.000000) | |
***** FunScript.Tests.ReflectedDefinitions.application of a curried record method works | |
// Code: | |
var b, a;a = (function(c){var d = this;d.y = c;});b = (function(c,d,e){return (d + e);});var c = (new a(10.000000));return (function(d){return (function(e){return b(c, d, e);});})(1.000000)(2.000000) | |
***** FunScript.Tests.ReflectedDefinitions.application of a curried union method works | |
// Code: | |
var b, a;a = (function(Item){var d = this;d.Tag = 0.000000;d._CaseName = "Calculator";d.Item = Item;});b = (function(c,d,e){return (d + e);});var c = (new a(10.000000));return (function(d){return (function(e){return b(c, d, e);});})(1.000000)(2.000000) | |
***** FunScript.Tests.ReflectedDefinitions.application of a partially tupled curried instance method works | |
// Code: | |
var d, c, b, a;a = (function(e){var f = this;{};f.y = (e * 2.000000);f.x_104 = 0.000000;f.current_ = f.x_104;});b = (function(e,f,g){return (f + (function(h){var i = h.Items[0.000000];var j = h.Items[1.000000];return c(e, i, j);})(g));});c = (function(e,f,g){return (f - g);});d = (function(Item0,Item1){var g = this;g.Items = [Item0, Item1];});var e = (new a(10.000000));return (function(f){return (function(g){return b(e, f, g);});})(1.000000)((new d(2.000000, 3.000000))) | |
***** FunScript.Tests.ReflectedDefinitions.application of a partially tupled curried module method works | |
// Code: | |
var c, b, a;a = (function(d,e,f){var g = (new c(e, f));var h = g.Items[0.000000];var i = g.Items[1.000000];return (d + b(h, i));});b = (function(d,e){return (d - e);});c = (function(Item0,Item1){var f = this;f.Items = [Item0, Item1];});return a(1.000000, 2.000000, 3.000000) | |
***** FunScript.Tests.ReflectedDefinitions.application of a partially tupled tupled instance method works | |
// Code: | |
var d, c, b, a;a = (function(e){var f = this;{};f.y = (e * 2.000000);f.x_104 = 0.000000;f.current_ = f.x_104;});b = (function(e,f,g){return (f + (function(h){var i = h.Items[0.000000];var j = h.Items[1.000000];return c(e, i, j);})(g));});c = (function(e,f,g){return (f - g);});d = (function(Item0,Item1){var g = this;g.Items = [Item0, Item1];});var e = (new a(10.000000));return b(e, 1.000000, (new d(2.000000, 3.000000))) | |
***** FunScript.Tests.ReflectedDefinitions.application of a partially tupled tupled module method works | |
// Code: | |
var c, b, a;a = (function(d,e){var f = e.Items[0.000000];var g = e.Items[1.000000];return (d + b(f, g));});b = (function(d,e){return (d - e);});c = (function(Item0,Item1){var f = this;f.Items = [Item0, Item1];});return a(1.000000, (new c(2.000000, 3.000000))) | |
***** FunScript.Tests.ReflectedDefinitions.application of a static curried method works | |
// Code: | |
var a;a = (function(b,c){return (b + c);});return (function(b){return (function(c){return a(b, c);});})(1.000000)(2.000000) | |
***** FunScript.Tests.ReflectedDefinitions.application of a static tupled method works | |
// Code: | |
var a;a = (function(b,c){return (b - c);});return a(1.000000, 2.000000) | |
***** FunScript.Tests.ReflectedDefinitions.application of a tupled instance method works | |
// Code: | |
var b, a;a = (function(c){var d = this;{};d.y = (c * 2.000000);d.x_104 = 0.000000;d.current_ = d.x_104;});b = (function(c,d,e){return (d - e);});var c = (new a(10.000000));return b(c, 1.000000, 2.000000) | |
***** FunScript.Tests.ReflectedDefinitions.application of a tupled module method works | |
// Code: | |
var a;a = (function(b,c){return (b - c);});return a(1.000000, 2.000000) | |
***** FunScript.Tests.ReflectedDefinitions.application of a tupled record method works | |
// Code: | |
var b, a;a = (function(c){var d = this;d.y = c;});b = (function(c,d,e){return (d - e);});var c = (new a(10.000000));return b(c, 1.000000, 2.000000) | |
***** FunScript.Tests.ReflectedDefinitions.application of a tupled union method works | |
// Code: | |
var b, a;a = (function(Item){var d = this;d.Tag = 0.000000;d._CaseName = "Calculator";d.Item = Item;});b = (function(c,d,e){return (d - e);});var c = (new a(10.000000));return b(c, 1.000000, 2.000000) | |
***** FunScript.Tests.ReflectedDefinitions.constructing instances works | |
// Code: | |
var a;a = (function(b){var c = this;{};c.y = (b * 2.000000);c.x_104 = 0.000000;c.current_ = c.x_104;});var b = (new a(10.000000)) | |
***** FunScript.Tests.ReflectedDefinitions.generic methods on instances work | |
// Code: | |
var b, a;a = (function(c){var d = this;{};d.y = (c * 2.000000);d.x_104 = 0.000000;d.current_ = d.x_104;});b = (function(c,d){return d;});var c = (new a(10.000000));return b(c, 11.000000) | |
***** FunScript.Tests.ReflectedDefinitions.generic methods on records work | |
// Code: | |
var b, a;a = (function(c){var d = this;d.y = c;});b = (function(c,d){return d;});var c = (new a(10.000000));return b(c, 11.000000) | |
***** FunScript.Tests.ReflectedDefinitions.generic methods on unions work | |
// Code: | |
var b, a;a = (function(Item){var d = this;d.Tag = 0.000000;d._CaseName = "Calculator";d.Item = Item;});b = (function(c,d){return d;});var c = (new a(10.000000));return b(c, 11.000000) | |
***** FunScript.Tests.ReflectedDefinitions.getting a module property works | |
// Code: | |
var b, a;a = (function(){return 0.000000;});b = a();return b | |
***** FunScript.Tests.ReflectedDefinitions.getting a static property works | |
// Code: | |
var a;a = (function(b){return 0.000000;});return a() | |
***** FunScript.Tests.ReflectedDefinitions.getting an instance property works | |
// Code: | |
var b, a;a = (function(c){var d = this;{};d.y = (c * 2.000000);d.x_104 = 0.000000;d.current_ = d.x_104;});b = (function(c,d){return 0.000000;});var c = (new a(10.000000));return b(c) | |
***** FunScript.Tests.ReflectedDefinitions.getting an record property works | |
// Code: | |
var b, a;a = (function(c){var d = this;d.y = c;});b = (function(c,d){return 0.000000;});var c = (new a(10.000000));return b(c) | |
***** FunScript.Tests.ReflectedDefinitions.getting an union property works | |
// Code: | |
var b, a;a = (function(Item){var d = this;d.Tag = 0.000000;d._CaseName = "Calculator";d.Item = Item;});b = (function(c,d){return 0.000000;});var c = (new a(10.000000));return b(c) | |
***** FunScript.Tests.ReflectedDefinitions.let bound fields on instances work | |
// Code: | |
var b, a;a = (function(c){var d = this;{};d.y = (c * 2.000000);d.x_104 = 0.000000;d.current_ = d.x_104;});b = (function(c,d){return c.y;});var c = (new a(10.000000));return b(c) | |
***** FunScript.Tests.ReflectedDefinitions.let bound fields on records work | |
// Code: | |
var b, a;a = (function(c){var d = this;d.y = c;});b = (function(c,d){return c.y;});var c = (new a(10.000000));return b(c) | |
***** FunScript.Tests.ReflectedDefinitions.let bound fields on unions work | |
// Code: | |
var b, a;a = (function(Item){var d = this;d.Tag = 0.000000;d._CaseName = "Calculator";d.Item = Item;});b = (function(c,d){var e = c.Item;return e;});var c = (new a(10.000000));return b(c) | |
***** FunScript.Tests.ReflectedDefinitions.multiple constructors work | |
// Code: | |
var e, d, c, b, a;a = (function(){return 0.000000;});c = (function(f){var g = this;{};g.x = f;});d = (function(f){b = (b + 1.000000);var g = 1.000000;return (new c((g * 2.000000)));});e = (function(f,g){return f.x;});b = a();var f = d();var g = (new c(10.000000));return ((e(f) + e(g)) + b) | |
***** FunScript.Tests.ReflectedDefinitions.partial application of a curried instance method works | |
// Code: | |
var b, a;a = (function(c){var d = this;{};d.y = (c * 2.000000);d.x_104 = 0.000000;d.current_ = d.x_104;});b = (function(c,d,e){return (d + e);});var c = (new a(10.000000));var d = (function(e){return (function(f){return b(c, e, f);});})(1.000000);return d(2.000000) | |
***** FunScript.Tests.ReflectedDefinitions.partial application of a curried module method works | |
// Code: | |
var a;a = (function(b,c){return (b + c);});var b = 1.000000;var c = (function(d){return a(b, d);});return c(2.000000) | |
***** FunScript.Tests.ReflectedDefinitions.partial application of a curried record method works | |
// Code: | |
var b, a;a = (function(c){var d = this;d.y = c;});b = (function(c,d,e){return (d + e);});var c = (new a(10.000000));var d = (function(e){return (function(f){return b(c, e, f);});})(1.000000);return d(2.000000) | |
***** FunScript.Tests.ReflectedDefinitions.partial application of a curried union method works | |
// Code: | |
var b, a;a = (function(Item){var d = this;d.Tag = 0.000000;d._CaseName = "Calculator";d.Item = Item;});b = (function(c,d,e){return (d + e);});var c = (new a(10.000000));var d = (function(e){return (function(f){return b(c, e, f);});})(1.000000);return d(2.000000) | |
***** FunScript.Tests.ReflectedDefinitions.partial application of a static method works | |
// Code: | |
var a;a = (function(b,c){return (b + c);});var b = (function(c){return (function(d){return a(c, d);});})(1.000000);return b(2.000000) | |
***** FunScript.Tests.ReflectedDefinitions.references to fields inside exported lambdas produce the same result | |
// Code: | |
var c, b, a;a = (function(d){var e = this;{};e.f = {contents: (function(f){return (f * 2.000000);})};e.G_ = (function(f){return b(e, f);});});b = (function(d,e){return d.f.contents(e);});c = (function(d,e){return d.G_;});var d = (new a());return c(d)(10.000000) | |
***** FunScript.Tests.ReflectedDefinitions.setting a mutable module property works | |
// Code: | |
var b, a;a = (function(){return 1.000000;});b = a();b = (10.000000 + b);return b | |
***** FunScript.Tests.ReflectedDefinitions.setting a static property works | |
// Code: | |
var d, c, b, a;a = (function(){return 0.000000;});c = (function(e){return b;});d = (function(e){b = (2.000000 * e);});b = a();d(1.000000);return c() | |
***** FunScript.Tests.ReflectedDefinitions.setting an instance auto-property works | |
// Code: | |
var c, b, a;a = (function(d){var e = this;{};e.y = (d * 2.000000);e.x_104 = 0.000000;e.current_ = e.x_104;});b = (function(d,e){return d.current_;});c = (function(d,e){d.current_ = e;});var d = (new a(10.000000));c(d, 1.000000);return b(d) | |
***** FunScript.Tests.ReflectedDefinitions.setting an instance property works | |
// Code: | |
var c, b, a;a = (function(d){var e = this;{};e.y = (d * 2.000000);e.x_104 = 0.000000;e.current_ = e.x_104;});b = (function(d,e){return d.x_104;});c = (function(d,e){d.x_104 = (e * 2.000000);});var d = (new a(10.000000));c(d, 3.000000);return b(d) | |
***** FunScript.Tests.ReflectedDefinitions.setting an record property works | |
// Code: | |
var a;a = (function(b){var c = this;c.y = b;});var b = (new a(10.000000));b.y = (b.y + 1.000000);null;return b.y | |
***** FunScript.Tests.Reflection.Deserialization works using reflection API | |
// Code: | |
var Zb, Yb, Xb, Wb, Vb, Ub, Tb, Sb, Rb, Qb, Pb, Ob, Nb, Mb, Lb, Kb, Jb, Ib, Hb, Gb, Fb, Eb, Db, Cb, Bb, Ab, zb, yb, xb, wb, vb, ub, tb, sb, rb, qb, pb, ob, nb, mb, lb, kb, jb, ib, hb, gb, fb, eb, db, cb, bb, ab, _, Z, Y, X, W, V, U, T, S, R, Q, P, O, N, M, L, K, J, I, H, G, F, E, D, C, B, A, z, y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(_b,ac,bc){return c((function(cc){return (function(dc){return (function(ec){return _b(dc)(ec);});});}), ac, bc);});b = (function(_b,ac,bc){return d((function(cc){return (function(dc){return (function(ec){return _b(dc)(ec);});});}), ac, bc);});c = (function(_b,ac,bc){var cc = bc;var dc = e(ac);for (var ec = 1; ec <= dc; ec++){cc = _b((ec - 1))(ac[(dc - ec)])(cc);null;};return cc;});d = (function(_b,ac,bc){var cc = bc;var dc = h(ac);for (var ec = 1; ec <= dc; ec++){cc = _b((ec - 1))(ac[(dc - ec)])(cc);null;};return cc;});e = (function(_b){return _b.length;;});f = (function(_b){return _b.length;;});g = (function(_b){return _b.length;;});h = (function(_b){return _b.length;;});i = (function(_b){return _b.length;;});j = (function(_b,ac){return m((function(bc){return (function(cc){return _b(cc);});}), ac);});k = (function(_b,ac){return n((function(bc){return (function(cc){return _b(cc);});}), ac);});l = (function(_b,ac,bc){return p((function(cc){return (function(dc){return (function(ec){return _b(dc)(ec);});});}), ac, bc);});m = (function(_b,ac){var bc = r(g(ac));for (var cc = 0; cc <= (g(ac) - 1); cc++){bc[cc] = _b(cc)(ac[cc]);null;};return bc;});n = (function(_b,ac){var bc = s(g(ac));for (var cc = 0; cc <= (g(ac) - 1); cc++){bc[cc] = _b(cc)(ac[cc]);null;};return bc;});o = (function(_b,ac){var bc = r(i(ac));for (var cc = 0; cc <= (i(ac) - 1); cc++){bc[cc] = _b(cc)(ac[cc]);null;};return bc;});p = (function(_b,ac,bc){if ((i(ac) != f(bc))) {throw ("Arrays had different lengths");null;}else{;};var cc = q(i(ac));for (var dc = 0; dc <= (i(ac) - 1); dc++){cc[dc] = _b(dc)(ac[dc])(bc[dc]);null;};return cc;});q = (function(_b){return new Array(_b);;});r = (function(_b){return new Array(_b);;});s = (function(_b){return new Array(_b);;});t = (function(_b){return (function(ac){var bc = (_b.Name < ac.Name ? -1 : (_b.Name == ac.Name ? 0 : 1));if ((bc != 0)) {return bc;}else{var cc = (_b.Address < ac.Address ? -1 : (_b.Address == ac.Address ? 0 : 1));if ((cc != 0)) {return cc;}else{return 0;};};});});u = (function(_b,ac){var bc = this;bc.Name = _b;bc.Address = ac;});v = (function(_b,ac){var bc = Ab(_b);if ((bc.Tag == 1.000000)) {var cc = bc.Item2;return cc;}else{throw ("Not a record type.");return null;};});w = (function(_b){var ac = Ab(_b);if ((ac.Tag == 3.000000)) {var bc = ac.Item2;return bc;}else{throw ("Not a tuple type.");return null;};});x = (function(_b,ac){var bc = Ab(_b);if ((bc.Tag == 2.000000)) {var cc = bc.Item;return cc;}else{throw ("Not a union type.");return null;};});y = (function(_b,ac){var bc = Ab(_b);return ((bc.Tag == 1.000000) && true);});z = (function(_b){var ac = Ab(_b);return ((ac.Tag == 3.000000) && true);});A = (function(_b,ac){var bc = Ab(_b);return ((bc.Tag == 2.000000) && true);});B = (function(_b,ac,bc){var cc = Ab(_b);if ((cc.Tag == 1.000000)) {var dc = cc.Item1;return dc(ac);}else{throw ("Not a record type.");return null;};});C = (function(_b,ac){var bc = Ab(ac);if ((bc.Tag == 3.000000)) {var cc = bc.Item1;return cc(_b);}else{throw ("Not a tuple type.");return null;};});D = (function(_b,ac,bc){return Cb(_b, ac);});E = (function(_b,ac){return (function(bc){return bc.Tag;});});F = (function(Item){var ac = this;ac.Tag = 4.000000;ac._CaseName = "JArray";ac.Item = Item;});G = (function(Item){var ac = this;ac.Tag = 1.000000;ac._CaseName = "JNumber";ac.Item = Item;});H = (function(Item){var ac = this;ac.Tag = 3.000000;ac._CaseName = "JObject";ac.Item = Item;});I = (function(Item){var ac = this;ac.Tag = 2.000000;ac._CaseName = "JString";ac.Item = Item;});J = (function(_b,ac){var bc;bc = (function(cc){return (function(dc){var ec = (cc + " ");if ((dc.Tag == 1.000000)) {var fc = dc.Item;return (cc + fc.toString());}else{if ((dc.Tag == 2.000000)) {var gc = dc.Item;return (((cc + "\"") + gc) + "\"");}else{if ((dc.Tag == 4.000000)) {var hc = dc.Item;var ic = db((function(jc){return (function(kc){return ((jc + ",\n") + kc);});}), _((function(jc){return (cc + bc(ec)(jc));}), hc));return ((((cc + "[\n") + ic) + cc) + "]\n");}else{if ((dc.Tag == 3.000000)) {var jc = dc.Item;var kc = {contents: false};var lc = db((function(mc){return (function(nc){return ((mc + ",\n") + nc);});}), ab((function(mc){var nc = mc.Items[0.000000];var oc = mc.Items[1.000000];return (((((ec + "\"") + nc) + "\"") + " : ") + bc("")(oc));}), jc));return ((((cc + "{\n") + lc) + cc) + "}\n");}else{return "null";};};};};});});return bc("")(_b);});K = (function(_b){return (new L(null, _b));});L = (function(_b,ac){var bc = this;{};bc.factory = ac;bc.isCreated = false;bc.value_24 = _b;});M = (function(_b,ac){if ((!_b.isCreated)) {var bc;_b.value_24 = _b.factory(bc);_b.isCreated = true;}else{;};return _b.value_24;});N = (function(_b,ac){return (new Qb(_b, ac));});O = (function(_b,ac,bc){return S((function(cc){return (function(dc){return (function(ec){return _b(dc)(ec);});});}), ac, bc);});P = (function(_b,ac,bc){return T((function(cc){return (function(dc){return (function(ec){return _b(dc)(ec);});});}), ac, bc);});Q = (function(_b,ac,bc){return U((function(cc){return (function(dc){return (function(ec){return _b(dc)(ec);});});}), ac, bc);});R = (function(_b,ac,bc){return V((function(cc){return (function(dc){return (function(ec){return _b(dc)(ec);});});}), ac, bc);});S = (function(_b,ac,bc){return X(_b, 0, ac, bc);});T = (function(_b,ac,bc){return W(_b, 0, ac, bc);});U = (function(_b,ac,bc){return Y(_b, 0, ac, bc);});V = (function(_b,ac,bc){return Z(_b, 0, ac, bc);});W = (function(_b,ac,bc,cc){if ((cc.Tag == 1.000000)) {var dc = cc.Item2;var ec = cc.Item1;return W(_b, (ac + 1), _b(ac)(bc)(ec), dc);}else{return bc;};});X = (function(_b,ac,bc,cc){if ((cc.Tag == 1.000000)) {var dc = cc.Item2;var ec = cc.Item1;return X(_b, (ac + 1), _b(ac)(bc)(ec), dc);}else{return bc;};});Y = (function(_b,ac,bc,cc){if ((cc.Tag == 1.000000)) {var dc = cc.Item2;var ec = cc.Item1;return Y(_b, (ac + 1), _b(ac)(bc)(ec), dc);}else{return bc;};});Z = (function(_b,ac,bc,cc){if ((cc.Tag == 1.000000)) {var dc = cc.Item2;var ec = cc.Item1;return Z(_b, (ac + 1), _b(ac)(bc)(ec), dc);}else{return bc;};});_ = (function(_b,ac){return eb(O((function(bc){return (function(cc){return (new Ob(_b(cc), bc));});}), (new Pb()), ac));});ab = (function(_b,ac){return eb(R((function(bc){return (function(cc){return (new Ob(_b(cc), bc));});}), (new Pb()), ac));});bb = (function(_b){return a((function(ac){return (function(bc){return (new Mb(ac, bc));});}), _b, (new Nb()));});cb = (function(_b){return b((function(ac){return (function(bc){return (new Qb(ac, bc));});}), _b, (new Rb()));});db = (function(_b,ac){if ((ac.Tag == 1.000000)) {var bc = ac.Item2;var cc = ac.Item1;return P(_b, cc, bc);}else{throw ("List was empty");return null;};});eb = (function(_b){return Q((function(ac){return (function(bc){return (new Ob(bc, ac));});}), (new Pb()), _b);});fb = (function(){var _b = this;_b.Tag = 0.000000;_b._CaseName = "Academic";});gb = (function(Item){var ac = this;ac.Tag = 2.000000;ac._CaseName = "Employed";ac.Item = Item;});hb = (function(_b){return (function(ac){var bc = (_b.Tag == 0.000000);var cc = (ac.Tag == 0.000000);if ((bc && cc)) {return 0;}else{if (bc) {return -1;}else{if (cc) {return 1;}else{var dc = (_b.Tag == 1.000000);var ec = (ac.Tag == 1.000000);if ((dc && ec)) {return 0;}else{if (dc) {return -1;}else{if (ec) {return 1;}else{var fc = (_b.Tag == 2.000000);var gc = (ac.Tag == 2.000000);if ((fc && gc)) {var hc = t(_b.Item)(ac.Item);if ((hc != 0)) {return hc;}else{return 0;};}else{if (fc) {return -1;}else{if (gc) {return 1;}else{throw ("Unknown union case");return null;};};};};};};};};};});});ib = (function(){var _b = this;_b.Tag = 1.000000;_b._CaseName = "Unemployed";});jb = (function(_b){return (function(ac){var bc = tb(_b.Name)(ac.Name);if ((bc != 0)) {return bc;}else{var cc = hb(_b.Occupation)(ac.Occupation);if ((cc != 0)) {return cc;}else{var dc = (_b.Age < ac.Age ? -1 : (_b.Age == ac.Age ? 0 : 1));if ((dc != 0)) {return dc;}else{return 0;};};};});});kb = (function(_b,ac,bc){var cc = this;cc.Name = _b;cc.Occupation = ac;cc.Age = bc;});lb = (function(_b,ac,bc){return _b.f(ac);});mb = (function(_b,ac,bc){var cc = this;{};cc.name = _b;cc.f = ac;cc.getPropType = bc;});nb = (function(_b,ac){var bc;return _b.getPropType(bc);});ob = (function(_b){var ac = 1000000;return (new kb((new rb((new qb("Bob", "A")), "Diamonte")), (new gb((new u("Big Bank", "Centre of the Universe")))), ac));});pb = (function(Item0,Item1){var bc = this;bc.Items = [Item0, Item1];});qb = (function(Item0,Item1){var bc = this;bc.Items = [Item0, Item1];});rb = (function(Item0,Item1){var bc = this;bc.Items = [Item0, Item1];});sb = (function(_b){return (function(ac){var bc = (_b.Items[0.000000] < ac.Items[0.000000] ? -1 : (_b.Items[0.000000] == ac.Items[0.000000] ? 0 : 1));if ((bc != 0)) {return bc;}else{var cc = (_b.Items[1.000000] < ac.Items[1.000000] ? -1 : (_b.Items[1.000000] == ac.Items[1.000000] ? 0 : 1));if ((cc != 0)) {return cc;}else{return 0;};};});});tb = (function(_b){return (function(ac){var bc = sb(_b.Items[0.000000])(ac.Items[0.000000]);if ((bc != 0)) {return bc;}else{var cc = (_b.Items[1.000000] < ac.Items[1.000000] ? -1 : (_b.Items[1.000000] == ac.Items[1.000000] ? 0 : 1));if ((cc != 0)) {return cc;}else{return 0;};};});});ub = (function(){var _b = this;_b.Tag = 0.000000;_b._CaseName = "ClassType";});vb = (function(Item1,Item2){var bc = this;bc.Tag = 1.000000;bc._CaseName = "RecordType";bc.Item1 = Item1;bc.Item2 = Item2;});wb = (function(Item1,Item2){var bc = this;bc.Tag = 3.000000;bc._CaseName = "TupleType";bc.Item1 = Item1;bc.Item2 = Item2;});xb = (function(Item){var ac = this;ac.Tag = 2.000000;ac._CaseName = "UnionType";ac.Item = Item;});yb = (function(_b,ac,bc,cc){var dc = this;{};dc.name = _b;dc.fullName = ac;dc.typeArgs_32 = K((function(ec){var fc;return bc(fc);}));dc.kind_33 = K((function(ec){var fc;return cc(fc);}));});zb = (function(_b,ac){return _b.fullName;});Ab = (function(_b,ac){return M(_b.kind_33);});Bb = (function(_b,ac){return _b.name;});Cb = (function(_b,ac){return _b.cons(ac);});Db = (function(_b,ac){return _b.fields;});Eb = (function(_b,ac,bc,cc){var dc = this;{};dc.name = _b;dc.tag = ac;dc.cons = bc;dc.fields = cc;});Fb = (function(_b,ac){return _b.tag;});Gb = (function(_b,ac){if (A(_b, {Tag: 0.000000})) {var bc = x(_b, {Tag: 0.000000});var cc = Hb("Tag", ac);var dc = bc[cc];var ec = j((function(fc){return Gb(nb(fc), Hb(Bb(fc), ac));}), Db(dc));return D(dc, ec, {Tag: 0.000000});}else{if (y(_b, {Tag: 0.000000})) {var fc = v(_b, {Tag: 0.000000});var gc = j((function(hc){return Gb(nb(hc), Hb(Bb(hc), ac));}), fc);return B(_b, gc, {Tag: 0.000000});}else{if (z(_b)) {var hc = w(_b);var ic = o((function(jc){return (function(kc){var lc = Ib(jc, ac);return Gb(kc, lc);});}), hc);return C(ic, _b);}else{if ((zb(_b) == zb(Ub))) {return ac;}else{if ((zb(_b) == zb(Tb))) {return ac;}else{if ((zb(_b) == zb(Xb))) {return ac;}else{throw (("Unsupported type: " + Bb(_b)));return null;};};};};};};});Hb = (function(_b,ac){return ac[_b];;});Ib = (function(_b,ac){return ac[_b];;});Jb = (function(_b){return eval("(" + _b + ")");;});Kb = (function(_b){var ac = Jb(_b);var bc = Wb;return Gb(bc, ac);});Lb = (function(_b,ac){if (A(_b, {Tag: 0.000000})) {var bc = E(_b, {Tag: 0.000000});var cc = x(_b, {Tag: 0.000000});var dc = bc(ac);var ec = cc[dc];var fc = Db(ec);var gc = cb(k((function(hc){var ic = Lb(nb(hc), lb(hc, ac, []));return (new pb(Bb(hc), ic));}), fc));var hc = (new pb("Tag", (new G(Fb(ec)))));var ic = N(hc, gc);return (new H(ic));}else{if (y(_b, {Tag: 0.000000})) {var jc = v(_b, {Tag: 0.000000});var kc = cb(k((function(lc){var mc = Lb(nb(lc), lb(lc, ac, []));return (new pb(Bb(lc), mc));}), jc));return (new H(kc));}else{if (z(_b)) {var lc = w(_b);var mc = ac.Items;var nc = bb(l((function(oc){return (function(pc){return Lb(oc, pc);});}), lc, mc));return (new F(nc));}else{if ((zb(_b) == zb(Ub))) {return (new G(ac));}else{if ((zb(_b) == zb(Tb))) {return (new G(ac));}else{if ((zb(_b) == zb(Xb))) {return (new I(ac));}else{throw ("Unsupported type");return null;};};};};};};});Mb = (function(Item1,Item2){var bc = this;bc.Tag = 1.000000;bc._CaseName = "Cons";bc.Item1 = Item1;bc.Item2 = Item2;});Nb = (function(){var _b = this;_b.Tag = 0.000000;_b._CaseName = "Nil";});Ob = (function(Item1,Item2){var bc = this;bc.Tag = 1.000000;bc._CaseName = "Cons";bc.Item1 = Item1;bc.Item2 = Item2;});Pb = (function(){var _b = this;_b.Tag = 0.000000;_b._CaseName = "Nil";});Qb = (function(Item1,Item2){var bc = this;bc.Tag = 1.000000;bc._CaseName = "Cons";bc.Item1 = Item1;bc.Item2 = Item2;});Rb = (function(){var _b = this;_b.Tag = 0.000000;_b._CaseName = "Nil";});Sb = (new yb("Company", "FunScript.Tests.Reflection+Company", (function(_b){return [];}), (function(_b){return (new vb((function(ac){return (new u(ac[0], ac[1]));}), [(new mb("Name", (function(ac){return ac.Name;}), (function(ac){return Xb;}))), (new mb("Address", (function(ac){return ac.Address;}), (function(ac){return Xb;})))]));})));Tb = (new yb("Double", "System.Double", (function(_b){return [];}), (function(_b){return (new ub());})));Ub = (new yb("Int32", "System.Int32", (function(_b){return [];}), (function(_b){return (new ub());})));Vb = (new yb("Occupation", "FunScript.Tests.Reflection+Occupation", (function(_b){return [];}), (function(_b){return (new xb([(new Eb("Academic", 0, (function(ac){return (new fb());}), [])), (new Eb("Unemployed", 1, (function(ac){return (new ib());}), [])), (new Eb("Employed", 2, (function(ac){return (new gb(ac[0]));}), [(new mb("Item", (function(ac){return ac.Item;}), (function(ac){return Sb;})))]))]));})));Wb = (new yb("Person", "FunScript.Tests.Reflection+Person", (function(_b){return [];}), (function(_b){return (new vb((function(ac){return (new kb(ac[0], ac[1], ac[2]));}), [(new mb("Name", (function(ac){return ac.Name;}), (function(ac){return Zb;}))), (new mb("Occupation", (function(ac){return ac.Occupation;}), (function(ac){return Vb;}))), (new mb("Age", (function(ac){return ac.Age;}), (function(ac){return Ub;})))]));})));Xb = (new yb("String", "System.String", (function(_b){return [];}), (function(_b){return (new ub());})));Yb = (new yb("Tuple`2", "System.Tuple`2[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]", (function(_b){return [(new yb("String", "System.String", (function(ac){return [];}), (function(ac){return (new ub());}))), (new yb("String", "System.String", (function(ac){return [];}), (function(ac){return (new ub());})))];}), (function(_b){return (new wb((function(ac){return (new qb(ac[0], ac[1]));}), [Xb, Xb]));})));Zb = (new yb("Tuple`2", "System.Tuple`2[[System.Tuple`2[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]", (function(_b){return [(new yb("Tuple`2", "System.Tuple`2[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]", (function(ac){return [(new yb("String", "System.String", (function(bc){return [];}), (function(bc){return (new ub());}))), (new yb("String", "System.String", (function(bc){return [];}), (function(bc){return (new ub());})))];}), (function(ac){return (new wb((function(bc){return (new qb(bc[0], bc[1]));}), [Xb, Xb]));}))), (new yb("String", "System.String", (function(ac){return [];}), (function(ac){return (new ub());})))];}), (function(_b){return (new wb((function(ac){return (new rb(ac[0], ac[1]));}), [Yb, Xb]));})));var _b = ob();var ac = J(Lb(Wb, _b));var bc = Kb(ac);return ((tb(_b.Name)(bc.Name) == 0) && (jb(_b)(bc) == 0)) | |
***** FunScript.Tests.Reflection.GetTupleElements is translated | |
// Code: | |
var v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(Item){var x = this;x.Tag = 0.000000;x._CaseName = "AccessToken";x.Item = Item;});b = (function(w){var x = n(w);if ((x.Tag == 3.000000)) {var y = x.Item2;return y;}else{throw ("Not a tuple type.");return null;};});c = (function(w){return (new d(null, w));});d = (function(w,x){var y = this;{};y.factory = x;y.isCreated = false;y.value_24 = w;});e = (function(w,x){if ((!w.isCreated)) {var y;w.value_24 = w.factory(y);w.isCreated = true;}else{;};return w.value_24;});f = (function(w,x,y){var z = this;{};z.name = w;z.f = x;z.getPropType = y;});g = (function(Item0,Item1){var y = this;y.Items = [Item0, Item1];});h = (function(){var w = this;w.Tag = 0.000000;w._CaseName = "ClassType";});i = (function(Item1,Item2){var y = this;y.Tag = 1.000000;y._CaseName = "RecordType";y.Item1 = Item1;y.Item2 = Item2;});j = (function(Item1,Item2){var y = this;y.Tag = 3.000000;y._CaseName = "TupleType";y.Item1 = Item1;y.Item2 = Item2;});k = (function(Item){var x = this;x.Tag = 2.000000;x._CaseName = "UnionType";x.Item = Item;});l = (function(w,x,y,z){var A = this;{};A.name = w;A.fullName = x;A.typeArgs_32 = c((function(B){var C;return y(C);}));A.kind_33 = c((function(B){var C;return z(C);}));});m = (function(w,x){return w.fullName;});n = (function(w,x){return e(w.kind_33);});o = (function(w,x,y,z){var A = this;{};A.name = w;A.tag = x;A.cons = y;A.fields = z;});p = (function(Item){var x = this;x.Tag = 0.000000;x._CaseName = "UserId";x.Item = Item;});q = (function(w){var x = this;x.Id = w;});r = (new l("AccessToken", "FunScript.Tests.Reflection+TestDomain+AccessToken", (function(w){return [];}), (function(w){return (new k([(new o("AccessToken", 0, (function(x){return (new a(x[0]));}), [(new f("Item", (function(x){return x.Item;}), (function(x){return s;})))]))]));})));s = (new l("Guid", "System.Guid", (function(w){return [];}), (function(w){return (new h());})));t = (new l("Tuple`2", "System.Tuple`2[[FunScript.Tests.Reflection+TestDomain+User, FunScript.Tests, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null],[FunScript.Tests.Reflection+TestDomain+AccessToken, FunScript.Tests, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]", (function(w){return [(new l("User", "FunScript.Tests.Reflection+TestDomain+User", (function(x){return [];}), (function(x){return (new i((function(y){return (new q(y[0]));}), [(new f("Id", (function(y){return y.Id;}), (function(y){return u;})))]));}))), (new l("AccessToken", "FunScript.Tests.Reflection+TestDomain+AccessToken", (function(x){return [];}), (function(x){return (new k([(new o("AccessToken", 0, (function(y){return (new a(y[0]));}), [(new f("Item", (function(y){return y.Item;}), (function(y){return s;})))]))]));})))];}), (function(w){return (new j((function(x){return (new g(x[0], x[1]));}), [v, r]));})));u = (new l("UserId", "FunScript.Tests.Reflection+TestDomain+UserId", (function(w){return [];}), (function(w){return (new k([(new o("UserId", 0, (function(x){return (new p(x[0]));}), [(new f("Item", (function(x){return x.Item;}), (function(x){return s;})))]))]));})));v = (new l("User", "FunScript.Tests.Reflection+TestDomain+User", (function(w){return [];}), (function(w){return (new i((function(x){return (new q(x[0]));}), [(new f("Id", (function(x){return x.Id;}), (function(x){return u;})))]));})));var w = t;var x = b(w);return (m(x[0]) + m(x[1])) | |
***** FunScript.Tests.Reflection.GetType on concrete argument works | |
// Code: | |
var g, f, e, d, c, b, a;a = (function(h){return (new b(null, h));});b = (function(h,i){var j = this;{};j.factory = i;j.isCreated = false;j.value_24 = h;});c = (function(){var h = this;h.Tag = 0.000000;h._CaseName = "ClassType";});d = (function(h,i,j,k){var l = this;{};l.name = h;l.fullName = i;l.typeArgs_32 = a((function(m){var n;return j(n);}));l.kind_33 = a((function(m){var n;return k(n);}));});e = (function(h,i){return h.fullName;});f = (new d("Boolean", "System.Boolean", (function(h){return [];}), (function(h){return (new c());})));g = (new d("Double", "System.Double", (function(h){return [];}), (function(h){return (new c());})));var h = 1.000000;var i = true;return (e(g) + e(f)) | |
***** FunScript.Tests.Reflection.GetType on generic argument works | |
// Code: | |
var i, h, g, f, e, d, c, b, a;a = (function(j){return (new b(null, j));});b = (function(j,k){var l = this;{};l.factory = k;l.isCreated = false;l.value_24 = j;});c = (function(){var j = this;j.Tag = 0.000000;j._CaseName = "ClassType";});d = (function(j,k,l,m){var n = this;{};n.name = j;n.fullName = k;n.typeArgs_32 = a((function(o){var p;return l(p);}));n.kind_33 = a((function(o){var p;return m(p);}));});e = (function(j,k){return j.fullName;});f = (function(j){return e(h);});g = (function(j){return e(i);});h = (new d("Boolean", "System.Boolean", (function(j){return [];}), (function(j){return (new c());})));i = (new d("Double", "System.Double", (function(j){return [];}), (function(j){return (new c());})));return (g(1.000000) + f(true)) | |
***** FunScript.Tests.Reflection.GetType on generic collection works | |
// Code: | |
var x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(y){return (new b(null, y));});b = (function(y,z){var A = this;{};A.factory = z;A.isCreated = false;A.value_24 = y;});c = (function(y,z){return (new q(y, z));});d = (function(y,z){return (new s(y, z));});e = (function(){return (new r());});f = (function(){return (new t());});g = (function(y){if ((y.Tag == 1.000000)) {var z = y.Item2;var A = y.Item1;return A;}else{throw ("List was empty");return null;};});h = (function(y){if ((y.Tag == 1.000000)) {var z = y.Item2;var A = y.Item1;return A;}else{throw ("List was empty");return null;};});i = (function(y){if ((y.Tag == 1.000000)) {var z = y.Item2;var A = y.Item1;return z;}else{throw ("List was empty");return null;};});j = (function(y){if ((y.Tag == 1.000000)) {var z = y.Item2;var A = y.Item1;return z;}else{throw ("List was empty");return null;};});k = (function(y,z,A){var B = this;{};B.name = y;B.f = z;B.getPropType = A;});l = (function(){var y = this;y.Tag = 0.000000;y._CaseName = "ClassType";});m = (function(Item){var z = this;z.Tag = 2.000000;z._CaseName = "UnionType";z.Item = Item;});n = (function(y,z,A,B){var C = this;{};C.name = y;C.fullName = z;C.typeArgs_32 = a((function(D){var E;return A(E);}));C.kind_33 = a((function(D){var E;return B(E);}));});o = (function(y,z){return y.fullName;});p = (function(y,z,A,B){var C = this;{};C.name = y;C.tag = z;C.cons = A;C.fields = B;});q = (function(Item1,Item2){var A = this;A.Tag = 1.000000;A._CaseName = "Cons";A.Item1 = Item1;A.Item2 = Item2;});r = (function(){var y = this;y.Tag = 0.000000;y._CaseName = "Nil";});s = (function(Item1,Item2){var A = this;A.Tag = 1.000000;A._CaseName = "Cons";A.Item1 = Item1;A.Item2 = Item2;});t = (function(){var y = this;y.Tag = 0.000000;y._CaseName = "Nil";});u = (new n("Boolean", "System.Boolean", (function(y){return [];}), (function(y){return (new l());})));v = (new n("Double", "System.Double", (function(y){return [];}), (function(y){return (new l());})));w = (new n("FSharpList`1", "Microsoft.FSharp.Collections.FSharpList`1[[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]", (function(y){return [(new n("Boolean", "System.Boolean", (function(z){return [];}), (function(z){return (new l());})))];}), (function(y){return (new m([(new p("Empty", 0, (function(z){return e();}), [])), (new p("Cons", 1, (function(z){return c(z[0], z[1]);}), [(new k("Head", (function(z){return g(z);}), (function(z){return u;}))), (new k("Tail", (function(z){return i(z);}), (function(z){return w;})))]))]));})));x = (new n("FSharpList`1", "Microsoft.FSharp.Collections.FSharpList`1[[System.Double, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]", (function(y){return [(new n("Double", "System.Double", (function(z){return [];}), (function(z){return (new l());})))];}), (function(y){return (new m([(new p("Empty", 0, (function(z){return f();}), [])), (new p("Cons", 1, (function(z){return d(z[0], z[1]);}), [(new k("Head", (function(z){return h(z);}), (function(z){return v;}))), (new k("Tail", (function(z){return j(z);}), (function(z){return x;})))]))]));})));return (o(x) + o(w)) | |
***** FunScript.Tests.Reflection.Recursive types should be translated | |
// Code: | |
var u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(v){return v.length;;});b = (function(v,w){return c((function(x){return (function(y){return v(y);});}), w);});c = (function(v,w){var x = d(a(w));for (var y = 0; y <= (a(w) - 1); y++){x[y] = v(y)(w[y]);null;};return x;});d = (function(v){return new Array(v);;});e = (function(v,w){var x = q(v);if ((x.Tag == 2.000000)) {var y = x.Item;return y;}else{throw ("Not a union type.");return null;};});f = (function(v){return (new g(null, v));});g = (function(v,w){var x = this;{};x.factory = w;x.isCreated = false;x.value_24 = v;});h = (function(v,w){if ((!v.isCreated)) {var x;v.value_24 = v.factory(x);v.isCreated = true;}else{;};return v.value_24;});i = (function(v,w,x){var y = this;{};y.name = v;y.f = w;y.getPropType = x;});j = (function(v,w){var x;return v.getPropType(x);});k = (function(){var v = this;v.Tag = 0.000000;v._CaseName = "Leaf";});l = (function(Item1,Item2,Item3){var y = this;y.Tag = 1.000000;y._CaseName = "Node";y.Item1 = Item1;y.Item2 = Item2;y.Item3 = Item3;});m = (function(){var v = this;v.Tag = 0.000000;v._CaseName = "ClassType";});n = (function(Item){var w = this;w.Tag = 2.000000;w._CaseName = "UnionType";w.Item = Item;});o = (function(v,w,x,y){var z = this;{};z.name = v;z.fullName = w;z.typeArgs_32 = f((function(A){var B;return x(B);}));z.kind_33 = f((function(A){var B;return y(B);}));});p = (function(v,w){return v.fullName;});q = (function(v,w){return h(v.kind_33);});r = (function(v,w){return v.fields;});s = (function(v,w,x,y){var z = this;{};z.name = v;z.tag = w;z.cons = x;z.fields = y;});t = (new o("Int32", "System.Int32", (function(v){return [];}), (function(v){return (new m());})));u = (new o("RecursiveType`1", "FunScript.Tests.Reflection+RecursiveType`1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]", (function(v){return [(new o("Int32", "System.Int32", (function(w){return [];}), (function(w){return (new m());})))];}), (function(v){return (new n([(new s("Leaf", 0, (function(w){return (new k());}), [])), (new s("Node", 1, (function(w){return (new l(w[0], w[1], w[2]));}), [(new i("Item1", (function(w){return w.Item1;}), (function(w){return t;}))), (new i("Item2", (function(w){return w.Item2;}), (function(w){return u;}))), (new i("Item3", (function(w){return w.Item3;}), (function(w){return u;})))]))]));})));var v = u;var w = e(v, {Tag: 0.000000});var x = w[1];var y = b((function(z){return p(j(z));}), r(x));return ((((p(v) + ";") + y[0]) + ";") + y[1]) | |
***** FunScript.Tests.Reflection.Serialization works using reflection API | |
// Code: | |
var Hb, Gb, Fb, Eb, Db, Cb, Bb, Ab, zb, yb, xb, wb, vb, ub, tb, sb, rb, qb, pb, ob, nb, mb, lb, kb, jb, ib, hb, gb, fb, eb, db, cb, bb, ab, _, Z, Y, X, W, V, U, T, S, R, Q, P, O, N, M, L, K, J, I, H, G, F, E, D, C, B, A, z, y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(Ib,Jb,Kb){return c((function(Lb){return (function(Mb){return (function(Nb){return Ib(Mb)(Nb);});});}), Jb, Kb);});b = (function(Ib,Jb,Kb){return d((function(Lb){return (function(Mb){return (function(Nb){return Ib(Mb)(Nb);});});}), Jb, Kb);});c = (function(Ib,Jb,Kb){var Lb = Kb;var Mb = e(Jb);for (var Nb = 1; Nb <= Mb; Nb++){Lb = Ib((Nb - 1))(Jb[(Mb - Nb)])(Lb);null;};return Lb;});d = (function(Ib,Jb,Kb){var Lb = Kb;var Mb = h(Jb);for (var Nb = 1; Nb <= Mb; Nb++){Lb = Ib((Nb - 1))(Jb[(Mb - Nb)])(Lb);null;};return Lb;});e = (function(Ib){return Ib.length;;});f = (function(Ib){return Ib.length;;});g = (function(Ib){return Ib.length;;});h = (function(Ib){return Ib.length;;});i = (function(Ib){return Ib.length;;});j = (function(Ib,Jb){return l((function(Kb){return (function(Lb){return Ib(Lb);});}), Jb);});k = (function(Ib,Jb,Kb){return m((function(Lb){return (function(Mb){return (function(Nb){return Ib(Mb)(Nb);});});}), Jb, Kb);});l = (function(Ib,Jb){var Kb = o(g(Jb));for (var Lb = 0; Lb <= (g(Jb) - 1); Lb++){Kb[Lb] = Ib(Lb)(Jb[Lb]);null;};return Kb;});m = (function(Ib,Jb,Kb){if ((i(Jb) != f(Kb))) {throw ("Arrays had different lengths");null;}else{;};var Lb = n(i(Jb));for (var Mb = 0; Mb <= (i(Jb) - 1); Mb++){Lb[Mb] = Ib(Mb)(Jb[Mb])(Kb[Mb]);null;};return Lb;});n = (function(Ib){return new Array(Ib);;});o = (function(Ib){return new Array(Ib);;});p = (function(Ib,Jb){var Kb = this;Kb.Name = Ib;Kb.Address = Jb;});q = (function(Ib,Jb){var Kb = ob(Ib);if ((Kb.Tag == 1.000000)) {var Lb = Kb.Item2;return Lb;}else{throw ("Not a record type.");return null;};});r = (function(Ib){var Jb = ob(Ib);if ((Jb.Tag == 3.000000)) {var Kb = Jb.Item2;return Kb;}else{throw ("Not a tuple type.");return null;};});s = (function(Ib,Jb){var Kb = ob(Ib);if ((Kb.Tag == 2.000000)) {var Lb = Kb.Item;return Lb;}else{throw ("Not a union type.");return null;};});t = (function(Ib,Jb){var Kb = ob(Ib);return ((Kb.Tag == 1.000000) && true);});u = (function(Ib){var Jb = ob(Ib);return ((Jb.Tag == 3.000000) && true);});v = (function(Ib,Jb){var Kb = ob(Ib);return ((Kb.Tag == 2.000000) && true);});w = (function(Ib,Jb){return (function(Kb){return Kb.Tag;});});x = (function(Item){var Jb = this;Jb.Tag = 4.000000;Jb._CaseName = "JArray";Jb.Item = Item;});y = (function(Item){var Jb = this;Jb.Tag = 1.000000;Jb._CaseName = "JNumber";Jb.Item = Item;});z = (function(Item){var Jb = this;Jb.Tag = 3.000000;Jb._CaseName = "JObject";Jb.Item = Item;});A = (function(Item){var Jb = this;Jb.Tag = 2.000000;Jb._CaseName = "JString";Jb.Item = Item;});B = (function(Ib,Jb){var Kb;Kb = (function(Lb){return (function(Mb){var Nb = (Lb + " ");if ((Mb.Tag == 1.000000)) {var Ob = Mb.Item;return (Lb + Ob.toString());}else{if ((Mb.Tag == 2.000000)) {var Pb = Mb.Item;return (((Lb + "\"") + Pb) + "\"");}else{if ((Mb.Tag == 4.000000)) {var Qb = Mb.Item;var Rb = W((function(Sb){return (function(Tb){return ((Sb + ",\n") + Tb);});}), S((function(Sb){return (Lb + Kb(Nb)(Sb));}), Qb));return ((((Lb + "[\n") + Rb) + Lb) + "]\n");}else{if ((Mb.Tag == 3.000000)) {var Sb = Mb.Item;var Tb = {contents: false};var Ub = W((function(Vb){return (function(Wb){return ((Vb + ",\n") + Wb);});}), T((function(Vb){var Wb = Vb.Items[0.000000];var Xb = Vb.Items[1.000000];return (((((Nb + "\"") + Wb) + "\"") + " : ") + Kb("")(Xb));}), Sb));return ((((Lb + "{\n") + Ub) + Lb) + "}\n");}else{return "null";};};};};});});return Kb("")(Ib);});C = (function(Ib){return (new D(null, Ib));});D = (function(Ib,Jb){var Kb = this;{};Kb.factory = Jb;Kb.isCreated = false;Kb.value_24 = Ib;});E = (function(Ib,Jb){if ((!Ib.isCreated)) {var Kb;Ib.value_24 = Ib.factory(Kb);Ib.isCreated = true;}else{;};return Ib.value_24;});F = (function(Ib,Jb){return (new yb(Ib, Jb));});G = (function(Ib,Jb,Kb){return K((function(Lb){return (function(Mb){return (function(Nb){return Ib(Mb)(Nb);});});}), Jb, Kb);});H = (function(Ib,Jb,Kb){return L((function(Lb){return (function(Mb){return (function(Nb){return Ib(Mb)(Nb);});});}), Jb, Kb);});I = (function(Ib,Jb,Kb){return M((function(Lb){return (function(Mb){return (function(Nb){return Ib(Mb)(Nb);});});}), Jb, Kb);});J = (function(Ib,Jb,Kb){return N((function(Lb){return (function(Mb){return (function(Nb){return Ib(Mb)(Nb);});});}), Jb, Kb);});K = (function(Ib,Jb,Kb){return P(Ib, 0, Jb, Kb);});L = (function(Ib,Jb,Kb){return O(Ib, 0, Jb, Kb);});M = (function(Ib,Jb,Kb){return Q(Ib, 0, Jb, Kb);});N = (function(Ib,Jb,Kb){return R(Ib, 0, Jb, Kb);});O = (function(Ib,Jb,Kb,Lb){if ((Lb.Tag == 1.000000)) {var Mb = Lb.Item2;var Nb = Lb.Item1;return O(Ib, (Jb + 1), Ib(Jb)(Kb)(Nb), Mb);}else{return Kb;};});P = (function(Ib,Jb,Kb,Lb){if ((Lb.Tag == 1.000000)) {var Mb = Lb.Item2;var Nb = Lb.Item1;return P(Ib, (Jb + 1), Ib(Jb)(Kb)(Nb), Mb);}else{return Kb;};});Q = (function(Ib,Jb,Kb,Lb){if ((Lb.Tag == 1.000000)) {var Mb = Lb.Item2;var Nb = Lb.Item1;return Q(Ib, (Jb + 1), Ib(Jb)(Kb)(Nb), Mb);}else{return Kb;};});R = (function(Ib,Jb,Kb,Lb){if ((Lb.Tag == 1.000000)) {var Mb = Lb.Item2;var Nb = Lb.Item1;return R(Ib, (Jb + 1), Ib(Jb)(Kb)(Nb), Mb);}else{return Kb;};});S = (function(Ib,Jb){return X(G((function(Kb){return (function(Lb){return (new wb(Ib(Lb), Kb));});}), (new xb()), Jb));});T = (function(Ib,Jb){return X(J((function(Kb){return (function(Lb){return (new wb(Ib(Lb), Kb));});}), (new xb()), Jb));});U = (function(Ib){return a((function(Jb){return (function(Kb){return (new ub(Jb, Kb));});}), Ib, (new vb()));});V = (function(Ib){return b((function(Jb){return (function(Kb){return (new yb(Jb, Kb));});}), Ib, (new zb()));});W = (function(Ib,Jb){if ((Jb.Tag == 1.000000)) {var Kb = Jb.Item2;var Lb = Jb.Item1;return H(Ib, Lb, Kb);}else{throw ("List was empty");return null;};});X = (function(Ib){return I((function(Jb){return (function(Kb){return (new wb(Kb, Jb));});}), (new xb()), Ib);});Y = (function(){var Ib = this;Ib.Tag = 0.000000;Ib._CaseName = "Academic";});Z = (function(Item){var Jb = this;Jb.Tag = 2.000000;Jb._CaseName = "Employed";Jb.Item = Item;});_ = (function(){var Ib = this;Ib.Tag = 1.000000;Ib._CaseName = "Unemployed";});ab = (function(Ib,Jb,Kb){var Lb = this;Lb.Name = Ib;Lb.Occupation = Jb;Lb.Age = Kb;});bb = (function(Ib,Jb,Kb){return Ib.f(Jb);});cb = (function(Ib,Jb,Kb){var Lb = this;{};Lb.name = Ib;Lb.f = Jb;Lb.getPropType = Kb;});db = (function(Ib,Jb){var Kb;return Ib.getPropType(Kb);});eb = (function(Ib){var Jb = 1000000;return (new ab((new hb((new gb("Bob", "A")), "Diamonte")), (new Z((new p("Big Bank", "Centre of the Universe")))), Jb));});fb = (function(Item0,Item1){var Kb = this;Kb.Items = [Item0, Item1];});gb = (function(Item0,Item1){var Kb = this;Kb.Items = [Item0, Item1];});hb = (function(Item0,Item1){var Kb = this;Kb.Items = [Item0, Item1];});ib = (function(){var Ib = this;Ib.Tag = 0.000000;Ib._CaseName = "ClassType";});jb = (function(Item1,Item2){var Kb = this;Kb.Tag = 1.000000;Kb._CaseName = "RecordType";Kb.Item1 = Item1;Kb.Item2 = Item2;});kb = (function(Item1,Item2){var Kb = this;Kb.Tag = 3.000000;Kb._CaseName = "TupleType";Kb.Item1 = Item1;Kb.Item2 = Item2;});lb = (function(Item){var Jb = this;Jb.Tag = 2.000000;Jb._CaseName = "UnionType";Jb.Item = Item;});mb = (function(Ib,Jb,Kb,Lb){var Mb = this;{};Mb.name = Ib;Mb.fullName = Jb;Mb.typeArgs_32 = C((function(Nb){var Ob;return Kb(Ob);}));Mb.kind_33 = C((function(Nb){var Ob;return Lb(Ob);}));});nb = (function(Ib,Jb){return Ib.fullName;});ob = (function(Ib,Jb){return E(Ib.kind_33);});pb = (function(Ib,Jb){return Ib.name;});qb = (function(Ib,Jb){return Ib.fields;});rb = (function(Ib,Jb,Kb,Lb){var Mb = this;{};Mb.name = Ib;Mb.tag = Jb;Mb.cons = Kb;Mb.fields = Lb;});sb = (function(Ib,Jb){return Ib.tag;});tb = (function(Ib,Jb){if (v(Ib, {Tag: 0.000000})) {var Kb = w(Ib, {Tag: 0.000000});var Lb = s(Ib, {Tag: 0.000000});var Mb = Kb(Jb);var Nb = Lb[Mb];var Ob = qb(Nb);var Pb = V(j((function(Qb){var Rb = tb(db(Qb), bb(Qb, Jb, []));return (new fb(pb(Qb), Rb));}), Ob));var Qb = (new fb("Tag", (new y(sb(Nb)))));var Rb = F(Qb, Pb);return (new z(Rb));}else{if (t(Ib, {Tag: 0.000000})) {var Sb = q(Ib, {Tag: 0.000000});var Tb = V(j((function(Ub){var Vb = tb(db(Ub), bb(Ub, Jb, []));return (new fb(pb(Ub), Vb));}), Sb));return (new z(Tb));}else{if (u(Ib)) {var Ub = r(Ib);var Vb = Jb.Items;var Wb = U(k((function(Xb){return (function(Yb){return tb(Xb, Yb);});}), Ub, Vb));return (new x(Wb));}else{if ((nb(Ib) == nb(Cb))) {return (new y(Jb));}else{if ((nb(Ib) == nb(Bb))) {return (new y(Jb));}else{if ((nb(Ib) == nb(Fb))) {return (new A(Jb));}else{throw ("Unsupported type");return null;};};};};};};});ub = (function(Item1,Item2){var Kb = this;Kb.Tag = 1.000000;Kb._CaseName = "Cons";Kb.Item1 = Item1;Kb.Item2 = Item2;});vb = (function(){var Ib = this;Ib.Tag = 0.000000;Ib._CaseName = "Nil";});wb = (function(Item1,Item2){var Kb = this;Kb.Tag = 1.000000;Kb._CaseName = "Cons";Kb.Item1 = Item1;Kb.Item2 = Item2;});xb = (function(){var Ib = this;Ib.Tag = 0.000000;Ib._CaseName = "Nil";});yb = (function(Item1,Item2){var Kb = this;Kb.Tag = 1.000000;Kb._CaseName = "Cons";Kb.Item1 = Item1;Kb.Item2 = Item2;});zb = (function(){var Ib = this;Ib.Tag = 0.000000;Ib._CaseName = "Nil";});Ab = (new mb("Company", "FunScript.Tests.Reflection+Company", (function(Ib){return [];}), (function(Ib){return (new jb((function(Jb){return (new p(Jb[0], Jb[1]));}), [(new cb("Name", (function(Jb){return Jb.Name;}), (function(Jb){return Fb;}))), (new cb("Address", (function(Jb){return Jb.Address;}), (function(Jb){return Fb;})))]));})));Bb = (new mb("Double", "System.Double", (function(Ib){return [];}), (function(Ib){return (new ib());})));Cb = (new mb("Int32", "System.Int32", (function(Ib){return [];}), (function(Ib){return (new ib());})));Db = (new mb("Occupation", "FunScript.Tests.Reflection+Occupation", (function(Ib){return [];}), (function(Ib){return (new lb([(new rb("Academic", 0, (function(Jb){return (new Y());}), [])), (new rb("Unemployed", 1, (function(Jb){return (new _());}), [])), (new rb("Employed", 2, (function(Jb){return (new Z(Jb[0]));}), [(new cb("Item", (function(Jb){return Jb.Item;}), (function(Jb){return Ab;})))]))]));})));Eb = (new mb("Person", "FunScript.Tests.Reflection+Person", (function(Ib){return [];}), (function(Ib){return (new jb((function(Jb){return (new ab(Jb[0], Jb[1], Jb[2]));}), [(new cb("Name", (function(Jb){return Jb.Name;}), (function(Jb){return Hb;}))), (new cb("Occupation", (function(Jb){return Jb.Occupation;}), (function(Jb){return Db;}))), (new cb("Age", (function(Jb){return Jb.Age;}), (function(Jb){return Cb;})))]));})));Fb = (new mb("String", "System.String", (function(Ib){return [];}), (function(Ib){return (new ib());})));Gb = (new mb("Tuple`2", "System.Tuple`2[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]", (function(Ib){return [(new mb("String", "System.String", (function(Jb){return [];}), (function(Jb){return (new ib());}))), (new mb("String", "System.String", (function(Jb){return [];}), (function(Jb){return (new ib());})))];}), (function(Ib){return (new kb((function(Jb){return (new gb(Jb[0], Jb[1]));}), [Fb, Fb]));})));Hb = (new mb("Tuple`2", "System.Tuple`2[[System.Tuple`2[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]", (function(Ib){return [(new mb("Tuple`2", "System.Tuple`2[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]", (function(Jb){return [(new mb("String", "System.String", (function(Kb){return [];}), (function(Kb){return (new ib());}))), (new mb("String", "System.String", (function(Kb){return [];}), (function(Kb){return (new ib());})))];}), (function(Jb){return (new kb((function(Kb){return (new gb(Kb[0], Kb[1]));}), [Fb, Fb]));}))), (new mb("String", "System.String", (function(Jb){return [];}), (function(Jb){return (new ib());})))];}), (function(Ib){return (new kb((function(Jb){return (new hb(Jb[0], Jb[1]));}), [Gb, Fb]));})));var Ib = eb();return B(tb(Eb, Ib)) | |
***** FunScript.Tests.Reflection.threaded partially applied typeof<'genericT>.FullName works | |
// Code: | |
var j, i, h, g, f, e, d, c, b, a;a = (function(k){return (new b(null, k));});b = (function(k,l){var m = this;{};m.factory = l;m.isCreated = false;m.value_24 = k;});c = (function(){var k = this;k.Tag = 0.000000;k._CaseName = "ClassType";});d = (function(k,l,m,n){var o = this;{};o.name = k;o.fullName = l;o.typeArgs_32 = a((function(p){var q;return m(q);}));o.kind_33 = a((function(p){var q;return n(q);}));});e = (function(k,l){return k.fullName;});f = (function(k){return e(i);});g = (function(k){return e(j);});h = (function(k,l){return (f() + g());});i = (new d("Double", "System.Double", (function(k){return [];}), (function(k){return (new c());})));j = (new d("Int32", "System.Int32", (function(k){return [];}), (function(k){return (new c());})));return h(1, (function(k){return k;})) | |
***** FunScript.Tests.Reflection.threaded typeof<'genericT>.FullName works | |
// Code: | |
var l, k, j, i, h, g, f, e, d, c, b, a;a = (function(m){return (new b(null, m));});b = (function(m,n){var o = this;{};o.factory = n;o.isCreated = false;o.value_24 = m;});c = (function(){var m = this;m.Tag = 0.000000;m._CaseName = "ClassType";});d = (function(m,n,o,p){var q = this;{};q.name = m;q.fullName = n;q.typeArgs_32 = a((function(r){var s;return o(s);}));q.kind_33 = a((function(r){var s;return p(s);}));});e = (function(m,n){return m.fullName;});f = (function(m){return e(j);});g = (function(m){return e(k);});h = (function(m){return e(l);});i = (function(m){return ((h("abc") + g()) + f());});j = (new d("Boolean", "System.Boolean", (function(m){return [];}), (function(m){return (new c());})));k = (new d("Double", "System.Double", (function(m){return [];}), (function(m){return (new c());})));l = (new d("String", "System.String", (function(m){return [];}), (function(m){return (new c());})));return i() | |
***** FunScript.Tests.Reflection.typeof<ConcreteCollection<ConcreteT>>.FullName works | |
// Code: | |
var p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(q){return (new b(null, q));});b = (function(q,r){var s = this;{};s.factory = r;s.isCreated = false;s.value_24 = q;});c = (function(q,r){return (new m(q, r));});d = (function(){return (new n());});e = (function(q){if ((q.Tag == 1.000000)) {var r = q.Item2;var s = q.Item1;return s;}else{throw ("List was empty");return null;};});f = (function(q){if ((q.Tag == 1.000000)) {var r = q.Item2;var s = q.Item1;return r;}else{throw ("List was empty");return null;};});g = (function(q,r,s){var t = this;{};t.name = q;t.f = r;t.getPropType = s;});h = (function(){var q = this;q.Tag = 0.000000;q._CaseName = "ClassType";});i = (function(Item){var r = this;r.Tag = 2.000000;r._CaseName = "UnionType";r.Item = Item;});j = (function(q,r,s,t){var u = this;{};u.name = q;u.fullName = r;u.typeArgs_32 = a((function(v){var w;return s(w);}));u.kind_33 = a((function(v){var w;return t(w);}));});k = (function(q,r){return q.fullName;});l = (function(q,r,s,t){var u = this;{};u.name = q;u.tag = r;u.cons = s;u.fields = t;});m = (function(Item1,Item2){var s = this;s.Tag = 1.000000;s._CaseName = "Cons";s.Item1 = Item1;s.Item2 = Item2;});n = (function(){var q = this;q.Tag = 0.000000;q._CaseName = "Nil";});o = (new j("Double", "System.Double", (function(q){return [];}), (function(q){return (new h());})));p = (new j("FSharpList`1", "Microsoft.FSharp.Collections.FSharpList`1[[System.Double, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]", (function(q){return [(new j("Double", "System.Double", (function(r){return [];}), (function(r){return (new h());})))];}), (function(q){return (new i([(new l("Empty", 0, (function(r){return d();}), [])), (new l("Cons", 1, (function(r){return c(r[0], r[1]);}), [(new g("Head", (function(r){return e(r);}), (function(r){return o;}))), (new g("Tail", (function(r){return f(r);}), (function(r){return p;})))]))]));})));return k(p) | |
***** FunScript.Tests.Reflection.typeof<ConcreteT>.FullName works | |
// Code: | |
var f, e, d, c, b, a;a = (function(g){return (new b(null, g));});b = (function(g,h){var i = this;{};i.factory = h;i.isCreated = false;i.value_24 = g;});c = (function(){var g = this;g.Tag = 0.000000;g._CaseName = "ClassType";});d = (function(g,h,i,j){var k = this;{};k.name = g;k.fullName = h;k.typeArgs_32 = a((function(l){var m;return i(m);}));k.kind_33 = a((function(l){var m;return j(m);}));});e = (function(g,h){return g.fullName;});f = (new d("Double", "System.Double", (function(g){return [];}), (function(g){return (new c());})));return e(f) | |
***** FunScript.Tests.Reflection.typeof<'genericT list>.FullName works | |
// Code: | |
var z, y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(A){return (new b(null, A));});b = (function(A,B){var C = this;{};C.factory = B;C.isCreated = false;C.value_24 = A;});c = (function(A,B){return (new s(A, B));});d = (function(A,B){return (new u(A, B));});e = (function(){return (new t());});f = (function(){return (new v());});g = (function(A){if ((A.Tag == 1.000000)) {var B = A.Item2;var C = A.Item1;return C;}else{throw ("List was empty");return null;};});h = (function(A){if ((A.Tag == 1.000000)) {var B = A.Item2;var C = A.Item1;return C;}else{throw ("List was empty");return null;};});i = (function(A){if ((A.Tag == 1.000000)) {var B = A.Item2;var C = A.Item1;return B;}else{throw ("List was empty");return null;};});j = (function(A){if ((A.Tag == 1.000000)) {var B = A.Item2;var C = A.Item1;return B;}else{throw ("List was empty");return null;};});k = (function(A,B,C){var D = this;{};D.name = A;D.f = B;D.getPropType = C;});l = (function(){var A = this;A.Tag = 0.000000;A._CaseName = "ClassType";});m = (function(Item){var B = this;B.Tag = 2.000000;B._CaseName = "UnionType";B.Item = Item;});n = (function(A,B,C,D){var E = this;{};E.name = A;E.fullName = B;E.typeArgs_32 = a((function(F){var G;return C(G);}));E.kind_33 = a((function(F){var G;return D(G);}));});o = (function(A,B){return A.fullName;});p = (function(A,B,C,D){var E = this;{};E.name = A;E.tag = B;E.cons = C;E.fields = D;});q = (function(A){return o(y);});r = (function(A){return o(z);});s = (function(Item1,Item2){var C = this;C.Tag = 1.000000;C._CaseName = "Cons";C.Item1 = Item1;C.Item2 = Item2;});t = (function(){var A = this;A.Tag = 0.000000;A._CaseName = "Nil";});u = (function(Item1,Item2){var C = this;C.Tag = 1.000000;C._CaseName = "Cons";C.Item1 = Item1;C.Item2 = Item2;});v = (function(){var A = this;A.Tag = 0.000000;A._CaseName = "Nil";});w = (new n("Boolean", "System.Boolean", (function(A){return [];}), (function(A){return (new l());})));x = (new n("Double", "System.Double", (function(A){return [];}), (function(A){return (new l());})));y = (new n("FSharpList`1", "Microsoft.FSharp.Collections.FSharpList`1[[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]", (function(A){return [(new n("Boolean", "System.Boolean", (function(B){return [];}), (function(B){return (new l());})))];}), (function(A){return (new m([(new p("Empty", 0, (function(B){return e();}), [])), (new p("Cons", 1, (function(B){return c(B[0], B[1]);}), [(new k("Head", (function(B){return g(B);}), (function(B){return w;}))), (new k("Tail", (function(B){return i(B);}), (function(B){return y;})))]))]));})));z = (new n("FSharpList`1", "Microsoft.FSharp.Collections.FSharpList`1[[System.Double, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]", (function(A){return [(new n("Double", "System.Double", (function(B){return [];}), (function(B){return (new l());})))];}), (function(A){return (new m([(new p("Empty", 0, (function(B){return f();}), [])), (new p("Cons", 1, (function(B){return d(B[0], B[1]);}), [(new k("Head", (function(B){return h(B);}), (function(B){return x;}))), (new k("Tail", (function(B){return j(B);}), (function(B){return z;})))]))]));})));return (r() + q()) | |
***** FunScript.Tests.Reflection.typeof<'genericT>.FullName works | |
// Code: | |
var i, h, g, f, e, d, c, b, a;a = (function(j){return (new b(null, j));});b = (function(j,k){var l = this;{};l.factory = k;l.isCreated = false;l.value_24 = j;});c = (function(){var j = this;j.Tag = 0.000000;j._CaseName = "ClassType";});d = (function(j,k,l,m){var n = this;{};n.name = j;n.fullName = k;n.typeArgs_32 = a((function(o){var p;return l(p);}));n.kind_33 = a((function(o){var p;return m(p);}));});e = (function(j,k){return j.fullName;});f = (function(j){return e(h);});g = (function(j){return e(i);});h = (new d("Boolean", "System.Boolean", (function(j){return [];}), (function(j){return (new c());})));i = (new d("Double", "System.Double", (function(j){return [];}), (function(j){return (new c());})));return (g() + f()) | |
***** FunScript.Tests.Reflection.typeof<'genericT>.FullName works when 'genericT is a generic collection | |
// Code: | |
var z, y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(A){return (new b(null, A));});b = (function(A,B){var C = this;{};C.factory = B;C.isCreated = false;C.value_24 = A;});c = (function(A,B){return (new s(A, B));});d = (function(A,B){return (new u(A, B));});e = (function(){return (new t());});f = (function(){return (new v());});g = (function(A){if ((A.Tag == 1.000000)) {var B = A.Item2;var C = A.Item1;return C;}else{throw ("List was empty");return null;};});h = (function(A){if ((A.Tag == 1.000000)) {var B = A.Item2;var C = A.Item1;return C;}else{throw ("List was empty");return null;};});i = (function(A){if ((A.Tag == 1.000000)) {var B = A.Item2;var C = A.Item1;return B;}else{throw ("List was empty");return null;};});j = (function(A){if ((A.Tag == 1.000000)) {var B = A.Item2;var C = A.Item1;return B;}else{throw ("List was empty");return null;};});k = (function(A,B,C){var D = this;{};D.name = A;D.f = B;D.getPropType = C;});l = (function(){var A = this;A.Tag = 0.000000;A._CaseName = "ClassType";});m = (function(Item){var B = this;B.Tag = 2.000000;B._CaseName = "UnionType";B.Item = Item;});n = (function(A,B,C,D){var E = this;{};E.name = A;E.fullName = B;E.typeArgs_32 = a((function(F){var G;return C(G);}));E.kind_33 = a((function(F){var G;return D(G);}));});o = (function(A,B){return A.fullName;});p = (function(A,B,C,D){var E = this;{};E.name = A;E.tag = B;E.cons = C;E.fields = D;});q = (function(A){return o(y);});r = (function(A){return o(z);});s = (function(Item1,Item2){var C = this;C.Tag = 1.000000;C._CaseName = "Cons";C.Item1 = Item1;C.Item2 = Item2;});t = (function(){var A = this;A.Tag = 0.000000;A._CaseName = "Nil";});u = (function(Item1,Item2){var C = this;C.Tag = 1.000000;C._CaseName = "Cons";C.Item1 = Item1;C.Item2 = Item2;});v = (function(){var A = this;A.Tag = 0.000000;A._CaseName = "Nil";});w = (new n("Boolean", "System.Boolean", (function(A){return [];}), (function(A){return (new l());})));x = (new n("Double", "System.Double", (function(A){return [];}), (function(A){return (new l());})));y = (new n("FSharpList`1", "Microsoft.FSharp.Collections.FSharpList`1[[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]", (function(A){return [(new n("Boolean", "System.Boolean", (function(B){return [];}), (function(B){return (new l());})))];}), (function(A){return (new m([(new p("Empty", 0, (function(B){return e();}), [])), (new p("Cons", 1, (function(B){return c(B[0], B[1]);}), [(new k("Head", (function(B){return g(B);}), (function(B){return w;}))), (new k("Tail", (function(B){return i(B);}), (function(B){return y;})))]))]));})));z = (new n("FSharpList`1", "Microsoft.FSharp.Collections.FSharpList`1[[System.Double, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]", (function(A){return [(new n("Double", "System.Double", (function(B){return [];}), (function(B){return (new l());})))];}), (function(A){return (new m([(new p("Empty", 0, (function(B){return f();}), [])), (new p("Cons", 1, (function(B){return d(B[0], B[1]);}), [(new k("Head", (function(B){return h(B);}), (function(B){return x;}))), (new k("Tail", (function(B){return j(B);}), (function(B){return z;})))]))]));})));return (r() + q()) | |
***** FunScript.Tests.Regexs.Match.Groups indexer getter works("Chapter \\d+(\\.\\d)*") | |
// Code: | |
var h, g, f, e, d, c, b, a;a = (function(i){return Array.isArray(i) ? (i[0]) : i;});b = (function(i,j){return a(i);});c = (function(i,j){return i[j];});d = (function(i,j){return i;});e = (function(i){return (new RegExp(i, 'g' + ""));});f = (function(i,j){return h(i, j, 0);});g = (function(i,j){var k = e(j);return f(k, i);});h = (function(i,j,k){i.lastIndex = k; return i.exec(j);});var i = "For more information, see Chapter 3.4.5.1";var j = g(i, "Chapter \\d+(\\.\\d)*");var k = c(d(j), 1);return b(k) | |
***** FunScript.Tests.Regexs.Match.Groups iteration works("Chapter \\d+(\\.\\d)*") | |
// Code: | |
var s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(t){return t.length;;});b = (function(t){return Array.isArray(t) ? (t[0]) : t;});c = (function(t,u){return b(t);});d = (function(t){var u = this;{};u.factory = t;});e = (function(t,u){return a(t);});f = (function(t,u){return t[u];});g = (function(t,u){return t;});h = (function(t){return t.Value;;});i = (function(t){return t.Value;;});j = (function(t){return ((t.Tag == 1.000000) && true);});k = (function(t){return (new RegExp(t, 'g' + ""));});l = (function(t){return q((function(u){if ((u < e(t))) {return {Tag: 1.000000, Value: (new r(f(t, u), (u + 1)))};}else{return {Tag: 0.000000};};}), 0);});m = (function(t,u){return o(t, u, 0);});n = (function(t,u){var v = k(u);return m(v, t);});o = (function(t,u,v){t.lastIndex = v; return t.exec(u);});p = (function(t){var u;u = (new d(t));return {GetEnumerator: (function(v){return (function(w,v){var x;return w.factory(x);})(u, v);})};});q = (function(t,u){return p((function(v){var w;w = (new s(u, t));return {get_Current: (function(x){return (function(y,x){return y.current;})(w, x);}), MoveNext: (function(x){return (function(y,x){var z = (function(A){var B = h(y.acc);var C = y.unfold(B);if ((C.Tag == 1.000000)) {var D = i(C).Items[0.000000];var E = i(C).Items[1.000000];y.acc = {Tag: 1.000000, Value: E};y.current = D;return true;}else{y.acc = {Tag: 0.000000};y.current = null;return false;};});return (j(y.acc) && (function(){var A;return z(A);})());})(w, x);}), Reset: (function(x){return (function(y,x){y.acc = {Tag: 1.000000, Value: y.seed};y.current = null;})(w, x);}), Dispose: (function(x){return (function(y,x){;})(w, x);})};}));});r = (function(Item0,Item1){var v = this;v.Items = [Item0, Item1];});s = (function(t,u){var v = this;{};v.seed = t;v.unfold = u;v.acc = {Tag: 1.000000, Value: v.seed};v.current = null;});var t = "For more information, see Chapter 3.4.5.1";var u = n(t, "Chapter \\d+(\\.\\d)*");var v = {contents: 0};var w = g(u);var x = l(w).GetEnumerator();try{while (x.MoveNext()){var y = x.get_Current();v.contents = (v.contents + c(y).length);null;};}finally{if (false) {x.Dispose();}else{;};};return v.contents | |
***** FunScript.Tests.Regexs.Match.Groups.Count works("Chapter \\d+(\\.\\d)*") | |
// Code: | |
var g, f, e, d, c, b, a;a = (function(h){return h.length;;});b = (function(h,i){return a(h);});c = (function(h,i){return h;});d = (function(h){return (new RegExp(h, 'g' + ""));});e = (function(h,i){return g(h, i, 0);});f = (function(h,i){var j = d(i);return e(j, h);});g = (function(h,i,j){h.lastIndex = j; return h.exec(i);});var h = "For more information, see Chapter 3.4.5.1";var i = f(h, "Chapter \\d+(\\.\\d)*");return b(c(i)) | |
***** FunScript.Tests.Regexs.Match.Index works("Chapter \\d+(\\.\\d)*") | |
// Code: | |
var f, e, d, c, b, a;a = (function(g){return g.index !== undefined ? g.index : 0;});b = (function(g,h){return a(g);});c = (function(g){return (new RegExp(g, 'g' + ""));});d = (function(g,h){return f(g, h, 0);});e = (function(g,h){var i = c(h);return d(i, g);});f = (function(g,h,i){g.lastIndex = i; return g.exec(h);});var g = "For more information, see Chapter 3.4.5.1";var h = e(g, "Chapter \\d+(\\.\\d)*");return b(h) | |
***** FunScript.Tests.Regexs.Match.Length works<String>("Chapter \\d+(\\.\\d)*") | |
// Code: | |
var f, e, d, c, b, a;a = (function(g){return Array.isArray(g) ? (g[0]).length : g.length;});b = (function(g,h){return a(g);});c = (function(g){return (new RegExp(g, 'g' + ""));});d = (function(g,h){return f(g, h, 0);});e = (function(g,h){var i = c(h);return d(i, g);});f = (function(g,h,i){g.lastIndex = i; return g.exec(h);});var g = "For more information, see Chapter 3.4.5.1";var h = e(g, "Chapter \\d+(\\.\\d)*");return b(h) | |
***** FunScript.Tests.Regexs.Match.Value works("Chapter \\d+(\\.\\d)*") | |
// Code: | |
var f, e, d, c, b, a;a = (function(g){return Array.isArray(g) ? (g[0]) : g;});b = (function(g,h){return a(g);});c = (function(g){return (new RegExp(g, 'g' + ""));});d = (function(g,h){return f(g, h, 0);});e = (function(g,h){var i = c(h);return d(i, g);});f = (function(g,h,i){g.lastIndex = i; return g.exec(h);});var g = "For more information, see Chapter 3.4.5.1";var h = e(g, "Chapter \\d+(\\.\\d)*");return b(h) | |
***** FunScript.Tests.Regexs.MatchCollection.Count works("(ZZ)+") | |
// Code: | |
var h, g, f, e, d, c, b, a;a = (function(i){return i.length;;});b = (function(i,j){return a(i);});c = (function(i,j){var k = g(j);return (new RegExp(i, 'g' + k));});d = (function(i,j){return f(i, j, 0);});e = (function(i,j,k){var l = c(j, k);return d(l, i);});f = (function(i,j,k){if (!i.global) { throw "Non-global RegExp" } | |
var m, matches = []; | |
i.lastIndex = k; | |
while ((m = i.exec(j)) !== null) { matches.push(m) } | |
return matches;});g = (function(i){var j = ((i & 1) == 1);var k = ((i & 2) == 2);var l = (new h(j, k));if (l.Items[0.000000]) {if (l.Items[1.000000]) {return "im";}else{return "i";};}else{if (l.Items[1.000000]) {return "m";}else{return "";};};});h = (function(Item0,Item1){var k = this;k.Items = [Item0, Item1];});var i = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";var j = e(i, "(ZZ)+", 1);return b(j) | |
***** FunScript.Tests.Regexs.MatchCollection.Count works("[A-E]") | |
// Code: | |
var h, g, f, e, d, c, b, a;a = (function(i){return i.length;;});b = (function(i,j){return a(i);});c = (function(i,j){var k = g(j);return (new RegExp(i, 'g' + k));});d = (function(i,j){return f(i, j, 0);});e = (function(i,j,k){var l = c(j, k);return d(l, i);});f = (function(i,j,k){if (!i.global) { throw "Non-global RegExp" } | |
var m, matches = []; | |
i.lastIndex = k; | |
while ((m = i.exec(j)) !== null) { matches.push(m) } | |
return matches;});g = (function(i){var j = ((i & 1) == 1);var k = ((i & 2) == 2);var l = (new h(j, k));if (l.Items[0.000000]) {if (l.Items[1.000000]) {return "im";}else{return "i";};}else{if (l.Items[1.000000]) {return "m";}else{return "";};};});h = (function(Item0,Item1){var k = this;k.Items = [Item0, Item1];});var i = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";var j = e(i, "[A-E]", 1);return b(j) | |
***** FunScript.Tests.Regexs.Regex instance IsMatch with offset works(40) | |
// Code: | |
var b, a;a = (function(c){return (new RegExp(c, 'g' + ""));});b = (function(c,d,e){c.lastIndex = e; return c.test(d);});var c = "For more information, see Chapter 3.4.5.1";var d = a("Chapter \\d+(\\.\\d)*");return b(d, c, 40) | |
***** FunScript.Tests.Regexs.Regex instance IsMatch with offset works(10) | |
// Code: | |
var b, a;a = (function(c){return (new RegExp(c, 'g' + ""));});b = (function(c,d,e){c.lastIndex = e; return c.test(d);});var c = "For more information, see Chapter 3.4.5.1";var d = a("Chapter \\d+(\\.\\d)*");return b(d, c, 10) | |
***** FunScript.Tests.Regexs.Regex instance IsMatch works("chapter \\d+(\\.\\d)*") | |
// Code: | |
var c, b, a;a = (function(d){return (new RegExp(d, 'g' + ""));});b = (function(d,e){return c(d, e, 0);});c = (function(d,e,f){d.lastIndex = f; return d.test(e);});var d = "For more information, see Chapter 3.4.5.1";var e = a("chapter \\d+(\\.\\d)*");return b(e, d) | |
***** FunScript.Tests.Regexs.Regex instance IsMatch works("Chapter \\d+(\\.\\d)*") | |
// Code: | |
var c, b, a;a = (function(d){return (new RegExp(d, 'g' + ""));});b = (function(d,e){return c(d, e, 0);});c = (function(d,e,f){d.lastIndex = f; return d.test(e);});var d = "For more information, see Chapter 3.4.5.1";var e = a("Chapter \\d+(\\.\\d)*");return b(e, d) | |
***** FunScript.Tests.Regexs.Regex instance Match and Matches with offset work(40) | |
// Code: | |
var j, i, h, g, f, e, d, c, b, a;a = (function(k){return k.length;;});b = (function(k){return k.index !== undefined ? k.index : 0;});c = (function(k,l){return b(k);});d = (function(k,l){return (k !== null);});e = (function(k,l){return a(k);});f = (function(k,l){var m = i(l);return (new RegExp(k, 'g' + m));});g = (function(k,l,m){k.lastIndex = m; return k.exec(l);});h = (function(k,l,m){var $_m = m;if (!k.global) { throw "Non-global RegExp" } | |
var m, matches = []; | |
k.lastIndex = $_m; | |
while ((m = k.exec(l)) !== null) { matches.push(m) } | |
return matches;});i = (function(k){var l = ((k & 1) == 1);var m = ((k & 2) == 2);var n = (new j(l, m));if (n.Items[0.000000]) {if (n.Items[1.000000]) {return "im";}else{return "i";};}else{if (n.Items[1.000000]) {return "m";}else{return "";};};});j = (function(Item0,Item1){var m = this;m.Items = [Item0, Item1];});var k = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";var l = f("[A-E]", 1);var m;var n = g(l, k, 40);if (d(n)) {m = c(n);}else{m = -1;};var o = m;var p = h(l, k, 40);return (o + e(p)) | |
***** FunScript.Tests.Regexs.Regex instance Match and Matches with offset work(10) | |
// Code: | |
var j, i, h, g, f, e, d, c, b, a;a = (function(k){return k.length;;});b = (function(k){return k.index !== undefined ? k.index : 0;});c = (function(k,l){return b(k);});d = (function(k,l){return (k !== null);});e = (function(k,l){return a(k);});f = (function(k,l){var m = i(l);return (new RegExp(k, 'g' + m));});g = (function(k,l,m){k.lastIndex = m; return k.exec(l);});h = (function(k,l,m){var $_m = m;if (!k.global) { throw "Non-global RegExp" } | |
var m, matches = []; | |
k.lastIndex = $_m; | |
while ((m = k.exec(l)) !== null) { matches.push(m) } | |
return matches;});i = (function(k){var l = ((k & 1) == 1);var m = ((k & 2) == 2);var n = (new j(l, m));if (n.Items[0.000000]) {if (n.Items[1.000000]) {return "im";}else{return "i";};}else{if (n.Items[1.000000]) {return "m";}else{return "";};};});j = (function(Item0,Item1){var m = this;m.Items = [Item0, Item1];});var k = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";var l = f("[A-E]", 1);var m;var n = g(l, k, 10);if (d(n)) {m = c(n);}else{m = -1;};var o = m;var p = h(l, k, 10);return (o + e(p)) | |
***** FunScript.Tests.Regexs.Regex instance Match and Matches work("(ZZ)+") | |
// Code: | |
var l, k, j, i, h, g, f, e, d, c, b, a;a = (function(m){return m.length;;});b = (function(m){return m.index !== undefined ? m.index : 0;});c = (function(m,n){return b(m);});d = (function(m,n){return (m !== null);});e = (function(m,n){return a(m);});f = (function(m,n){var o = k(n);return (new RegExp(m, 'g' + o));});g = (function(m,n){return h(m, n, 0);});h = (function(m,n,o){m.lastIndex = o; return m.exec(n);});i = (function(m,n){return j(m, n, 0);});j = (function(m,n,o){var $_m = m;if (!$_m.global) { throw "Non-global RegExp" } | |
var m, matches = []; | |
$_m.lastIndex = o; | |
while ((m = $_m.exec(n)) !== null) { matches.push(m) } | |
return matches;});k = (function(m){var n = ((m & 1) == 1);var o = ((m & 2) == 2);var p = (new l(n, o));if (p.Items[0.000000]) {if (p.Items[1.000000]) {return "im";}else{return "i";};}else{if (p.Items[1.000000]) {return "m";}else{return "";};};});l = (function(Item0,Item1){var o = this;o.Items = [Item0, Item1];});var m = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";var n = f("(ZZ)+", 1);var o;var p = g(n, m);if (d(p)) {o = c(p);}else{o = -1;};var q = o;var r = i(n, m);return (q + e(r)) | |
***** FunScript.Tests.Regexs.Regex instance Match and Matches work("[A-E]") | |
// Code: | |
var l, k, j, i, h, g, f, e, d, c, b, a;a = (function(m){return m.length;;});b = (function(m){return m.index !== undefined ? m.index : 0;});c = (function(m,n){return b(m);});d = (function(m,n){return (m !== null);});e = (function(m,n){return a(m);});f = (function(m,n){var o = k(n);return (new RegExp(m, 'g' + o));});g = (function(m,n){return h(m, n, 0);});h = (function(m,n,o){m.lastIndex = o; return m.exec(n);});i = (function(m,n){return j(m, n, 0);});j = (function(m,n,o){var $_m = m;if (!$_m.global) { throw "Non-global RegExp" } | |
var m, matches = []; | |
$_m.lastIndex = o; | |
while ((m = $_m.exec(n)) !== null) { matches.push(m) } | |
return matches;});k = (function(m){var n = ((m & 1) == 1);var o = ((m & 2) == 2);var p = (new l(n, o));if (p.Items[0.000000]) {if (p.Items[1.000000]) {return "im";}else{return "i";};}else{if (p.Items[1.000000]) {return "m";}else{return "";};};});l = (function(Item0,Item1){var o = this;o.Items = [Item0, Item1];});var m = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";var n = f("[A-E]", 1);var o;var p = g(n, m);if (d(p)) {o = c(p);}else{o = -1;};var q = o;var r = i(n, m);return (q + e(r)) | |
***** FunScript.Tests.Regexs.Regex.Escape works("C:\\Temp") | |
// Code: | |
var a;a = (function(b){return b.replace(/[\-\[\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&');});return a("C:\\Temp") | |
***** FunScript.Tests.Regexs.Regex.Escape works("[(.*?)]") | |
// Code: | |
var a;a = (function(b){return b.replace(/[\-\[\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&');});return a("[(.*?)]") | |
***** FunScript.Tests.Regexs.Regex.IsMatch with IgnoreCase and Multiline works("^CD") | |
// Code: | |
var f, e, d, c, b, a;a = (function(g,h){var i = e(h);return (new RegExp(g, 'g' + i));});b = (function(g,h){return d(g, h, 0);});c = (function(g,h,i){var j = a(h, i);return b(j, g);});d = (function(g,h,i){g.lastIndex = i; return g.test(h);});e = (function(g){var h = ((g & 1) == 1);var i = ((g & 2) == 2);var j = (new f(h, i));if (j.Items[0.000000]) {if (j.Items[1.000000]) {return "im";}else{return "i";};}else{if (j.Items[1.000000]) {return "m";}else{return "";};};});f = (function(Item0,Item1){var i = this;i.Items = [Item0, Item1];});var g = "ab\ncd";var h = 1;var i = 2;var j = (h | i);return c(g, "^CD", j) | |
***** FunScript.Tests.Regexs.Regex.IsMatch with IgnoreCase and Multiline works("^AB") | |
// Code: | |
var f, e, d, c, b, a;a = (function(g,h){var i = e(h);return (new RegExp(g, 'g' + i));});b = (function(g,h){return d(g, h, 0);});c = (function(g,h,i){var j = a(h, i);return b(j, g);});d = (function(g,h,i){g.lastIndex = i; return g.test(h);});e = (function(g){var h = ((g & 1) == 1);var i = ((g & 2) == 2);var j = (new f(h, i));if (j.Items[0.000000]) {if (j.Items[1.000000]) {return "im";}else{return "i";};}else{if (j.Items[1.000000]) {return "m";}else{return "";};};});f = (function(Item0,Item1){var i = this;i.Items = [Item0, Item1];});var g = "ab\ncd";var h = 1;var i = 2;var j = (h | i);return c(g, "^AB", j) | |
***** FunScript.Tests.Regexs.Regex.IsMatch with IgnoreCase and Multiline works("^cd") | |
// Code: | |
var f, e, d, c, b, a;a = (function(g,h){var i = e(h);return (new RegExp(g, 'g' + i));});b = (function(g,h){return d(g, h, 0);});c = (function(g,h,i){var j = a(h, i);return b(j, g);});d = (function(g,h,i){g.lastIndex = i; return g.test(h);});e = (function(g){var h = ((g & 1) == 1);var i = ((g & 2) == 2);var j = (new f(h, i));if (j.Items[0.000000]) {if (j.Items[1.000000]) {return "im";}else{return "i";};}else{if (j.Items[1.000000]) {return "m";}else{return "";};};});f = (function(Item0,Item1){var i = this;i.Items = [Item0, Item1];});var g = "ab\ncd";var h = 1;var i = 2;var j = (h | i);return c(g, "^cd", j) | |
***** FunScript.Tests.Regexs.Regex.IsMatch with IgnoreCase and Multiline works("^ab") | |
// Code: | |
var f, e, d, c, b, a;a = (function(g,h){var i = e(h);return (new RegExp(g, 'g' + i));});b = (function(g,h){return d(g, h, 0);});c = (function(g,h,i){var j = a(h, i);return b(j, g);});d = (function(g,h,i){g.lastIndex = i; return g.test(h);});e = (function(g){var h = ((g & 1) == 1);var i = ((g & 2) == 2);var j = (new f(h, i));if (j.Items[0.000000]) {if (j.Items[1.000000]) {return "im";}else{return "i";};}else{if (j.Items[1.000000]) {return "m";}else{return "";};};});f = (function(Item0,Item1){var i = this;i.Items = [Item0, Item1];});var g = "ab\ncd";var h = 1;var i = 2;var j = (h | i);return c(g, "^ab", j) | |
***** FunScript.Tests.Regexs.Regex.IsMatch with IgnoreCase works("chapter \\d+(\\.\\d)*") | |
// Code: | |
var f, e, d, c, b, a;a = (function(g,h){var i = e(h);return (new RegExp(g, 'g' + i));});b = (function(g,h){return d(g, h, 0);});c = (function(g,h,i){var j = a(h, i);return b(j, g);});d = (function(g,h,i){g.lastIndex = i; return g.test(h);});e = (function(g){var h = ((g & 1) == 1);var i = ((g & 2) == 2);var j = (new f(h, i));if (j.Items[0.000000]) {if (j.Items[1.000000]) {return "im";}else{return "i";};}else{if (j.Items[1.000000]) {return "m";}else{return "";};};});f = (function(Item0,Item1){var i = this;i.Items = [Item0, Item1];});var g = "For more information, see Chapter 3.4.5.1";return c(g, "chapter \\d+(\\.\\d)*", 1) | |
***** FunScript.Tests.Regexs.Regex.IsMatch with IgnoreCase works("Chapter \\d+(\\.\\d)*") | |
// Code: | |
var f, e, d, c, b, a;a = (function(g,h){var i = e(h);return (new RegExp(g, 'g' + i));});b = (function(g,h){return d(g, h, 0);});c = (function(g,h,i){var j = a(h, i);return b(j, g);});d = (function(g,h,i){g.lastIndex = i; return g.test(h);});e = (function(g){var h = ((g & 1) == 1);var i = ((g & 2) == 2);var j = (new f(h, i));if (j.Items[0.000000]) {if (j.Items[1.000000]) {return "im";}else{return "i";};}else{if (j.Items[1.000000]) {return "m";}else{return "";};};});f = (function(Item0,Item1){var i = this;i.Items = [Item0, Item1];});var g = "For more information, see Chapter 3.4.5.1";return c(g, "Chapter \\d+(\\.\\d)*", 1) | |
***** FunScript.Tests.Regexs.Regex.IsMatch with Multiline works("^CD") | |
// Code: | |
var f, e, d, c, b, a;a = (function(g,h){var i = e(h);return (new RegExp(g, 'g' + i));});b = (function(g,h){return d(g, h, 0);});c = (function(g,h,i){var j = a(h, i);return b(j, g);});d = (function(g,h,i){g.lastIndex = i; return g.test(h);});e = (function(g){var h = ((g & 1) == 1);var i = ((g & 2) == 2);var j = (new f(h, i));if (j.Items[0.000000]) {if (j.Items[1.000000]) {return "im";}else{return "i";};}else{if (j.Items[1.000000]) {return "m";}else{return "";};};});f = (function(Item0,Item1){var i = this;i.Items = [Item0, Item1];});var g = "ab\ncd";return c(g, "^CD", 2) | |
***** FunScript.Tests.Regexs.Regex.IsMatch with Multiline works("^AB") | |
// Code: | |
var f, e, d, c, b, a;a = (function(g,h){var i = e(h);return (new RegExp(g, 'g' + i));});b = (function(g,h){return d(g, h, 0);});c = (function(g,h,i){var j = a(h, i);return b(j, g);});d = (function(g,h,i){g.lastIndex = i; return g.test(h);});e = (function(g){var h = ((g & 1) == 1);var i = ((g & 2) == 2);var j = (new f(h, i));if (j.Items[0.000000]) {if (j.Items[1.000000]) {return "im";}else{return "i";};}else{if (j.Items[1.000000]) {return "m";}else{return "";};};});f = (function(Item0,Item1){var i = this;i.Items = [Item0, Item1];});var g = "ab\ncd";return c(g, "^AB", 2) | |
***** FunScript.Tests.Regexs.Regex.IsMatch with Multiline works("^cd") | |
// Code: | |
var f, e, d, c, b, a;a = (function(g,h){var i = e(h);return (new RegExp(g, 'g' + i));});b = (function(g,h){return d(g, h, 0);});c = (function(g,h,i){var j = a(h, i);return b(j, g);});d = (function(g,h,i){g.lastIndex = i; return g.test(h);});e = (function(g){var h = ((g & 1) == 1);var i = ((g & 2) == 2);var j = (new f(h, i));if (j.Items[0.000000]) {if (j.Items[1.000000]) {return "im";}else{return "i";};}else{if (j.Items[1.000000]) {return "m";}else{return "";};};});f = (function(Item0,Item1){var i = this;i.Items = [Item0, Item1];});var g = "ab\ncd";return c(g, "^cd", 2) | |
***** FunScript.Tests.Regexs.Regex.IsMatch with Multiline works("^ab") | |
// Code: | |
var f, e, d, c, b, a;a = (function(g,h){var i = e(h);return (new RegExp(g, 'g' + i));});b = (function(g,h){return d(g, h, 0);});c = (function(g,h,i){var j = a(h, i);return b(j, g);});d = (function(g,h,i){g.lastIndex = i; return g.test(h);});e = (function(g){var h = ((g & 1) == 1);var i = ((g & 2) == 2);var j = (new f(h, i));if (j.Items[0.000000]) {if (j.Items[1.000000]) {return "im";}else{return "i";};}else{if (j.Items[1.000000]) {return "m";}else{return "";};};});f = (function(Item0,Item1){var i = this;i.Items = [Item0, Item1];});var g = "ab\ncd";return c(g, "^ab", 2) | |
***** FunScript.Tests.Regexs.Regex.IsMatch works("chapter \\d+(\\.\\d)*") | |
// Code: | |
var d, c, b, a;a = (function(e){return (new RegExp(e, 'g' + ""));});b = (function(e,f){return d(e, f, 0);});c = (function(e,f){var g = a(f);return b(g, e);});d = (function(e,f,g){e.lastIndex = g; return e.test(f);});var e = "For more information, see Chapter 3.4.5.1";return c(e, "chapter \\d+(\\.\\d)*") | |
***** FunScript.Tests.Regexs.Regex.IsMatch works("Chapter \\d+(\\.\\d)*") | |
// Code: | |
var d, c, b, a;a = (function(e){return (new RegExp(e, 'g' + ""));});b = (function(e,f){return d(e, f, 0);});c = (function(e,f){var g = a(f);return b(g, e);});d = (function(e,f,g){e.lastIndex = g; return e.test(f);});var e = "For more information, see Chapter 3.4.5.1";return c(e, "Chapter \\d+(\\.\\d)*") | |
***** FunScript.Tests.Regexs.Regex.Match works("chapter \\d+(\\.\\d)*") | |
// Code: | |
var e, d, c, b, a;a = (function(f,g){return (f !== null);});b = (function(f){return (new RegExp(f, 'g' + ""));});c = (function(f,g){return e(f, g, 0);});d = (function(f,g){var h = b(g);return c(h, f);});e = (function(f,g,h){f.lastIndex = h; return f.exec(g);});var f = "For more information, see Chapter 3.4.5.1";var g = d(f, "chapter \\d+(\\.\\d)*");return a(g) | |
***** FunScript.Tests.Regexs.Regex.Match works("Chapter \\d+(\\.\\d)*") | |
// Code: | |
var e, d, c, b, a;a = (function(f,g){return (f !== null);});b = (function(f){return (new RegExp(f, 'g' + ""));});c = (function(f,g){return e(f, g, 0);});d = (function(f,g){var h = b(g);return c(h, f);});e = (function(f,g,h){f.lastIndex = h; return f.exec(g);});var f = "For more information, see Chapter 3.4.5.1";var g = d(f, "Chapter \\d+(\\.\\d)*");return a(g) | |
***** FunScript.Tests.Regexs.Regex.Matches indexer getter works("[A-E]") | |
// Code: | |
var i, h, g, f, e, d, c, b, a;a = (function(j){return j.index !== undefined ? j.index : 0;});b = (function(j,k){return a(j);});c = (function(j,k){return j[k];});d = (function(j,k){var l = h(k);return (new RegExp(j, 'g' + l));});e = (function(j,k){return g(j, k, 0);});f = (function(j,k,l){var m = d(k, l);return e(m, j);});g = (function(j,k,l){if (!j.global) { throw "Non-global RegExp" } | |
var m, matches = []; | |
j.lastIndex = l; | |
while ((m = j.exec(k)) !== null) { matches.push(m) } | |
return matches;});h = (function(j){var k = ((j & 1) == 1);var l = ((j & 2) == 2);var m = (new i(k, l));if (m.Items[0.000000]) {if (m.Items[1.000000]) {return "im";}else{return "i";};}else{if (m.Items[1.000000]) {return "m";}else{return "";};};});i = (function(Item0,Item1){var l = this;l.Items = [Item0, Item1];});var j = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";var k = f(j, "[A-E]", 1);return b(c(k, 8)) | |
***** FunScript.Tests.Regexs.Regex.Matches iteration with casting works("[A-E]") | |
// Code: | |
var y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(z){return z.length;;});b = (function(z){return Array.isArray(z) ? (z[0]) : z;});c = (function(z,A){return b(z);});d = (function(z){var A = this;{};A.factory = z;});e = (function(z,A){return a(z);});f = (function(z,A){return z[A];});g = (function(z){return z.Value;;});h = (function(z){return z.Value;;});i = (function(z){return ((z.Tag == 1.000000) && true);});j = (function(z,A){var B = o(A);return (new RegExp(z, 'g' + B));});k = (function(z){return v((function(A){if ((A < e(z))) {return {Tag: 1.000000, Value: (new x(f(z, A), (A + 1)))};}else{return {Tag: 0.000000};};}), 0);});l = (function(z,A){return n(z, A, 0);});m = (function(z,A,B){var C = j(A, B);return l(C, z);});n = (function(z,A,B){if (!z.global) { throw "Non-global RegExp" } | |
var m, matches = []; | |
z.lastIndex = B; | |
while ((m = z.exec(A)) !== null) { matches.push(m) } | |
return matches;});o = (function(z){var A = ((z & 1) == 1);var B = ((z & 2) == 2);var C = (new w(A, B));if (C.Items[0.000000]) {if (C.Items[1.000000]) {return "im";}else{return "i";};}else{if (C.Items[1.000000]) {return "m";}else{return "";};};});p = (function(z){return z;});q = (function(z){return z.GetEnumerator();});r = (function(z,A,B){return s((function(C){return (function(D){return (function(E){return z(D)(E);});});}), A, B);});s = (function(z,A,B){return t(z, A, q(B));});t = (function(z,A,B){var C = {contents: 0};var D = {contents: A};while (B.MoveNext()){D.contents = z(C.contents)(D.contents)(B.get_Current());null;C.contents = (C.contents + 1);null;};return D.contents;});u = (function(z){var A;A = (new d(z));return {GetEnumerator: (function(B){return (function(C,B){var D;return C.factory(D);})(A, B);})};});v = (function(z,A){return u((function(B){var C;C = (new y(A, z));return {get_Current: (function(D){return (function(E,D){return E.current;})(C, D);}), MoveNext: (function(D){return (function(E,D){var F = (function(G){var H = g(E.acc);var I = E.unfold(H);if ((I.Tag == 1.000000)) {var J = h(I).Items[0.000000];var K = h(I).Items[1.000000];E.acc = {Tag: 1.000000, Value: K};E.current = J;return true;}else{E.acc = {Tag: 0.000000};E.current = null;return false;};});return (i(E.acc) && (function(){var G;return F(G);})());})(C, D);}), Reset: (function(D){return (function(E,D){E.acc = {Tag: 1.000000, Value: E.seed};E.current = null;})(C, D);}), Dispose: (function(D){return (function(E,D){;})(C, D);})};}));});w = (function(Item0,Item1){var B = this;B.Items = [Item0, Item1];});x = (function(Item0,Item1){var B = this;B.Items = [Item0, Item1];});y = (function(z,A){var B = this;{};B.seed = z;B.unfold = A;B.acc = {Tag: 1.000000, Value: B.seed};B.current = null;});var z = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";var A = m(z, "[A-E]", 1);var B = (function(C){return (function(D){return (C + c(D).length);});});var C = 0;var D = (function(E){return r(B, C, E);})(p(k(A)));return D | |
***** FunScript.Tests.Regexs.Regex.Matches iteration works("[A-E]") | |
// Code: | |
var t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(u){return u.length;;});b = (function(u){return Array.isArray(u) ? (u[0]) : u;});c = (function(u,v){return b(u);});d = (function(u){var v = this;{};v.factory = u;});e = (function(u,v){return a(u);});f = (function(u,v){return u[v];});g = (function(u){return u.Value;;});h = (function(u){return u.Value;;});i = (function(u){return ((u.Tag == 1.000000) && true);});j = (function(u,v){var w = o(v);return (new RegExp(u, 'g' + w));});k = (function(u){return q((function(v){if ((v < e(u))) {return {Tag: 1.000000, Value: (new s(f(u, v), (v + 1)))};}else{return {Tag: 0.000000};};}), 0);});l = (function(u,v){return n(u, v, 0);});m = (function(u,v,w){var x = j(v, w);return l(x, u);});n = (function(u,v,w){if (!u.global) { throw "Non-global RegExp" } | |
var m, matches = []; | |
u.lastIndex = w; | |
while ((m = u.exec(v)) !== null) { matches.push(m) } | |
return matches;});o = (function(u){var v = ((u & 1) == 1);var w = ((u & 2) == 2);var x = (new r(v, w));if (x.Items[0.000000]) {if (x.Items[1.000000]) {return "im";}else{return "i";};}else{if (x.Items[1.000000]) {return "m";}else{return "";};};});p = (function(u){var v;v = (new d(u));return {GetEnumerator: (function(w){return (function(x,w){var y;return x.factory(y);})(v, w);})};});q = (function(u,v){return p((function(w){var x;x = (new t(v, u));return {get_Current: (function(y){return (function(z,y){return z.current;})(x, y);}), MoveNext: (function(y){return (function(z,y){var A = (function(B){var C = g(z.acc);var D = z.unfold(C);if ((D.Tag == 1.000000)) {var E = h(D).Items[0.000000];var F = h(D).Items[1.000000];z.acc = {Tag: 1.000000, Value: F};z.current = E;return true;}else{z.acc = {Tag: 0.000000};z.current = null;return false;};});return (i(z.acc) && (function(){var B;return A(B);})());})(x, y);}), Reset: (function(y){return (function(z,y){z.acc = {Tag: 1.000000, Value: z.seed};z.current = null;})(x, y);}), Dispose: (function(y){return (function(z,y){;})(x, y);})};}));});r = (function(Item0,Item1){var w = this;w.Items = [Item0, Item1];});s = (function(Item0,Item1){var w = this;w.Items = [Item0, Item1];});t = (function(u,v){var w = this;{};w.seed = u;w.unfold = v;w.acc = {Tag: 1.000000, Value: w.seed};w.current = null;});var u = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";var v = m(u, "[A-E]", 1);var w = {contents: 0};var x = k(v).GetEnumerator();try{while (x.MoveNext()){var y = x.get_Current();w.contents = (w.contents + c(y).length);null;};}finally{if (false) {x.Dispose();}else{;};};return w.contents | |
***** FunScript.Tests.Regexs.Regex.Options works | |
// Code: | |
var d, c, b, a;a = (function(e,f){var g = c(f);return (new RegExp(e, 'g' + g));});b = (function(e){var f = 256;var g;if (e.ignoreCase) {g = (f | 1);}else{g = f;};var h = g;var i;if (e.multiline) {i = (h | 2);}else{i = h;};var j = i;return j;});c = (function(e){var f = ((e & 1) == 1);var g = ((e & 2) == 2);var h = (new d(f, g));if (h.Items[0.000000]) {if (h.Items[1.000000]) {return "im";}else{return "i";};}else{if (h.Items[1.000000]) {return "m";}else{return "";};};});d = (function(Item0,Item1){var g = this;g.Items = [Item0, Item1];});var e = 1;var f = 256;var g = (e | f);var h = a("[a-z]", g);return b(h) | |
***** FunScript.Tests.Regexs.Regex.Replace with evaluator and limit works(3) | |
// Code: | |
var e, d, c, b, a;a = (function(f){return f.index !== undefined ? f.index : 0;});b = (function(f,g){return a(f);});c = (function(f){return (new RegExp(f, 'g' + ""));});d = (function(f,g,h,i){return e(f, g, h, i, 0);});e = (function(f,g,h,i,j){var $_i = i;var replacer = function () { | |
var res = arguments[0]; | |
if ($_i !== 0) { | |
$_i--; | |
var match = []; | |
var len = arguments.length; | |
for (var i = 0; i < len-2; i ++) { | |
match.push(arguments[i]); | |
} | |
match.index = arguments[len-2]; | |
match.input = arguments[len-1]; | |
res = h(match); | |
} | |
return res; | |
} | |
return g.substring(0, j) + g.substring(j).replace(f, replacer);});var f = "abcabcabcabcabcabcabcabc";var g = c("c");return d(g, f, (function(h){return b(h).toString();}), 3) | |
***** FunScript.Tests.Regexs.Regex.Replace with evaluator and limit works(1) | |
// Code: | |
var e, d, c, b, a;a = (function(f){return f.index !== undefined ? f.index : 0;});b = (function(f,g){return a(f);});c = (function(f){return (new RegExp(f, 'g' + ""));});d = (function(f,g,h,i){return e(f, g, h, i, 0);});e = (function(f,g,h,i,j){var $_i = i;var replacer = function () { | |
var res = arguments[0]; | |
if ($_i !== 0) { | |
$_i--; | |
var match = []; | |
var len = arguments.length; | |
for (var i = 0; i < len-2; i ++) { | |
match.push(arguments[i]); | |
} | |
match.index = arguments[len-2]; | |
match.input = arguments[len-1]; | |
res = h(match); | |
} | |
return res; | |
} | |
return g.substring(0, j) + g.substring(j).replace(f, replacer);});var f = "abcabcabcabcabcabcabcabc";var g = c("c");return d(g, f, (function(h){return b(h).toString();}), 1) | |
***** FunScript.Tests.Regexs.Regex.Replace with evaluator works("(fon)(so)") | |
// Code: | |
var i, h, g, f, e, d, c, b, a;a = (function(j){return Array.isArray(j) ? (j[0]) : j;});b = (function(j,k){return a(j);});c = (function(j,k){return j[k];});d = (function(j,k){return j;});e = (function(j){return (new RegExp(j, 'g' + ""));});f = (function(j,k,l){var m = e(k);return g(m, j, l);});g = (function(j,k,l){return h(j, k, l, -1);});h = (function(j,k,l,m){return i(j, k, l, m, 0);});i = (function(j,k,l,m,n){var replacer = function () { | |
var res = arguments[0]; | |
if (m !== 0) { | |
m--; | |
var match = []; | |
var len = arguments.length; | |
for (var i = 0; i < len-2; i ++) { | |
match.push(arguments[i]); | |
} | |
match.index = arguments[len-2]; | |
match.input = arguments[len-1]; | |
res = l(match); | |
} | |
return res; | |
} | |
return k.substring(0, n) + k.substring(n).replace(j, replacer);});var j = "Names: Zach Bray, Alfonso Garcia-Caro";return f(j, "(fon)(so)", (function(k){return ((b(c(d(k), 2)) + " ") + b(c(d(k), 1)));})) | |
***** FunScript.Tests.Regexs.Regex.Replace with evaluator works("([A-Za-z]+) ([A-Za-z\\-]+)") | |
// Code: | |
var i, h, g, f, e, d, c, b, a;a = (function(j){return Array.isArray(j) ? (j[0]) : j;});b = (function(j,k){return a(j);});c = (function(j,k){return j[k];});d = (function(j,k){return j;});e = (function(j){return (new RegExp(j, 'g' + ""));});f = (function(j,k,l){var m = e(k);return g(m, j, l);});g = (function(j,k,l){return h(j, k, l, -1);});h = (function(j,k,l,m){return i(j, k, l, m, 0);});i = (function(j,k,l,m,n){var replacer = function () { | |
var res = arguments[0]; | |
if (m !== 0) { | |
m--; | |
var match = []; | |
var len = arguments.length; | |
for (var i = 0; i < len-2; i ++) { | |
match.push(arguments[i]); | |
} | |
match.index = arguments[len-2]; | |
match.input = arguments[len-1]; | |
res = l(match); | |
} | |
return res; | |
} | |
return k.substring(0, n) + k.substring(n).replace(j, replacer);});var j = "Names: Zach Bray, Alfonso Garcia-Caro";return f(j, "([A-Za-z]+) ([A-Za-z\\-]+)", (function(k){return ((b(c(d(k), 2)) + " ") + b(c(d(k), 1)));})) | |
***** FunScript.Tests.Regexs.Regex.Replace with evaluator, limit and offset works(10) | |
// Code: | |
var f, e, d, c, b, a;a = (function(g){return Array.isArray(g) ? (g[0]).length : g.length;});b = (function(g,h){return a(g);});c = (function(g,h){var i = e(h);return (new RegExp(g, 'g' + i));});d = (function(g,h,i,j,k){var $_i = i;var replacer = function () { | |
var res = arguments[0]; | |
if (j !== 0) { | |
j--; | |
var match = []; | |
var len = arguments.length; | |
for (var i = 0; i < len-2; i ++) { | |
match.push(arguments[i]); | |
} | |
match.index = arguments[len-2]; | |
match.input = arguments[len-1]; | |
res = $_i(match); | |
} | |
return res; | |
} | |
return h.substring(0, k) + h.substring(k).replace(g, replacer);});e = (function(g){var h = ((g & 1) == 1);var i = ((g & 2) == 2);var j = (new f(h, i));if (j.Items[0.000000]) {if (j.Items[1.000000]) {return "im";}else{return "i";};}else{if (j.Items[1.000000]) {return "m";}else{return "";};};});f = (function(Item0,Item1){var i = this;i.Items = [Item0, Item1];});var g = "abcCcabCCabcccabcabcabCCCcabcabc";var h = c("c+", 1);return d(h, g, (function(i){return b(i).toString();}), 3, 10) | |
***** FunScript.Tests.Regexs.Regex.Replace with evaluator, limit and offset works(0) | |
// Code: | |
var f, e, d, c, b, a;a = (function(g){return Array.isArray(g) ? (g[0]).length : g.length;});b = (function(g,h){return a(g);});c = (function(g,h){var i = e(h);return (new RegExp(g, 'g' + i));});d = (function(g,h,i,j,k){var $_i = i;var replacer = function () { | |
var res = arguments[0]; | |
if (j !== 0) { | |
j--; | |
var match = []; | |
var len = arguments.length; | |
for (var i = 0; i < len-2; i ++) { | |
match.push(arguments[i]); | |
} | |
match.index = arguments[len-2]; | |
match.input = arguments[len-1]; | |
res = $_i(match); | |
} | |
return res; | |
} | |
return h.substring(0, k) + h.substring(k).replace(g, replacer);});e = (function(g){var h = ((g & 1) == 1);var i = ((g & 2) == 2);var j = (new f(h, i));if (j.Items[0.000000]) {if (j.Items[1.000000]) {return "im";}else{return "i";};}else{if (j.Items[1.000000]) {return "m";}else{return "";};};});f = (function(Item0,Item1){var i = this;i.Items = [Item0, Item1];});var g = "abcCcabCCabcccabcabcabCCCcabcabc";var h = c("c+", 1);return d(h, g, (function(i){return b(i).toString();}), 3, 0) | |
***** FunScript.Tests.Regexs.Regex.Replace with limit and offset works(20) | |
// Code: | |
var k, j, i, h, g, f, e, d, c, b, a;a = (function(l){return l.length;;});b = (function(l){return l.index !== undefined ? l.index : 0;});c = (function(l){return Array.isArray(l) ? (l[0]).length : l.length;});d = (function(l,m){return b(l);});e = (function(l,m){return c(l);});f = (function(l,m){return a(l);});g = (function(l,m){return l[m];});h = (function(l){return (new RegExp(l, 'g' + ""));});i = (function(l,m){return j(l, m, 0);});j = (function(l,m,n){var $_m = m;if (!l.global) { throw "Non-global RegExp" } | |
var m, matches = []; | |
l.lastIndex = n; | |
while ((m = l.exec($_m)) !== null) { matches.push(m) } | |
return matches;});k = (function(l,m,n,o,p){var q = m.substring(p);var r = i(l, q);var s;if ((f(r) > o)) {var t = g(r, (o - 1));s = q.substring(0, 0 + (d(t) + e(t)));}else{s = q;};var u = s;return ((m.substring(0, 0 + p) + u.replace(l, n)) + m.substring((p + u.length)));});var l = "This is text with far too much \n whitespace";var m = h("\\s+");return k(m, l, " ", 20, 20) | |
***** FunScript.Tests.Regexs.Regex.Replace with limit and offset works(0) | |
// Code: | |
var k, j, i, h, g, f, e, d, c, b, a;a = (function(l){return l.length;;});b = (function(l){return l.index !== undefined ? l.index : 0;});c = (function(l){return Array.isArray(l) ? (l[0]).length : l.length;});d = (function(l,m){return b(l);});e = (function(l,m){return c(l);});f = (function(l,m){return a(l);});g = (function(l,m){return l[m];});h = (function(l){return (new RegExp(l, 'g' + ""));});i = (function(l,m){return j(l, m, 0);});j = (function(l,m,n){var $_m = m;if (!l.global) { throw "Non-global RegExp" } | |
var m, matches = []; | |
l.lastIndex = n; | |
while ((m = l.exec($_m)) !== null) { matches.push(m) } | |
return matches;});k = (function(l,m,n,o,p){var q = m.substring(p);var r = i(l, q);var s;if ((f(r) > o)) {var t = g(r, (o - 1));s = q.substring(0, 0 + (d(t) + e(t)));}else{s = q;};var u = s;return ((m.substring(0, 0 + p) + u.replace(l, n)) + m.substring((p + u.length)));});var l = "This is text with far too much \n whitespace";var m = h("\\s+");return k(m, l, " ", 20, 0) | |
***** FunScript.Tests.Regexs.Regex.Replace with limit works(3) | |
// Code: | |
var l, k, j, i, h, g, f, e, d, c, b, a;a = (function(m){return m.length;;});b = (function(m){return m.index !== undefined ? m.index : 0;});c = (function(m){return Array.isArray(m) ? (m[0]).length : m.length;});d = (function(m,n){return b(m);});e = (function(m,n){return c(m);});f = (function(m,n){return a(m);});g = (function(m,n){return m[n];});h = (function(m){return (new RegExp(m, 'g' + ""));});i = (function(m,n){return j(m, n, 0);});j = (function(m,n,o){var $_m = m;if (!$_m.global) { throw "Non-global RegExp" } | |
var m, matches = []; | |
$_m.lastIndex = o; | |
while ((m = $_m.exec(n)) !== null) { matches.push(m) } | |
return matches;});k = (function(m,n,o,p){return l(m, n, o, p, 0);});l = (function(m,n,o,p,q){var r = n.substring(q);var s = i(m, r);var t;if ((f(s) > p)) {var u = g(s, (p - 1));t = r.substring(0, 0 + (d(u) + e(u)));}else{t = r;};var v = t;return ((n.substring(0, 0 + q) + v.replace(m, o)) + n.substring((q + v.length)));});var m = "This is text with far too much \n whitespace";var n = h("\\s+");return k(n, m, " ", 3) | |
***** FunScript.Tests.Regexs.Regex.Replace with limit works(1) | |
// Code: | |
var l, k, j, i, h, g, f, e, d, c, b, a;a = (function(m){return m.length;;});b = (function(m){return m.index !== undefined ? m.index : 0;});c = (function(m){return Array.isArray(m) ? (m[0]).length : m.length;});d = (function(m,n){return b(m);});e = (function(m,n){return c(m);});f = (function(m,n){return a(m);});g = (function(m,n){return m[n];});h = (function(m){return (new RegExp(m, 'g' + ""));});i = (function(m,n){return j(m, n, 0);});j = (function(m,n,o){var $_m = m;if (!$_m.global) { throw "Non-global RegExp" } | |
var m, matches = []; | |
$_m.lastIndex = o; | |
while ((m = $_m.exec(n)) !== null) { matches.push(m) } | |
return matches;});k = (function(m,n,o,p){return l(m, n, o, p, 0);});l = (function(m,n,o,p,q){var r = n.substring(q);var s = i(m, r);var t;if ((f(s) > p)) {var u = g(s, (p - 1));t = r.substring(0, 0 + (d(u) + e(u)));}else{t = r;};var v = t;return ((n.substring(0, 0 + q) + v.replace(m, o)) + n.substring((q + v.length)));});var m = "This is text with far too much \n whitespace";var n = h("\\s+");return k(n, m, " ", 1) | |
***** FunScript.Tests.Regexs.Regex.Replace with limit, offset and macros works | |
// Code: | |
var l, k, j, i, h, g, f, e, d, c, b, a;a = (function(m){return m.length;;});b = (function(m){return m.index !== undefined ? m.index : 0;});c = (function(m){return Array.isArray(m) ? (m[0]).length : m.length;});d = (function(m,n){return b(m);});e = (function(m,n){return c(m);});f = (function(m,n){return a(m);});g = (function(m,n){return m[n];});h = (function(m){return (new RegExp(m, 'g' + ""));});i = (function(m,n){return j(m, n, 0);});j = (function(m,n,o){var $_m = m;if (!$_m.global) { throw "Non-global RegExp" } | |
var m, matches = []; | |
$_m.lastIndex = o; | |
while ((m = $_m.exec(n)) !== null) { matches.push(m) } | |
return matches;});k = (function(m,n,o,p){return l(m, n, o, p, 0);});l = (function(m,n,o,p,q){var r = n.substring(q);var s = i(m, r);var t;if ((f(s) > p)) {var u = g(s, (p - 1));t = r.substring(0, 0 + (d(u) + e(u)));}else{t = r;};var v = t;return ((n.substring(0, 0 + q) + v.replace(m, o)) + n.substring((q + v.length)));});var m = "Names: Zach Bray, Alfonso Garcia-Caro";var n = h("([A-Za-z]+) ([A-Za-z\\-]+)");var o = k(n, m, "$2 $1", 1);var p = l(n, m, "$2 $1", 10, 20);return ((o + " - ") + p) | |
***** FunScript.Tests.Regexs.Regex.Replace with macros works("(fon)(so)") | |
// Code: | |
var b, a;a = (function(c){return (new RegExp(c, 'g' + ""));});b = (function(c,d,e){var f = a(d);return c.replace(f, e);});var c = "Names: Zach Bray, Alfonso Garcia-Caro";return b(c, "(fon)(so)", "$2 $1") | |
***** FunScript.Tests.Regexs.Regex.Replace with macros works("([A-Za-z]+) ([A-Za-z\\-]+)") | |
// Code: | |
var b, a;a = (function(c){return (new RegExp(c, 'g' + ""));});b = (function(c,d,e){var f = a(d);return c.replace(f, e);});var c = "Names: Zach Bray, Alfonso Garcia-Caro";return b(c, "([A-Za-z]+) ([A-Za-z\\-]+)", "$2 $1") | |
***** FunScript.Tests.Regexs.Regex.Replace works("") | |
// Code: | |
var b, a;a = (function(c){return (new RegExp(c, 'g' + ""));});b = (function(c,d,e){var f = a(d);return c.replace(f, e);});var c = "This is text with far too much \n whitespace";return b(c, "", " ") | |
***** FunScript.Tests.Regexs.Regex.Replace works("\\s+") | |
// Code: | |
var b, a;a = (function(c){return (new RegExp(c, 'g' + ""));});b = (function(c,d,e){var f = a(d);return c.replace(f, e);});var c = "This is text with far too much \n whitespace";return b(c, "\\s+", " ") | |
***** FunScript.Tests.Regexs.Regex.Split with limit and offset works(20) | |
// Code: | |
var b, a;a = (function(c){return c.length;;});b = (function(c){return (new RegExp(c, 'g' + ""));});var c = "blah blah blah, blah blah blah";var d = b(" ");var e = c.substring(20).split(d, 10);return a(e) | |
***** FunScript.Tests.Regexs.Regex.Split with limit and offset works(0) | |
// Code: | |
var b, a;a = (function(c){return c.length;;});b = (function(c){return (new RegExp(c, 'g' + ""));});var c = "blah blah blah, blah blah blah";var d = b(" ");var e = c.substring(0).split(d, 10);return a(e) | |
***** FunScript.Tests.Regexs.Regex.Split with limit works(3) | |
// Code: | |
var c, b, a;a = (function(d){return d.length;;});b = (function(d){return (new RegExp(d, 'g' + ""));});c = (function(d,e,f){return e.substring(0).split(d, f);});var d = "blah blah blah, blah blah blah";var e = b(" ");var f = c(e, d, 3);return a(f) | |
***** FunScript.Tests.Regexs.Regex.Split with limit works(1) | |
// Code: | |
var c, b, a;a = (function(d){return d.length;;});b = (function(d){return (new RegExp(d, 'g' + ""));});c = (function(d,e,f){return e.substring(0).split(d, f);});var d = "blah blah blah, blah blah blah";var e = b(" ");var f = c(e, d, 1);return a(f) | |
***** FunScript.Tests.Regexs.Regex.Split works("") | |
// Code: | |
var e, d, c, b, a;a = (function(f){return f.length;;});b = (function(f){return (new RegExp(f, 'g' + ""));});c = (function(f,g){return e(f, g, -1);});d = (function(f,g){var h = b(g);return c(h, f);});e = (function(f,g,h){return g.substring(0).split(f, h);});var f = "[;,]";var g = d("", f);return a(g) | |
***** FunScript.Tests.Regexs.Regex.Split works("plum;pear,orange") | |
// Code: | |
var e, d, c, b, a;a = (function(f){return f.length;;});b = (function(f){return (new RegExp(f, 'g' + ""));});c = (function(f,g){return e(f, g, -1);});d = (function(f,g){var h = b(g);return c(h, f);});e = (function(f,g,h){return g.substring(0).split(f, h);});var f = "[;,]";var g = d("plum;pear,orange", f);return a(g) | |
***** FunScript.Tests.Regexs.Regex.Unescape works("C:\\\\Temp") | |
// Code: | |
var a;a = (function(b){return b.replace(/\\([\-\[\/\{\}\(\)\*\+\?\.\\\^\$\|])/g, '$1');});return a("C:\\\\Temp") | |
***** FunScript.Tests.Regexs.Regex.Unescape works("\\[\\(\\.\\*\\?\\)]") | |
// Code: | |
var a;a = (function(b){return b.replace(/\\([\-\[\/\{\}\(\)\*\+\?\.\\\^\$\|])/g, '$1');});return a("\\[\\(\\.\\*\\?\\)]") | |
***** FunScript.Tests.ResizeArrays.ResizeArray casting to seq works | |
// Code: | |
var z, y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(A){var B = this;{};B.factory = A;});b = (function(A){return A.Value;;});c = (function(A){return A.Value;;});d = (function(A){return A.Value;;});e = (function(A){return A.Value;;});f = (function(A){return ((A.Tag == 1.000000) && true);});g = (function(A){return ((A.Tag == 1.000000) && true);});h = (function(A,B,C){var D = 0;return u((function(E){if ((((B > D) && (E <= C)) || ((B < D) && (E >= C)))) {return {Tag: 1.000000, Value: (new w(E, (E + B)))};}else{return {Tag: 0.000000};};}), A);});i = (function(A,B){return h(A, 1, B);});j = (function(A,B){var C = B.GetEnumerator();try{while (C.MoveNext()){var D = C.get_Current();A.push(D);};}finally{if (false) {C.Dispose();}else{;};};});k = (function(A){var B = [];j(B, A);return B;});l = (function(A,B){return A.length;});m = (function(A,B){return A[B];});n = (function(A){return v((function(B){if ((B < l(A))) {return {Tag: 1.000000, Value: (new x(m(A, B), (B + 1)))};}else{return {Tag: 0.000000};};}), 0);});o = (function(A){return A.GetEnumerator();});p = (function(A,B,C){return q((function(D){return (function(E){return (function(F){return A(E)(F);});});}), B, C);});q = (function(A,B,C){return r(A, B, o(C));});r = (function(A,B,C){var D = {contents: 0};var E = {contents: B};while (C.MoveNext()){E.contents = A(D.contents)(E.contents)(C.get_Current());null;D.contents = (D.contents + 1);null;};return E.contents;});s = (function(A){var B;B = (new a(A));return {GetEnumerator: (function(C){return (function(D,C){var E;return D.factory(E);})(B, C);})};});t = (function(A){return p((function(B){return (function(C){return (B + C);});}), 0, A);});u = (function(A,B){return s((function(C){var D;D = (new y(B, A));return {get_Current: (function(E){return (function(F,E){return F.current;})(D, E);}), MoveNext: (function(E){return (function(F,E){var G = (function(H){var I = b(F.acc);var J = F.unfold(I);if ((J.Tag == 1.000000)) {var K = d(J).Items[0.000000];var L = d(J).Items[1.000000];F.acc = {Tag: 1.000000, Value: L};F.current = K;return true;}else{F.acc = {Tag: 0.000000};F.current = null;return false;};});return (f(F.acc) && (function(){var H;return G(H);})());})(D, E);}), Reset: (function(E){return (function(F,E){F.acc = {Tag: 1.000000, Value: F.seed};F.current = null;})(D, E);}), Dispose: (function(E){return (function(F,E){;})(D, E);})};}));});v = (function(A,B){return s((function(C){var D;D = (new z(B, A));return {get_Current: (function(E){return (function(F,E){return F.current;})(D, E);}), MoveNext: (function(E){return (function(F,E){var G = (function(H){var I = c(F.acc);var J = F.unfold(I);if ((J.Tag == 1.000000)) {var K = e(J).Items[0.000000];var L = e(J).Items[1.000000];F.acc = {Tag: 1.000000, Value: L};F.current = K;return true;}else{F.acc = {Tag: 0.000000};F.current = null;return false;};});return (g(F.acc) && (function(){var H;return G(H);})());})(D, E);}), Reset: (function(E){return (function(F,E){F.acc = {Tag: 1.000000, Value: F.seed};F.current = null;})(D, E);}), Dispose: (function(E){return (function(F,E){;})(D, E);})};}));});w = (function(Item0,Item1){var C = this;C.Items = [Item0, Item1];});x = (function(Item0,Item1){var C = this;C.Items = [Item0, Item1];});y = (function(A,B){var C = this;{};C.seed = A;C.unfold = B;C.acc = {Tag: 1.000000, Value: C.seed};C.current = null;});z = (function(A,B){var C = this;{};C.seed = A;C.unfold = B;C.acc = {Tag: 1.000000, Value: C.seed};C.current = null;});var A = n(k(i(1.000000, 5.000000)));return t(A) | |
***** FunScript.Tests.ResizeArrays.ResizeArray creation with seq works | |
// Code: | |
var m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(n){var o = this;{};o.factory = n;});b = (function(n){return n.Value;;});c = (function(n){return n.Value;;});d = (function(n){return ((n.Tag == 1.000000) && true);});e = (function(n,o,p){var q = 0;return k((function(r){if ((((o > q) && (r <= p)) || ((o < q) && (r >= p)))) {return {Tag: 1.000000, Value: (new l(r, (r + o)))};}else{return {Tag: 0.000000};};}), n);});f = (function(n,o){return e(n, 1, o);});g = (function(n,o){var p = o.GetEnumerator();try{while (p.MoveNext()){var q = p.get_Current();n.push(q);};}finally{if (false) {p.Dispose();}else{;};};});h = (function(n){var o = [];g(o, n);return o;});i = (function(n,o){return n[o];});j = (function(n){var o;o = (new a(n));return {GetEnumerator: (function(p){return (function(q,p){var r;return q.factory(r);})(o, p);})};});k = (function(n,o){return j((function(p){var q;q = (new m(o, n));return {get_Current: (function(r){return (function(s,r){return s.current;})(q, r);}), MoveNext: (function(r){return (function(s,r){var t = (function(u){var v = b(s.acc);var w = s.unfold(v);if ((w.Tag == 1.000000)) {var x = c(w).Items[0.000000];var y = c(w).Items[1.000000];s.acc = {Tag: 1.000000, Value: y};s.current = x;return true;}else{s.acc = {Tag: 0.000000};s.current = null;return false;};});return (d(s.acc) && (function(){var u;return t(u);})());})(q, r);}), Reset: (function(r){return (function(s,r){s.acc = {Tag: 1.000000, Value: s.seed};s.current = null;})(q, r);}), Dispose: (function(r){return (function(s,r){;})(q, r);})};}));});l = (function(Item0,Item1){var p = this;p.Items = [Item0, Item1];});m = (function(n,o){var p = this;{};p.seed = n;p.unfold = o;p.acc = {Tag: 1.000000, Value: p.seed};p.current = null;});var n = h(f(1.000000, 5.000000));return i(n, 2) | |
***** FunScript.Tests.ResizeArrays.ResizeArray folding works | |
// Code: | |
var o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(p){var q = this;{};q.factory = p;});b = (function(p){return p.Value;;});c = (function(p){return p.Value;;});d = (function(p){return ((p.Tag == 1.000000) && true);});e = (function(p,q){return p.length;});f = (function(p,q){return p[q];});g = (function(p){return m((function(q){if ((q < e(p))) {return {Tag: 1.000000, Value: (new n(f(p, q), (q + 1)))};}else{return {Tag: 0.000000};};}), 0);});h = (function(p){return p.GetEnumerator();});i = (function(p,q,r){return j((function(s){return (function(t){return (function(u){return p(t)(u);});});}), q, r);});j = (function(p,q,r){return k(p, q, h(r));});k = (function(p,q,r){var s = {contents: 0};var t = {contents: q};while (r.MoveNext()){t.contents = p(s.contents)(t.contents)(r.get_Current());null;s.contents = (s.contents + 1);null;};return t.contents;});l = (function(p){var q;q = (new a(p));return {GetEnumerator: (function(r){return (function(s,r){var t;return s.factory(t);})(q, r);})};});m = (function(p,q){return l((function(r){var s;s = (new o(q, p));return {get_Current: (function(t){return (function(u,t){return u.current;})(s, t);}), MoveNext: (function(t){return (function(u,t){var v = (function(w){var x = b(u.acc);var y = u.unfold(x);if ((y.Tag == 1.000000)) {var z = c(y).Items[0.000000];var A = c(y).Items[1.000000];u.acc = {Tag: 1.000000, Value: A};u.current = z;return true;}else{u.acc = {Tag: 0.000000};u.current = null;return false;};});return (d(u.acc) && (function(){var w;return v(w);})());})(s, t);}), Reset: (function(t){return (function(u,t){u.acc = {Tag: 1.000000, Value: u.seed};u.current = null;})(s, t);}), Dispose: (function(t){return (function(u,t){;})(s, t);})};}));});n = (function(Item0,Item1){var r = this;r.Items = [Item0, Item1];});o = (function(p,q){var r = this;{};r.seed = p;r.unfold = q;r.acc = {Tag: 1.000000, Value: r.seed};r.current = null;});var p = [];p.push(1.000000);p.push(2.000000);p.push(3.000000);p.push(4.000000);p.push(5.000000);var q = (function(r){return (function(s){return (r + s);});});var r = 0.000000;return (function(s){return i(q, r, g(s));})(p) | |
***** FunScript.Tests.ResizeArrays.ResizeArray indexer getter works | |
// Code: | |
var a;a = (function(b,c){return b[c];});var b = [];b.push(1.000000);b.push(2.000000);b.push(3.000000);b.push(4.000000);b.push(5.000000);return a(b, 1) | |
***** FunScript.Tests.ResizeArrays.ResizeArray indexer setter works | |
// Code: | |
var b, a;a = (function(c,d){return c[d];});b = (function(c,d,e){return c.splice(d, 1, e);});var c = [];c.push(1.000000);c.push(2.000000);c.push(3.000000);c.push(4.000000);c.push(5.000000);b(c, 3, 10.000000);return a(c, 3) | |
***** FunScript.Tests.ResizeArrays.ResizeArray iteration with index works | |
// Code: | |
var b, a;a = (function(c,d){return c.length;});b = (function(c,d){return c[d];});var c = [];for (var d = 1; d <= 4; d++){c.push(d);};var e = 0.000000;for (var f = 0; f <= (a(c) - 1); f++){e = (e + b(c, f));null;};return e | |
***** FunScript.Tests.ResizeArrays.ResizeArray iteration works | |
// Code: | |
var k, j, i, h, g, f, e, d, c, b, a;a = (function(l){var m = this;{};m.factory = l;});b = (function(l){return l.Value;;});c = (function(l){return l.Value;;});d = (function(l){return ((l.Tag == 1.000000) && true);});e = (function(l,m){return l.length;});f = (function(l,m){return l[m];});g = (function(l){return i((function(m){if ((m < e(l))) {return {Tag: 1.000000, Value: (new j(f(l, m), (m + 1)))};}else{return {Tag: 0.000000};};}), 0);});h = (function(l){var m;m = (new a(l));return {GetEnumerator: (function(n){return (function(o,n){var p;return o.factory(p);})(m, n);})};});i = (function(l,m){return h((function(n){var o;o = (new k(m, l));return {get_Current: (function(p){return (function(q,p){return q.current;})(o, p);}), MoveNext: (function(p){return (function(q,p){var r = (function(s){var t = b(q.acc);var u = q.unfold(t);if ((u.Tag == 1.000000)) {var v = c(u).Items[0.000000];var w = c(u).Items[1.000000];q.acc = {Tag: 1.000000, Value: w};q.current = v;return true;}else{q.acc = {Tag: 0.000000};q.current = null;return false;};});return (d(q.acc) && (function(){var s;return r(s);})());})(o, p);}), Reset: (function(p){return (function(q,p){q.acc = {Tag: 1.000000, Value: q.seed};q.current = null;})(o, p);}), Dispose: (function(p){return (function(q,p){;})(o, p);})};}));});j = (function(Item0,Item1){var n = this;n.Items = [Item0, Item1];});k = (function(l,m){var n = this;{};n.seed = l;n.unfold = m;n.acc = {Tag: 1.000000, Value: n.seed};n.current = null;});var l = [];l.push(1.000000);l.push(2.000000);l.push(3.000000);l.push(4.000000);l.push(5.000000);var m = {contents: 0.000000};var n = g(l).GetEnumerator();try{while (n.MoveNext()){var o = n.get_Current();m.contents = (m.contents + o);null;};}finally{n.Dispose();};return m.contents | |
***** FunScript.Tests.ResizeArrays.ResizeArray zero creation with size works | |
// Code: | |
var a;a = (function(b){return [];});var b = a(5);return true | |
***** FunScript.Tests.ResizeArrays.ResizeArray zero creation works | |
// Code: | |
var a = [];return true | |
***** FunScript.Tests.ResizeArrays.ResizeArray.Add works | |
// Code: | |
var a;a = (function(b,c){return b.length;});var b = [];b.push(1.000000);b.push(2.000000);b.push(3.000000);b.push(4.000000);b.push(5.000000);b.push(6.000000);return a(b) | |
***** FunScript.Tests.ResizeArrays.ResizeArray.AddRange works | |
// Code: | |
var q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(r){var s = this;{};s.factory = r;});b = (function(r,s){return (new p(r, s));});c = (function(){return (new q());});d = (function(r){if ((r.Tag == 1.000000)) {var s = r.Item2;var t = r.Item1;return t;}else{throw ("List was empty");return null;};});e = (function(r){if ((r.Tag == 1.000000)) {var s = r.Item2;var t = r.Item1;return s;}else{throw ("List was empty");return null;};});f = (function(r){return r.Value;;});g = (function(r){return r.Value;;});h = (function(r){return ((r.Tag == 1.000000) && true);});i = (function(r,s){var t = s.GetEnumerator();try{while (t.MoveNext()){var u = t.get_Current();r.push(u);};}finally{if (false) {t.Dispose();}else{;};};});j = (function(r,s){return r.length;});k = (function(r){var s;s = (new a(r));return {GetEnumerator: (function(t){return (function(u,t){var v;return u.factory(v);})(s, t);})};});l = (function(r){return m((function(s){if ((s.Tag == 1.000000)) {var t = e(s);var u = d(s);return {Tag: 1.000000, Value: (new n(u, t))};}else{return {Tag: 0.000000};};}), r);});m = (function(r,s){return k((function(t){var u;u = (new o(s, r));return {get_Current: (function(v){return (function(w,v){return w.current;})(u, v);}), MoveNext: (function(v){return (function(w,v){var x = (function(y){var z = f(w.acc);var A = w.unfold(z);if ((A.Tag == 1.000000)) {var B = g(A).Items[0.000000];var C = g(A).Items[1.000000];w.acc = {Tag: 1.000000, Value: C};w.current = B;return true;}else{w.acc = {Tag: 0.000000};w.current = null;return false;};});return (h(w.acc) && (function(){var y;return x(y);})());})(u, v);}), Reset: (function(v){return (function(w,v){w.acc = {Tag: 1.000000, Value: w.seed};w.current = null;})(u, v);}), Dispose: (function(v){return (function(w,v){;})(u, v);})};}));});n = (function(Item0,Item1){var t = this;t.Items = [Item0, Item1];});o = (function(r,s){var t = this;{};t.seed = r;t.unfold = s;t.acc = {Tag: 1.000000, Value: t.seed};t.current = null;});p = (function(Item1,Item2){var t = this;t.Tag = 1.000000;t._CaseName = "Cons";t.Item1 = Item1;t.Item2 = Item2;});q = (function(){var r = this;r.Tag = 0.000000;r._CaseName = "Nil";});var r = [];i(r, l(b(1, b(2, b(3, c())))));return j(r) | |
***** FunScript.Tests.ResizeArrays.ResizeArray.Clear works | |
// Code: | |
var a;a = (function(b,c){return b.length;});var b = [];b.push(1.000000);b.push(2.000000);b.push(3.000000);b.push(4.000000);b.push(5.000000);(b = []);return a(b) | |
***** FunScript.Tests.ResizeArrays.ResizeArray.Contains works("cd") | |
// Code: | |
var a = [];a.push("ab");a.push("ch");return (a.indexOf("cd") > -1) | |
***** FunScript.Tests.ResizeArrays.ResizeArray.Contains works("ab") | |
// Code: | |
var a = [];a.push("ab");a.push("ch");return (a.indexOf("ab") > -1) | |
***** FunScript.Tests.ResizeArrays.ResizeArray.Count works | |
// Code: | |
var a;a = (function(b,c){return b.length;});var b = [];b.push(1.000000);b.push(2.000000);b.push(3.000000);b.push(4.000000);b.push(5.000000);return a(b) | |
***** FunScript.Tests.ResizeArrays.ResizeArray.IndexOf works("cd") | |
// Code: | |
var a = [];a.push("ch");a.push("ab");return a.indexOf("cd") | |
***** FunScript.Tests.ResizeArrays.ResizeArray.IndexOf works("ab") | |
// Code: | |
var a = [];a.push("ch");a.push("ab");return a.indexOf("ab") | |
***** FunScript.Tests.ResizeArrays.ResizeArray.Insert works | |
// Code: | |
var a;a = (function(b,c){return b[c];});var b = [];b.push(1.000000);b.push(2.000000);b.push(3.000000);b.push(4.000000);b.push(5.000000);b.splice(2, 0, 8.000000);return a(b, 2) | |
***** FunScript.Tests.ResizeArrays.ResizeArray.Remove works("cd") | |
// Code: | |
var a;a = (function(b,c){var i = b.indexOf(c); if (i > -1) { b.splice(i, 1); return true; } else { return false; };});var b = [];b.push("ab");b.push("ch");return a(b, "cd") | |
***** FunScript.Tests.ResizeArrays.ResizeArray.Remove works("ab") | |
// Code: | |
var a;a = (function(b,c){var i = b.indexOf(c); if (i > -1) { b.splice(i, 1); return true; } else { return false; };});var b = [];b.push("ab");b.push("ch");return a(b, "ab") | |
***** FunScript.Tests.ResizeArrays.ResizeArray.RemoveAt works | |
// Code: | |
var a;a = (function(b,c){return b[c];});var b = [];b.push(1.000000);b.push(2.000000);b.push(3.000000);b.push(4.000000);b.push(5.000000);b.splice(2, 1);return a(b, 2) | |
***** FunScript.Tests.ResizeArrays.ResizeArray.ReverseInPlace works | |
// Code: | |
var a;a = (function(b,c){return b[c];});var b = [];b.push(1.000000);b.push(2.000000);b.push(3.000000);b.push(4.000000);b.push(5.000000);b.reverse();return a(b, 2) | |
***** FunScript.Tests.ResizeArrays.ResizeArray.SortInPlace works | |
// Code: | |
var a;a = (function(b,c){return b[c];});var b = [];b.push("Ana");b.push("Pedro");b.push("Lucía");b.push("Paco");b.sort();return a(b, 2) | |
***** FunScript.Tests.ResizeArrays.ResizeArray.SortInPlaceWith works | |
// Code: | |
var a;a = (function(b,c){return b[c];});var b = [];b.push(3.000000);b.push(6.000000);b.push(5.000000);b.push(4.000000);b.push(8.000000);b.sort((function(c,d){if ((c > d)) {return -1;}else{if ((c < d)) {return 1;}else{return 0;};};}));b.sort();return a(b, 3) | |
***** FunScript.Tests.RxTests.should translate combineLatestArray | |
// Code: | |
var r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(s){return s.length;;});b = (function(s){return new Array(s);;});c = (function(s){var t = this;{};t.factory = s;});d = (function(s,t){return o(t).join(s);});e = (function(s,t){var subscription = t.subscribe(s); | |
subscription.Dispose = subscription.dispose; | |
return subscription;;});f = (function(s){return s.Value;;});g = (function(s){return s.Value;;});h = (function(s){return ((s.Tag == 1.000000) && true);});i = (function(s){return s.GetEnumerator();});j = (function(s,t,u){return k(s, t, i(u));});k = (function(s,t,u){var v = {contents: 0};var w = {contents: t};while (u.MoveNext()){w.contents = s(v.contents)(w.contents)(u.get_Current());null;v.contents = (v.contents + 1);null;};return w.contents;});l = (function(s){var t;t = (new c(s));return {GetEnumerator: (function(u){return (function(v,u){var w;return v.factory(w);})(t, u);})};});m = (function(s,t){var u;return j((function(v){return (function(w){return (function(x){return s(v)(x);});});}), u, t);});n = (function(s){return p((function(t){if ((t < a(s))) {return {Tag: 1.000000, Value: (new q(s[t], (t + 1)))};}else{return {Tag: 0.000000};};}), 0);});o = (function(s){var t = b(0);m((function(u){return (function(v){t[u] = v;return null;});}), s);return t;});p = (function(s,t){return l((function(u){var v;v = (new r(t, s));return {get_Current: (function(w){return (function(x,w){return x.current;})(v, w);}), MoveNext: (function(w){return (function(x,w){var y = (function(z){var A = f(x.acc);var B = x.unfold(A);if ((B.Tag == 1.000000)) {var C = g(B).Items[0.000000];var D = g(B).Items[1.000000];x.acc = {Tag: 1.000000, Value: D};x.current = C;return true;}else{x.acc = {Tag: 0.000000};x.current = null;return false;};});return (h(x.acc) && (function(){var z;return y(z);})());})(v, w);}), Reset: (function(w){return (function(x,w){x.acc = {Tag: 1.000000, Value: x.seed};x.current = null;})(v, w);}), Dispose: (function(w){return (function(x,w){;})(v, w);})};}));});q = (function(Item0,Item1){var u = this;u.Items = [Item0, Item1];});r = (function(s,t){var u = this;{};u.seed = s;u.unfold = t;u.acc = {Tag: 1.000000, Value: u.seed};u.current = null;});var s = {contents: ""};var t = new Rx.Subject();var u = new Rx.Subject();var v = e((function(w){s.contents = ((s.contents + "--") + d(",", n(w)));}), (Rx.Observable.combineLatest([t.asObservable(), u.asObservable()], function () { return arguments; })));t.onNext("A");t.onNext("B");u.onNext("1");u.onNext("2");t.onNext("C");t.onNext("D");u.onNext("3");u.onNext("4");return s.contents | |
***** FunScript.Tests.RxTests.should translate count | |
// Code: | |
var a;a = (function(b,c){var subscription = c.subscribe(b); | |
subscription.Dispose = subscription.dispose; | |
return subscription;;});var b = {contents: 0.000000};var c = new Rx.Subject();var d = a((function(e){b.contents = e;}), c.asObservable().take(3).count());c.onNext(1.000000);c.onNext(2.000000);c.onNext(3.000000);c.onNext(4.000000);return b.contents | |
***** FunScript.Tests.RxTests.should translate create | |
// Code: | |
var c, b, a;a = (function(d){var e = this;{};e.message = d;});b = (function(d,e){return d.message;});c = (function(d,e,f,g){var subscription = g.subscribe(d, e, f); | |
subscription.Dispose = subscription.dispose; | |
return subscription;;});var d = {contents: ""};var e = (function(f){d.contents = ((d.contents + ".") + f);});var f = Rx.Observable.create((function(g){g.onNext("R");return (function(){var h;return (function(i){return e("R Disposed");})(h);});}));var g = Rx.Observable.create((function(h){h.onNext("X");return (function(){var i;return (function(j){return e("X Disposed");})(i);});}));var h = Rx.Observable.create((function(i){i.onNext("Y1");i.onNext("Y2");i.onCompleted();return (function(){var j;return (function(k){return e("Y Disposed");})(j);});}));var i = Rx.Observable.create((function(j){j.onNext("Z1");j.onNext("Z2");j.onError((new a("Z ERROR")));return (function(){var k;return (function(l){return e("Z Disposed");})(k);});}));var j = (function(k){return e(b(k));});var k = (function(l){return e("X Complete");});var l = (function(m){return c(e, j, k, m);})(g);var m = (function(n){return e(b(n));});var n = (function(o){return e("Y Complete");});var o = (function(p){return c(e, m, n, p);})(h);var p = (function(q){return e(b(q));});var q = (function(r){return e("Z Complete");});var r = (function(s){return c(e, p, q, s);})(i);l.Dispose();o.Dispose();r.Dispose();return d.contents | |
***** FunScript.Tests.RxTests.should translate createWithDisposable | |
// Code: | |
var e, d, c, b, a;a = (function(f){var g = this;{};g.f = f;});b = (function(f){var g = this;{};g.message = f;});c = (function(f,g){return f.message;});d = (function(f){return Rx.Observable.create(function (observer) { | |
var resource = f(observer); | |
return resource.Dispose; | |
});;});e = (function(f,g,h,i){var subscription = i.subscribe(f, g, h); | |
subscription.Dispose = subscription.dispose; | |
return subscription;;});var f = {contents: ""};var g = (function(h){f.contents = ((f.contents + ".") + h);});var h = d((function(i){i.onNext("R");var j;j = (new a((function(k){return g("R Disposed");})));return {Dispose: (function(k){return (function(l,k){var m;return l.f(m);})(j, k);})};}));var i = d((function(j){j.onNext("X");var k;k = (new a((function(l){return g("X Disposed");})));return {Dispose: (function(l){return (function(m,l){var n;return m.f(n);})(k, l);})};}));var j = d((function(k){k.onNext("Y1");k.onNext("Y2");k.onCompleted();var l;l = (new a((function(m){return g("Y Disposed");})));return {Dispose: (function(m){return (function(n,m){var o;return n.f(o);})(l, m);})};}));var k = d((function(l){l.onNext("Z1");l.onNext("Z2");l.onError((new b("Z ERROR")));var m;m = (new a((function(n){return g("Z Disposed");})));return {Dispose: (function(n){return (function(o,n){var p;return o.f(p);})(m, n);})};}));var l = (function(m){return g(c(m));});var m = (function(n){return g("X Complete");});var n = (function(o){return e(g, l, m, o);})(i);var o = (function(p){return g(c(p));});var p = (function(q){return g("Y Complete");});var q = (function(r){return e(g, o, p, r);})(j);var r = (function(s){return g(c(s));});var s = (function(t){return g("Z Complete");});var t = (function(u){return e(g, r, s, u);})(k);n.Dispose();q.Dispose();t.Dispose();return f.contents | |
***** FunScript.Tests.RxTests.should translate dispose | |
// Code: | |
var a;a = (function(b,c){var subscription = c.subscribe(b); | |
subscription.Dispose = subscription.dispose; | |
return subscription;;});var b = {contents: 0.000000};var c = new Rx.Subject();var d = c.asObservable();var e = d.select((function(f){return (f * f);}));var f = a((function(g){b.contents = (b.contents + g);}), e);c.onNext(1.000000);c.onNext(2.000000);c.onNext(3.000000);f.Dispose();c.onNext(4.000000);c.onNext(5.000000);return b.contents | |
***** FunScript.Tests.RxTests.should translate event construction | |
// Code: | |
var a = new Rx.Subject();return 0.000000 | |
***** FunScript.Tests.RxTests.should translate event subscription | |
// Code: | |
var a;a = (function(b,c){var subscription = c.subscribe(b); | |
subscription.Dispose = subscription.dispose; | |
return subscription;;});var b = {contents: 0.000000};var c = new Rx.Subject();var d = a((function(e){b.contents = (b.contents + e);}), c.asObservable());return b.contents | |
***** FunScript.Tests.RxTests.should translate event triggering | |
// Code: | |
var a;a = (function(b,c){var subscription = c.subscribe(b); | |
subscription.Dispose = subscription.dispose; | |
return subscription;;});var b = {contents: 0.000000};var c = new Rx.Subject();var d = a((function(e){b.contents = (b.contents + e);}), c.asObservable());c.onNext(1.000000);c.onNext(2.000000);return b.contents | |
***** FunScript.Tests.RxTests.should translate map | |
// Code: | |
var a;a = (function(b,c){var subscription = c.subscribe(b); | |
subscription.Dispose = subscription.dispose; | |
return subscription;;});var b = {contents: 0.000000};var c = new Rx.Subject();var d = a((function(e){b.contents = e;}), c.asObservable().select((function(e){return ((e * e) * e);})));c.onNext(1.000000);c.onNext(2.000000);c.onNext(3.000000);c.onNext(4.000000);return b.contents | |
***** FunScript.Tests.RxTests.should translate merge | |
// Code: | |
var a;a = (function(b,c){var subscription = c.subscribe(b); | |
subscription.Dispose = subscription.dispose; | |
return subscription;;});var b = {contents: ""};var c = new Rx.Subject();var d = new Rx.Subject();var e = a((function(f){b.contents = (b.contents + f);}), c.asObservable().merge(d.asObservable()));c.onNext("X");c.onNext("X");d.onNext("Y");c.onNext("X");d.onNext("Y");return b.contents | |
***** FunScript.Tests.RxTests.should translate take | |
// Code: | |
var a;a = (function(b,c){var subscription = c.subscribe(b); | |
subscription.Dispose = subscription.dispose; | |
return subscription;;});var b = {contents: 0.000000};var c = new Rx.Subject();var d = a((function(e){b.contents = (b.contents + e);}), c.asObservable().take(3));c.onNext(1.000000);c.onNext(2.000000);c.onNext(3.000000);c.onNext(4.000000);return b.contents | |
***** FunScript.Tests.SeqExpressions.array expressions work | |
// Code: | |
var y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(z){return z.length;;});b = (function(z){return new Array(z);;});c = (function(z){var A = this;{};A.factory = z;});d = (function(z){return z.Value;;});e = (function(z){return z.Value;;});f = (function(z){return z.Value;;});g = (function(z){return z.Value;;});h = (function(z){return ((z.Tag == 1.000000) && true);});i = (function(z){return ((z.Tag == 1.000000) && true);});j = (function(z,A,B){var C = 0;return u((function(D){if ((((A > C) && (D <= B)) || ((A < C) && (D >= B)))) {return {Tag: 1.000000, Value: (new w(D, (D + A)))};}else{return {Tag: 0.000000};};}), z);});k = (function(z,A){return j(z, 1, A);});l = (function(z){return p((function(A){var B;return m(z(B));}));});m = (function(z){return z.GetEnumerator();});n = (function(z,A,B){return o(z, A, m(B));});o = (function(z,A,B){var C = {contents: 0};var D = {contents: A};while (B.MoveNext()){D.contents = z(C.contents)(D.contents)(B.get_Current());null;C.contents = (C.contents + 1);null;};return D.contents;});p = (function(z){var A;A = (new c(z));return {GetEnumerator: (function(B){return (function(C,B){var D;return C.factory(D);})(A, B);})};});q = (function(z,A){var B;return n((function(C){return (function(D){return (function(E){return z(C)(E);});});}), B, A);});r = (function(z,A){return l((function(B){return t((function(C){if (C.MoveNext()) {return {Tag: 1.000000, Value: (new v(z(C.get_Current()), C))};}else{return {Tag: 0.000000};};}), m(A));}));});s = (function(z){var A = b(0);q((function(B){return (function(C){A[B] = C;return null;});}), z);return A;});t = (function(z,A){return p((function(B){var C;C = (new x(A, z));return {get_Current: (function(D){return (function(E,D){return E.current;})(C, D);}), MoveNext: (function(D){return (function(E,D){var F = (function(G){var H = d(E.acc);var I = E.unfold(H);if ((I.Tag == 1.000000)) {var J = f(I).Items[0.000000];var K = f(I).Items[1.000000];E.acc = {Tag: 1.000000, Value: K};E.current = J;return true;}else{E.acc = {Tag: 0.000000};E.current = null;return false;};});return (h(E.acc) && (function(){var G;return F(G);})());})(C, D);}), Reset: (function(D){return (function(E,D){E.acc = {Tag: 1.000000, Value: E.seed};E.current = null;})(C, D);}), Dispose: (function(D){return (function(E,D){;})(C, D);})};}));});u = (function(z,A){return p((function(B){var C;C = (new y(A, z));return {get_Current: (function(D){return (function(E,D){return E.current;})(C, D);}), MoveNext: (function(D){return (function(E,D){var F = (function(G){var H = e(E.acc);var I = E.unfold(H);if ((I.Tag == 1.000000)) {var J = g(I).Items[0.000000];var K = g(I).Items[1.000000];E.acc = {Tag: 1.000000, Value: K};E.current = J;return true;}else{E.acc = {Tag: 0.000000};E.current = null;return false;};});return (i(E.acc) && (function(){var G;return F(G);})());})(C, D);}), Reset: (function(D){return (function(E,D){E.acc = {Tag: 1.000000, Value: E.seed};E.current = null;})(C, D);}), Dispose: (function(D){return (function(E,D){;})(C, D);})};}));});v = (function(Item0,Item1){var B = this;B.Items = [Item0, Item1];});w = (function(Item0,Item1){var B = this;B.Items = [Item0, Item1];});x = (function(z,A){var B = this;{};B.seed = z;B.unfold = A;B.acc = {Tag: 1.000000, Value: B.seed};B.current = null;});y = (function(z,A){var B = this;{};B.seed = z;B.unfold = A;B.acc = {Tag: 1.000000, Value: B.seed};B.current = null;});var z = s(l((function(A){return r((function(B){return B;}), k(1, 10));})));return a(z) | |
***** FunScript.Tests.SeqExpressions.combine in seq expressions works | |
// Code: | |
var A, z, y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(B){var C = this;{};C.factory = B;});b = (function(B){return (new c(null, B));});c = (function(B,C){var D = this;{};D.factory = C;D.isCreated = false;D.value_24 = B;});d = (function(B,C){if ((!B.isCreated)) {var D;B.value_24 = B.factory(D);B.isCreated = true;}else{;};return B.value_24;});e = (function(B){return B.Value;;});f = (function(B){return B.Value;;});g = (function(B){return B.Value;;});h = (function(B){return B.Value;;});i = (function(B){return B.Value;;});j = (function(B){return ((B.Tag == 1.000000) && true);});k = (function(B){return ((B.Tag == 1.000000) && true);});l = (function(B,C){return m((function(D){var E = (new y(b((function(F){return n(B);})), b((function(F){return n(C);}))));return v((function(F){var G = F.Items[1.000000];var H = F;var I = F.Items[0.000000];if (d(I).MoveNext()) {var J = F.Items[1.000000];var K = F;var L = F.Items[0.000000];return {Tag: 1.000000, Value: (new x(d(L).get_Current(), K))};}else{var M = F.Items[1.000000];var N = F.Items[0.000000];if (d(M).MoveNext()) {var O = F.Items[1.000000];var P = F.Items[0.000000];return {Tag: 1.000000, Value: (new x(d(O).get_Current(), (new y(O, P))))};}else{return {Tag: 0.000000};};};}), E);}));});m = (function(B){return r((function(C){var D;return n(B(D));}));});n = (function(B){return B.GetEnumerator();});o = (function(B,C,D){return p((function(E){return (function(F){return (function(G){return B(F)(G);});});}), C, D);});p = (function(B,C,D){return q(B, C, n(D));});q = (function(B,C,D){var E = {contents: 0};var F = {contents: C};while (D.MoveNext()){F.contents = B(E.contents)(F.contents)(D.get_Current());null;E.contents = (E.contents + 1);null;};return F.contents;});r = (function(B){var C;C = (new a(B));return {GetEnumerator: (function(D){return (function(E,D){var F;return E.factory(F);})(C, D);})};});s = (function(B){return o((function(C){return (function(D){return (C + 1);});}), 0, B);});t = (function(B){return u((function(C){if ((C.Tag == 0.000000)) {return {Tag: 0.000000};}else{var D = f(C);return {Tag: 1.000000, Value: (new w(D, {Tag: 0.000000}))};};}), {Tag: 1.000000, Value: B});});u = (function(B,C){return r((function(D){var E;E = (new z(C, B));return {get_Current: (function(F){return (function(G,F){return G.current;})(E, F);}), MoveNext: (function(F){return (function(G,F){var H = (function(I){var J = e(G.acc);var K = G.unfold(J);if ((K.Tag == 1.000000)) {var L = g(K).Items[0.000000];var M = g(K).Items[1.000000];G.acc = {Tag: 1.000000, Value: M};G.current = L;return true;}else{G.acc = {Tag: 0.000000};G.current = null;return false;};});return (j(G.acc) && (function(){var I;return H(I);})());})(E, F);}), Reset: (function(F){return (function(G,F){G.acc = {Tag: 1.000000, Value: G.seed};G.current = null;})(E, F);}), Dispose: (function(F){return (function(G,F){;})(E, F);})};}));});v = (function(B,C){return r((function(D){var E;E = (new A(C, B));return {get_Current: (function(F){return (function(G,F){return G.current;})(E, F);}), MoveNext: (function(F){return (function(G,F){var H = (function(I){var J = i(G.acc);var K = G.unfold(J);if ((K.Tag == 1.000000)) {var L = h(K).Items[0.000000];var M = h(K).Items[1.000000];G.acc = {Tag: 1.000000, Value: M};G.current = L;return true;}else{G.acc = {Tag: 0.000000};G.current = null;return false;};});return (k(G.acc) && (function(){var I;return H(I);})());})(E, F);}), Reset: (function(F){return (function(G,F){G.acc = {Tag: 1.000000, Value: G.seed};G.current = null;})(E, F);}), Dispose: (function(F){return (function(G,F){;})(E, F);})};}));});w = (function(Item0,Item1){var D = this;D.Items = [Item0, Item1];});x = (function(Item0,Item1){var D = this;D.Items = [Item0, Item1];});y = (function(Item0,Item1){var D = this;D.Items = [Item0, Item1];});z = (function(B,C){var D = this;{};D.seed = B;D.unfold = C;D.acc = {Tag: 1.000000, Value: D.seed};D.current = null;});A = (function(B,C){var D = this;{};D.seed = B;D.unfold = C;D.acc = {Tag: 1.000000, Value: D.seed};D.current = null;});var B = m((function(C){return l(t(1), m((function(D){return t(2);})));}));return s(B) | |
***** FunScript.Tests.SeqExpressions.empty seq expressions work | |
// Code: | |
var n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(o){var p = this;{};p.factory = o;});b = (function(o){return o.Value;;});c = (function(o){return o.Value;;});d = (function(o){return ((o.Tag == 1.000000) && true);});e = (function(o){return k((function(p){var q;return g(o(q));}));});f = (function(){return m((function(o){return {Tag: 0.000000};}), false);});g = (function(o){return o.GetEnumerator();});h = (function(o,p,q){return i((function(r){return (function(s){return (function(t){return o(s)(t);});});}), p, q);});i = (function(o,p,q){return j(o, p, g(q));});j = (function(o,p,q){var r = {contents: 0};var s = {contents: p};while (q.MoveNext()){s.contents = o(r.contents)(s.contents)(q.get_Current());null;r.contents = (r.contents + 1);null;};return s.contents;});k = (function(o){var p;p = (new a(o));return {GetEnumerator: (function(q){return (function(r,q){var s;return r.factory(s);})(p, q);})};});l = (function(o){return h((function(p){return (function(q){return (p + 1);});}), 0, o);});m = (function(o,p){return k((function(q){var r;r = (new n(p, o));return {get_Current: (function(s){return (function(t,s){return t.current;})(r, s);}), MoveNext: (function(s){return (function(t,s){var u = (function(v){var w = b(t.acc);var x = t.unfold(w);if ((x.Tag == 1.000000)) {var y = c(x).Items[0.000000];var z = c(x).Items[1.000000];t.acc = {Tag: 1.000000, Value: z};t.current = y;return true;}else{t.acc = {Tag: 0.000000};t.current = null;return false;};});return (d(t.acc) && (function(){var v;return u(v);})());})(r, s);}), Reset: (function(s){return (function(t,s){t.acc = {Tag: 1.000000, Value: t.seed};t.current = null;})(r, s);}), Dispose: (function(s){return (function(t,s){;})(r, s);})};}));});n = (function(o,p){var q = this;{};q.seed = o;q.unfold = p;q.acc = {Tag: 1.000000, Value: q.seed};q.current = null;});var o = e((function(p){return f();}));return l(o) | |
***** FunScript.Tests.SeqExpressions.for in seq expressions works | |
// Code: | |
var w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(x){var y = this;{};y.factory = x;});b = (function(x){return x.Value;;});c = (function(x){return x.Value;;});d = (function(x){return x.Value;;});e = (function(x){return x.Value;;});f = (function(x){return ((x.Tag == 1.000000) && true);});g = (function(x){return ((x.Tag == 1.000000) && true);});h = (function(x,y,z){var A = 0;return s((function(B){if ((((y > A) && (B <= z)) || ((y < A) && (B >= z)))) {return {Tag: 1.000000, Value: (new u(B, (B + y)))};}else{return {Tag: 0.000000};};}), x);});i = (function(x,y){return h(x, 1, y);});j = (function(x){return o((function(y){var z;return k(x(z));}));});k = (function(x){return x.GetEnumerator();});l = (function(x,y,z){return m((function(A){return (function(B){return (function(C){return x(B)(C);});});}), y, z);});m = (function(x,y,z){return n(x, y, k(z));});n = (function(x,y,z){var A = {contents: 0};var B = {contents: y};while (z.MoveNext()){B.contents = x(A.contents)(B.contents)(z.get_Current());null;A.contents = (A.contents + 1);null;};return B.contents;});o = (function(x){var y;y = (new a(x));return {GetEnumerator: (function(z){return (function(A,z){var B;return A.factory(B);})(y, z);})};});p = (function(x){return l((function(y){return (function(z){return (y + 1);});}), 0, x);});q = (function(x,y){return j((function(z){return r((function(A){if (A.MoveNext()) {return {Tag: 1.000000, Value: (new t(x(A.get_Current()), A))};}else{return {Tag: 0.000000};};}), k(y));}));});r = (function(x,y){return o((function(z){var A;A = (new v(y, x));return {get_Current: (function(B){return (function(C,B){return C.current;})(A, B);}), MoveNext: (function(B){return (function(C,B){var D = (function(E){var F = b(C.acc);var G = C.unfold(F);if ((G.Tag == 1.000000)) {var H = d(G).Items[0.000000];var I = d(G).Items[1.000000];C.acc = {Tag: 1.000000, Value: I};C.current = H;return true;}else{C.acc = {Tag: 0.000000};C.current = null;return false;};});return (f(C.acc) && (function(){var E;return D(E);})());})(A, B);}), Reset: (function(B){return (function(C,B){C.acc = {Tag: 1.000000, Value: C.seed};C.current = null;})(A, B);}), Dispose: (function(B){return (function(C,B){;})(A, B);})};}));});s = (function(x,y){return o((function(z){var A;A = (new w(y, x));return {get_Current: (function(B){return (function(C,B){return C.current;})(A, B);}), MoveNext: (function(B){return (function(C,B){var D = (function(E){var F = c(C.acc);var G = C.unfold(F);if ((G.Tag == 1.000000)) {var H = e(G).Items[0.000000];var I = e(G).Items[1.000000];C.acc = {Tag: 1.000000, Value: I};C.current = H;return true;}else{C.acc = {Tag: 0.000000};C.current = null;return false;};});return (g(C.acc) && (function(){var E;return D(E);})());})(A, B);}), Reset: (function(B){return (function(C,B){C.acc = {Tag: 1.000000, Value: C.seed};C.current = null;})(A, B);}), Dispose: (function(B){return (function(C,B){;})(A, B);})};}));});t = (function(Item0,Item1){var z = this;z.Items = [Item0, Item1];});u = (function(Item0,Item1){var z = this;z.Items = [Item0, Item1];});v = (function(x,y){var z = this;{};z.seed = x;z.unfold = y;z.acc = {Tag: 1.000000, Value: z.seed};z.current = null;});w = (function(x,y){var z = this;{};z.seed = x;z.unfold = y;z.acc = {Tag: 1.000000, Value: z.seed};z.current = null;});var x = j((function(y){return q((function(z){return z;}), i(1, 10));}));return p(x) | |
***** FunScript.Tests.SeqExpressions.infinite seq expressions work | |
// Code: | |
var x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(y){var z = this;{};z.factory = y;});b = (function(y){return (new c(null, y));});c = (function(y,z){var A = this;{};A.factory = z;A.isCreated = false;A.value_24 = y;});d = (function(y,z){if ((!y.isCreated)) {var A;y.value_24 = y.factory(A);y.isCreated = true;}else{;};return y.value_24;});e = (function(y){return y.Value;;});f = (function(y){return y.Value;;});g = (function(y){return y.Value;;});h = (function(y){return y.Value;;});i = (function(y){return y.Value;;});j = (function(y){return ((y.Tag == 1.000000) && true);});k = (function(y){return ((y.Tag == 1.000000) && true);});l = (function(y,z){return m((function(A){var B = (new t(b((function(C){return n(y);})), b((function(C){return n(z);}))));return s((function(C){var D = C.Items[1.000000];var E = C;var F = C.Items[0.000000];if (d(F).MoveNext()) {var G = C.Items[1.000000];var H = C;var I = C.Items[0.000000];return {Tag: 1.000000, Value: (new v(d(I).get_Current(), H))};}else{var J = C.Items[1.000000];var K = C.Items[0.000000];if (d(J).MoveNext()) {var L = C.Items[1.000000];var M = C.Items[0.000000];return {Tag: 1.000000, Value: (new v(d(L).get_Current(), (new t(L, M))))};}else{return {Tag: 0.000000};};};}), B);}));});m = (function(y){return o((function(z){var A;return n(y(A));}));});n = (function(y){return y.GetEnumerator();});o = (function(y){var z;z = (new a(y));return {GetEnumerator: (function(A){return (function(B,A){var C;return B.factory(C);})(z, A);})};});p = (function(y,z){var A = n(z);for (var B = 0; B <= y; B++){if ((!A.MoveNext())) {throw ("index out of range");null;}else{;};};return A.get_Current();});q = (function(y){return r((function(z){if ((z.Tag == 0.000000)) {return {Tag: 0.000000};}else{var A = f(z);return {Tag: 1.000000, Value: (new u(A, {Tag: 0.000000}))};};}), {Tag: 1.000000, Value: y});});r = (function(y,z){return o((function(A){var B;B = (new w(z, y));return {get_Current: (function(C){return (function(D,C){return D.current;})(B, C);}), MoveNext: (function(C){return (function(D,C){var E = (function(F){var G = e(D.acc);var H = D.unfold(G);if ((H.Tag == 1.000000)) {var I = h(H).Items[0.000000];var J = h(H).Items[1.000000];D.acc = {Tag: 1.000000, Value: J};D.current = I;return true;}else{D.acc = {Tag: 0.000000};D.current = null;return false;};});return (j(D.acc) && (function(){var F;return E(F);})());})(B, C);}), Reset: (function(C){return (function(D,C){D.acc = {Tag: 1.000000, Value: D.seed};D.current = null;})(B, C);}), Dispose: (function(C){return (function(D,C){;})(B, C);})};}));});s = (function(y,z){return o((function(A){var B;B = (new x(z, y));return {get_Current: (function(C){return (function(D,C){return D.current;})(B, C);}), MoveNext: (function(C){return (function(D,C){var E = (function(F){var G = g(D.acc);var H = D.unfold(G);if ((H.Tag == 1.000000)) {var I = i(H).Items[0.000000];var J = i(H).Items[1.000000];D.acc = {Tag: 1.000000, Value: J};D.current = I;return true;}else{D.acc = {Tag: 0.000000};D.current = null;return false;};});return (k(D.acc) && (function(){var F;return E(F);})());})(B, C);}), Reset: (function(C){return (function(D,C){D.acc = {Tag: 1.000000, Value: D.seed};D.current = null;})(B, C);}), Dispose: (function(C){return (function(D,C){;})(B, C);})};}));});t = (function(Item0,Item1){var A = this;A.Items = [Item0, Item1];});u = (function(Item0,Item1){var A = this;A.Items = [Item0, Item1];});v = (function(Item0,Item1){var A = this;A.Items = [Item0, Item1];});w = (function(y,z){var A = this;{};A.seed = y;A.unfold = z;A.acc = {Tag: 1.000000, Value: A.seed};A.current = null;});x = (function(y,z){var A = this;{};A.seed = y;A.unfold = z;A.acc = {Tag: 1.000000, Value: A.seed};A.current = null;});var y;var z;var A;y = (function(B){return m((function(C){return l(q("green"), m((function(D){var E;return z(E);})));}));});z = (function(B){return m((function(C){return l(q("yellow"), m((function(D){var E;return A(E);})));}));});A = (function(B){return m((function(C){return l(q("red"), m((function(D){var E;return y(E);})));}));});var B;return p(12, y(B)) | |
***** FunScript.Tests.SeqExpressions.list expressions work | |
// Code: | |
var I, H, G, F, E, D, C, B, A, z, y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(J){var K = this;{};K.factory = J;});b = (function(J,K){return (new H(J, K));});c = (function(){return (new I());});d = (function(J,K,L){return f((function(M){return (function(N){return (function(O){return J(N)(O);});});}), K, L);});e = (function(J,K,L){return g((function(M){return (function(N){return (function(O){return J(N)(O);});});}), K, L);});f = (function(J,K,L){return h(J, 0, K, L);});g = (function(J,K,L){return i(J, 0, K, L);});h = (function(J,K,L,M){if ((M.Tag == 1.000000)) {var N = M.Item2;var O = M.Item1;return h(J, (K + 1), J(K)(L)(O), N);}else{return L;};});i = (function(J,K,L,M){if ((M.Tag == 1.000000)) {var N = M.Item2;var O = M.Item1;return i(J, (K + 1), J(K)(L)(O), N);}else{return L;};});j = (function(J){return d((function(K){return (function(L){return (K + 1);});}), 0, J);});k = (function(J){return e((function(K){return (function(L){return (new H(L, K));});}), (new I()), J);});l = (function(J){return J.Value;;});m = (function(J){return J.Value;;});n = (function(J){return J.Value;;});o = (function(J){return J.Value;;});p = (function(J){return ((J.Tag == 1.000000) && true);});q = (function(J){return ((J.Tag == 1.000000) && true);});r = (function(J,K,L){var M = 0;return C((function(N){if ((((K > M) && (N <= L)) || ((K < M) && (N >= L)))) {return {Tag: 1.000000, Value: (new E(N, (N + K)))};}else{return {Tag: 0.000000};};}), J);});s = (function(J,K){return r(J, 1, K);});t = (function(J){return y((function(K){var L;return u(J(L));}));});u = (function(J){return J.GetEnumerator();});v = (function(J,K,L){return w((function(M){return (function(N){return (function(O){return J(N)(O);});});}), K, L);});w = (function(J,K,L){return x(J, K, u(L));});x = (function(J,K,L){var M = {contents: 0};var N = {contents: K};while (L.MoveNext()){N.contents = J(M.contents)(N.contents)(L.get_Current());null;M.contents = (M.contents + 1);null;};return N.contents;});y = (function(J){var K;K = (new a(J));return {GetEnumerator: (function(L){return (function(M,L){var N;return M.factory(N);})(K, L);})};});z = (function(J,K){return t((function(L){return B((function(M){if (M.MoveNext()) {return {Tag: 1.000000, Value: (new D(J(M.get_Current()), M))};}else{return {Tag: 0.000000};};}), u(K));}));});A = (function(J){return k(v((function(K){return (function(L){return b(L, K);});}), c(), J));});B = (function(J,K){return y((function(L){var M;M = (new F(K, J));return {get_Current: (function(N){return (function(O,N){return O.current;})(M, N);}), MoveNext: (function(N){return (function(O,N){var P = (function(Q){var R = l(O.acc);var S = O.unfold(R);if ((S.Tag == 1.000000)) {var T = n(S).Items[0.000000];var U = n(S).Items[1.000000];O.acc = {Tag: 1.000000, Value: U};O.current = T;return true;}else{O.acc = {Tag: 0.000000};O.current = null;return false;};});return (p(O.acc) && (function(){var Q;return P(Q);})());})(M, N);}), Reset: (function(N){return (function(O,N){O.acc = {Tag: 1.000000, Value: O.seed};O.current = null;})(M, N);}), Dispose: (function(N){return (function(O,N){;})(M, N);})};}));});C = (function(J,K){return y((function(L){var M;M = (new G(K, J));return {get_Current: (function(N){return (function(O,N){return O.current;})(M, N);}), MoveNext: (function(N){return (function(O,N){var P = (function(Q){var R = m(O.acc);var S = O.unfold(R);if ((S.Tag == 1.000000)) {var T = o(S).Items[0.000000];var U = o(S).Items[1.000000];O.acc = {Tag: 1.000000, Value: U};O.current = T;return true;}else{O.acc = {Tag: 0.000000};O.current = null;return false;};});return (q(O.acc) && (function(){var Q;return P(Q);})());})(M, N);}), Reset: (function(N){return (function(O,N){O.acc = {Tag: 1.000000, Value: O.seed};O.current = null;})(M, N);}), Dispose: (function(N){return (function(O,N){;})(M, N);})};}));});D = (function(Item0,Item1){var L = this;L.Items = [Item0, Item1];});E = (function(Item0,Item1){var L = this;L.Items = [Item0, Item1];});F = (function(J,K){var L = this;{};L.seed = J;L.unfold = K;L.acc = {Tag: 1.000000, Value: L.seed};L.current = null;});G = (function(J,K){var L = this;{};L.seed = J;L.unfold = K;L.acc = {Tag: 1.000000, Value: L.seed};L.current = null;});H = (function(Item1,Item2){var L = this;L.Tag = 1.000000;L._CaseName = "Cons";L.Item1 = Item1;L.Item2 = Item2;});I = (function(){var J = this;J.Tag = 0.000000;J._CaseName = "Nil";});var J = A(t((function(K){return z((function(L){return L;}), s(1, 10));})));return j(J) | |
***** FunScript.Tests.SeqExpressions.multiple yields in seq expressions work | |
// Code: | |
var O, N, M, L, K, J, I, H, G, F, E, D, C, B, A, z, y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(P){var Q = this;{};Q.factory = P;});b = (function(P){return (new c(null, P));});c = (function(P,Q){var R = this;{};R.factory = Q;R.isCreated = false;R.value_24 = P;});d = (function(P,Q){if ((!P.isCreated)) {var R;P.value_24 = P.factory(R);P.isCreated = true;}else{;};return P.value_24;});e = (function(P){return P.Value;;});f = (function(P){return P.Value;;});g = (function(P){return P.Value;;});h = (function(P){return P.Value;;});i = (function(P){return P.Value;;});j = (function(P){return P.Value;;});k = (function(P){return P.Value;;});l = (function(P){return P.Value;;});m = (function(P){return ((P.Tag == 1.000000) && true);});n = (function(P){return ((P.Tag == 1.000000) && true);});o = (function(P){return ((P.Tag == 1.000000) && true);});p = (function(P){return ((P.Tag == 1.000000) && true);});q = (function(P,Q,R){var S = 0;return E((function(T){if ((((Q > S) && (T <= R)) || ((Q < S) && (T >= R)))) {return {Tag: 1.000000, Value: (new I(T, (T + Q)))};}else{return {Tag: 0.000000};};}), P);});r = (function(P,Q){return q(P, 1, Q);});s = (function(P,Q){return t((function(R){var S = (new K(b((function(T){return u(P);})), b((function(T){return u(Q);}))));return F((function(T){var U = T.Items[1.000000];var V = T;var W = T.Items[0.000000];if (d(W).MoveNext()) {var X = T.Items[1.000000];var Y = T;var Z = T.Items[0.000000];return {Tag: 1.000000, Value: (new J(d(Z).get_Current(), Y))};}else{var _ = T.Items[1.000000];var ab = T.Items[0.000000];if (d(_).MoveNext()) {var bb = T.Items[1.000000];var cb = T.Items[0.000000];return {Tag: 1.000000, Value: (new J(d(bb).get_Current(), (new K(bb, cb))))};}else{return {Tag: 0.000000};};};}), S);}));});t = (function(P){return y((function(Q){var R;return u(P(R));}));});u = (function(P){return P.GetEnumerator();});v = (function(P,Q,R){return w((function(S){return (function(T){return (function(U){return P(T)(U);});});}), Q, R);});w = (function(P,Q,R){return x(P, Q, u(R));});x = (function(P,Q,R){var S = {contents: 0};var T = {contents: Q};while (R.MoveNext()){T.contents = P(S.contents)(T.contents)(R.get_Current());null;S.contents = (S.contents + 1);null;};return T.contents;});y = (function(P){var Q;Q = (new a(P));return {GetEnumerator: (function(R){return (function(S,R){var T;return S.factory(T);})(Q, R);})};});z = (function(P,Q){return t((function(R){return D((function(S){if (S.MoveNext()) {return {Tag: 1.000000, Value: (new H(P(S.get_Current()), S))};}else{return {Tag: 0.000000};};}), u(Q));}));});A = (function(P){return C((function(Q){if ((Q.Tag == 0.000000)) {return {Tag: 0.000000};}else{var R = g(Q);return {Tag: 1.000000, Value: (new G(R, {Tag: 0.000000}))};};}), {Tag: 1.000000, Value: P});});B = (function(P,Q){return v((function(R){return (function(S){return (R + P(S));});}), 0, Q);});C = (function(P,Q){return y((function(R){var S;S = (new L(Q, P));return {get_Current: (function(T){return (function(U,T){return U.current;})(S, T);}), MoveNext: (function(T){return (function(U,T){var V = (function(W){var X = e(U.acc);var Y = U.unfold(X);if ((Y.Tag == 1.000000)) {var Z = h(Y).Items[0.000000];var _ = h(Y).Items[1.000000];U.acc = {Tag: 1.000000, Value: _};U.current = Z;return true;}else{U.acc = {Tag: 0.000000};U.current = null;return false;};});return (m(U.acc) && (function(){var W;return V(W);})());})(S, T);}), Reset: (function(T){return (function(U,T){U.acc = {Tag: 1.000000, Value: U.seed};U.current = null;})(S, T);}), Dispose: (function(T){return (function(U,T){;})(S, T);})};}));});D = (function(P,Q){return y((function(R){var S;S = (new M(Q, P));return {get_Current: (function(T){return (function(U,T){return U.current;})(S, T);}), MoveNext: (function(T){return (function(U,T){var V = (function(W){var X = f(U.acc);var Y = U.unfold(X);if ((Y.Tag == 1.000000)) {var Z = i(Y).Items[0.000000];var _ = i(Y).Items[1.000000];U.acc = {Tag: 1.000000, Value: _};U.current = Z;return true;}else{U.acc = {Tag: 0.000000};U.current = null;return false;};});return (n(U.acc) && (function(){var W;return V(W);})());})(S, T);}), Reset: (function(T){return (function(U,T){U.acc = {Tag: 1.000000, Value: U.seed};U.current = null;})(S, T);}), Dispose: (function(T){return (function(U,T){;})(S, T);})};}));});E = (function(P,Q){return y((function(R){var S;S = (new N(Q, P));return {get_Current: (function(T){return (function(U,T){return U.current;})(S, T);}), MoveNext: (function(T){return (function(U,T){var V = (function(W){var X = g(U.acc);var Y = U.unfold(X);if ((Y.Tag == 1.000000)) {var Z = j(Y).Items[0.000000];var _ = j(Y).Items[1.000000];U.acc = {Tag: 1.000000, Value: _};U.current = Z;return true;}else{U.acc = {Tag: 0.000000};U.current = null;return false;};});return (o(U.acc) && (function(){var W;return V(W);})());})(S, T);}), Reset: (function(T){return (function(U,T){U.acc = {Tag: 1.000000, Value: U.seed};U.current = null;})(S, T);}), Dispose: (function(T){return (function(U,T){;})(S, T);})};}));});F = (function(P,Q){return y((function(R){var S;S = (new O(Q, P));return {get_Current: (function(T){return (function(U,T){return U.current;})(S, T);}), MoveNext: (function(T){return (function(U,T){var V = (function(W){var X = l(U.acc);var Y = U.unfold(X);if ((Y.Tag == 1.000000)) {var Z = k(Y).Items[0.000000];var _ = k(Y).Items[1.000000];U.acc = {Tag: 1.000000, Value: _};U.current = Z;return true;}else{U.acc = {Tag: 0.000000};U.current = null;return false;};});return (p(U.acc) && (function(){var W;return V(W);})());})(S, T);}), Reset: (function(T){return (function(U,T){U.acc = {Tag: 1.000000, Value: U.seed};U.current = null;})(S, T);}), Dispose: (function(T){return (function(U,T){;})(S, T);})};}));});G = (function(Item0,Item1){var R = this;R.Items = [Item0, Item1];});H = (function(Item0,Item1){var R = this;R.Items = [Item0, Item1];});I = (function(Item0,Item1){var R = this;R.Items = [Item0, Item1];});J = (function(Item0,Item1){var R = this;R.Items = [Item0, Item1];});K = (function(Item0,Item1){var R = this;R.Items = [Item0, Item1];});L = (function(P,Q){var R = this;{};R.seed = P;R.unfold = Q;R.acc = {Tag: 1.000000, Value: R.seed};R.current = null;});M = (function(P,Q){var R = this;{};R.seed = P;R.unfold = Q;R.acc = {Tag: 1.000000, Value: R.seed};R.current = null;});N = (function(P,Q){var R = this;{};R.seed = P;R.unfold = Q;R.acc = {Tag: 1.000000, Value: R.seed};R.current = null;});O = (function(P,Q){var R = this;{};R.seed = P;R.unfold = Q;R.acc = {Tag: 1.000000, Value: R.seed};R.current = null;});var P = (function(Q){return t((function(R){return z((function(S){return Q;}), r(1, Q));}));});var Q = (function(R){return t((function(S){return s(A(8), t((function(T){return s(P(5), t((function(U){return s(A(4), t((function(V){return s(P(3), t((function(W){return A(2);})));})));})));})));}));});var R;return B((function(S){return S;}), Q(R)) | |
***** FunScript.Tests.SeqExpressions.recursive seq expressions work | |
// Code: | |
var P, O, N, M, L, K, J, I, H, G, F, E, D, C, B, A, z, y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(Q){var R = this;{};R.factory = Q;});b = (function(Q){return (new c(null, Q));});c = (function(Q,R){var S = this;{};S.factory = R;S.isCreated = false;S.value_24 = Q;});d = (function(Q,R){if ((!Q.isCreated)) {var S;Q.value_24 = Q.factory(S);Q.isCreated = true;}else{;};return Q.value_24;});e = (function(Q){return Q.Value;;});f = (function(Q){return Q.Value;;});g = (function(Q){return Q.Value;;});h = (function(Q){return Q.Value;;});i = (function(Q){return Q.Value;;});j = (function(Q){return Q.Value;;});k = (function(Q){return Q.Value;;});l = (function(Q){return Q.Value;;});m = (function(Q){return Q.Value;;});n = (function(Q){return ((Q.Tag == 1.000000) && true);});o = (function(Q){return ((Q.Tag == 1.000000) && true);});p = (function(Q){return ((Q.Tag == 1.000000) && true);});q = (function(Q){return ((Q.Tag == 1.000000) && true);});r = (function(Q,R){return s((function(S){var T = (new L(b((function(U){return u(Q);})), b((function(U){return u(R);}))));return F((function(U){var V = U.Items[1.000000];var W = U;var X = U.Items[0.000000];if (d(X).MoveNext()) {var Y = U.Items[1.000000];var Z = U;var _ = U.Items[0.000000];return {Tag: 1.000000, Value: (new K(d(_).get_Current(), Z))};}else{var ab = U.Items[1.000000];var bb = U.Items[0.000000];if (d(ab).MoveNext()) {var cb = U.Items[1.000000];var db = U.Items[0.000000];return {Tag: 1.000000, Value: (new K(d(cb).get_Current(), (new L(cb, db))))};}else{return {Tag: 0.000000};};};}), T);}));});s = (function(Q){return y((function(R){var S;return u(Q(S));}));});t = (function(){return C((function(Q){return {Tag: 0.000000};}), false);});u = (function(Q){return Q.GetEnumerator();});v = (function(Q,R,S){return w((function(T){return (function(U){return (function(V){return Q(U)(V);});});}), R, S);});w = (function(Q,R,S){return x(Q, R, u(S));});x = (function(Q,R,S){var T = {contents: 0};var U = {contents: R};while (S.MoveNext()){U.contents = Q(T.contents)(U.contents)(S.get_Current());null;T.contents = (T.contents + 1);null;};return U.contents;});y = (function(Q){var R;R = (new a(Q));return {GetEnumerator: (function(S){return (function(T,S){var U;return T.factory(U);})(R, S);})};});z = (function(Q,R){return s((function(S){return E((function(T){if (T.MoveNext()) {return {Tag: 1.000000, Value: (new J(Q(T.get_Current()), T))};}else{return {Tag: 0.000000};};}), u(R));}));});A = (function(Q){return D((function(R){if ((R.Tag == 0.000000)) {return {Tag: 0.000000};}else{var S = f(R);return {Tag: 1.000000, Value: (new I(S, {Tag: 0.000000}))};};}), {Tag: 1.000000, Value: Q});});B = (function(Q,R){return v((function(S){return (function(T){return (S + Q(T));});}), 0, R);});C = (function(Q,R){return y((function(S){var T;T = (new M(R, Q));return {get_Current: (function(U){return (function(V,U){return V.current;})(T, U);}), MoveNext: (function(U){return (function(V,U){var W = (function(X){var Y = e(V.acc);var Z = V.unfold(Y);if ((Z.Tag == 1.000000)) {var _ = i(Z).Items[0.000000];var ab = i(Z).Items[1.000000];V.acc = {Tag: 1.000000, Value: ab};V.current = _;return true;}else{V.acc = {Tag: 0.000000};V.current = null;return false;};});return (n(V.acc) && (function(){var X;return W(X);})());})(T, U);}), Reset: (function(U){return (function(V,U){V.acc = {Tag: 1.000000, Value: V.seed};V.current = null;})(T, U);}), Dispose: (function(U){return (function(V,U){;})(T, U);})};}));});D = (function(Q,R){return y((function(S){var T;T = (new N(R, Q));return {get_Current: (function(U){return (function(V,U){return V.current;})(T, U);}), MoveNext: (function(U){return (function(V,U){var W = (function(X){var Y = g(V.acc);var Z = V.unfold(Y);if ((Z.Tag == 1.000000)) {var _ = j(Z).Items[0.000000];var ab = j(Z).Items[1.000000];V.acc = {Tag: 1.000000, Value: ab};V.current = _;return true;}else{V.acc = {Tag: 0.000000};V.current = null;return false;};});return (o(V.acc) && (function(){var X;return W(X);})());})(T, U);}), Reset: (function(U){return (function(V,U){V.acc = {Tag: 1.000000, Value: V.seed};V.current = null;})(T, U);}), Dispose: (function(U){return (function(V,U){;})(T, U);})};}));});E = (function(Q,R){return y((function(S){var T;T = (new O(R, Q));return {get_Current: (function(U){return (function(V,U){return V.current;})(T, U);}), MoveNext: (function(U){return (function(V,U){var W = (function(X){var Y = h(V.acc);var Z = V.unfold(Y);if ((Z.Tag == 1.000000)) {var _ = k(Z).Items[0.000000];var ab = k(Z).Items[1.000000];V.acc = {Tag: 1.000000, Value: ab};V.current = _;return true;}else{V.acc = {Tag: 0.000000};V.current = null;return false;};});return (p(V.acc) && (function(){var X;return W(X);})());})(T, U);}), Reset: (function(U){return (function(V,U){V.acc = {Tag: 1.000000, Value: V.seed};V.current = null;})(T, U);}), Dispose: (function(U){return (function(V,U){;})(T, U);})};}));});F = (function(Q,R){return y((function(S){var T;T = (new P(R, Q));return {get_Current: (function(U){return (function(V,U){return V.current;})(T, U);}), MoveNext: (function(U){return (function(V,U){var W = (function(X){var Y = m(V.acc);var Z = V.unfold(Y);if ((Z.Tag == 1.000000)) {var _ = l(Z).Items[0.000000];var ab = l(Z).Items[1.000000];V.acc = {Tag: 1.000000, Value: ab};V.current = _;return true;}else{V.acc = {Tag: 0.000000};V.current = null;return false;};});return (q(V.acc) && (function(){var X;return W(X);})());})(T, U);}), Reset: (function(U){return (function(V,U){V.acc = {Tag: 1.000000, Value: V.seed};V.current = null;})(T, U);}), Dispose: (function(U){return (function(V,U){;})(T, U);})};}));});G = (function(){var Q = this;Q.Tag = 0.000000;Q._CaseName = "Leaf";});H = (function(Item1,Item2,Item3){var T = this;T.Tag = 1.000000;T._CaseName = "Node";T.Item1 = Item1;T.Item2 = Item2;T.Item3 = Item3;});I = (function(Item0,Item1){var S = this;S.Items = [Item0, Item1];});J = (function(Item0,Item1){var S = this;S.Items = [Item0, Item1];});K = (function(Item0,Item1){var S = this;S.Items = [Item0, Item1];});L = (function(Item0,Item1){var S = this;S.Items = [Item0, Item1];});M = (function(Q,R){var S = this;{};S.seed = Q;S.unfold = R;S.acc = {Tag: 1.000000, Value: S.seed};S.current = null;});N = (function(Q,R){var S = this;{};S.seed = Q;S.unfold = R;S.acc = {Tag: 1.000000, Value: S.seed};S.current = null;});O = (function(Q,R){var S = this;{};S.seed = Q;S.unfold = R;S.acc = {Tag: 1.000000, Value: S.seed};S.current = null;});P = (function(Q,R){var S = this;{};S.seed = Q;S.unfold = R;S.acc = {Tag: 1.000000, Value: S.seed};S.current = null;});var Q;Q = (function(R){return s((function(S){if ((R.Tag == 1.000000)) {var T = R.Item3;var U = R.Item2;var V = R.Item1;return r(A(U), s((function(W){return r(Q(V), s((function(X){var Y = 2.000000;return z((function(Z){return (Y * Z);}), Q(T));})));})));}else{return t();};}));});var R = (new H((new H((new G()), 1.000000, (new G()))), 2.000000, (new H((new G()), 3.000000, (new G())))));return B((function(S){return S;}), Q(R)) | |
***** FunScript.Tests.SeqExpressions.try...finally in seq expressions works | |
// Code: | |
var v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(w){var x = this;{};x.factory = w;});b = (function(w){var x = this;{};x.message = w;});c = (function(w){return w.Value;;});d = (function(w){return w.Value;;});e = (function(w){return w.Value;;});f = (function(w){return w.Value;;});g = (function(w){return ((w.Tag == 1.000000) && true);});h = (function(w){return ((w.Tag == 1.000000) && true);});i = (function(w,x){return j((function(y){var z;try{z = l(w);}finally{var A;x(A);};var B = z;return s((function(C){try{if (C.MoveNext()) {return {Tag: 1.000000, Value: (new t(C.get_Current(), C))};}else{return {Tag: 0.000000};};}finally{var D;x(D);};}), B);}));});j = (function(w){return p((function(x){var y;return l(w(y));}));});k = (function(){return r((function(w){return {Tag: 0.000000};}), false);});l = (function(w){return w.GetEnumerator();});m = (function(w,x,y){return n((function(z){return (function(A){return (function(B){return w(A)(B);});});}), x, y);});n = (function(w,x,y){return o(w, x, l(y));});o = (function(w,x,y){var z = {contents: 0};var A = {contents: x};while (y.MoveNext()){A.contents = w(z.contents)(A.contents)(y.get_Current());null;z.contents = (z.contents + 1);null;};return A.contents;});p = (function(w){var x;x = (new a(w));return {GetEnumerator: (function(y){return (function(z,y){var A;return z.factory(A);})(x, y);})};});q = (function(w,x){var y;return m((function(z){return (function(A){return w(A);});}), y, x);});r = (function(w,x){return p((function(y){var z;z = (new u(x, w));return {get_Current: (function(A){return (function(B,A){return B.current;})(z, A);}), MoveNext: (function(A){return (function(B,A){var C = (function(D){var E = c(B.acc);var F = B.unfold(E);if ((F.Tag == 1.000000)) {var G = e(F).Items[0.000000];var H = e(F).Items[1.000000];B.acc = {Tag: 1.000000, Value: H};B.current = G;return true;}else{B.acc = {Tag: 0.000000};B.current = null;return false;};});return (g(B.acc) && (function(){var D;return C(D);})());})(z, A);}), Reset: (function(A){return (function(B,A){B.acc = {Tag: 1.000000, Value: B.seed};B.current = null;})(z, A);}), Dispose: (function(A){return (function(B,A){;})(z, A);})};}));});s = (function(w,x){return p((function(y){var z;z = (new v(x, w));return {get_Current: (function(A){return (function(B,A){return B.current;})(z, A);}), MoveNext: (function(A){return (function(B,A){var C = (function(D){var E = d(B.acc);var F = B.unfold(E);if ((F.Tag == 1.000000)) {var G = f(F).Items[0.000000];var H = f(F).Items[1.000000];B.acc = {Tag: 1.000000, Value: H};B.current = G;return true;}else{B.acc = {Tag: 0.000000};B.current = null;return false;};});return (h(B.acc) && (function(){var D;return C(D);})());})(z, A);}), Reset: (function(A){return (function(B,A){B.acc = {Tag: 1.000000, Value: B.seed};B.current = null;})(z, A);}), Dispose: (function(A){return (function(B,A){;})(z, A);})};}));});t = (function(Item0,Item1){var y = this;y.Items = [Item0, Item1];});u = (function(w,x){var y = this;{};y.seed = w;y.unfold = x;y.acc = {Tag: 1.000000, Value: y.seed};y.current = null;});v = (function(w,x){var y = this;{};y.seed = w;y.unfold = x;y.acc = {Tag: 1.000000, Value: y.seed};y.current = null;});var w = {contents: 0.000000};try{q((function(y){var z = y;}), j((function(y){return i(j((function(z){throw ((new b("My message")));null;return k();})), (function(z){w.contents = (w.contents + 1.000000);}));})));}catch(x){;};return w.contents | |
***** FunScript.Tests.SeqExpressions.use in seq expressions works | |
// Code: | |
var w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(x){var y = this;{};y.factory = x;});b = (function(x){var y = this;{};y.f = x;});c = (function(x){return x.Value;;});d = (function(x){return x.Value;;});e = (function(x){return x.Value;;});f = (function(x){return x.Value;;});g = (function(x){return ((x.Tag == 1.000000) && true);});h = (function(x){return ((x.Tag == 1.000000) && true);});i = (function(x,y){return k((function(z){var A;try{A = m(x);}finally{var B;y(B);};var C = A;return t((function(D){try{if (D.MoveNext()) {return {Tag: 1.000000, Value: (new u(D.get_Current(), D))};}else{return {Tag: 0.000000};};}finally{var E;y(E);};}), C);}));});j = (function(x,y){var z = {contents: false};var A;A = x;var B = {Dispose: (function(C){return (function(D,C){var E;return D.f(E);})(A, C);})};var C = (function(D){if ((!z.contents)) {z.contents = true;null;return B.Dispose();}else{;};});try{return i(y(x), C);}finally{var D;C(D);};});k = (function(x){return q((function(y){var z;return m(x(z));}));});l = (function(){return s((function(x){return {Tag: 0.000000};}), false);});m = (function(x){return x.GetEnumerator();});n = (function(x,y,z){return o((function(A){return (function(B){return (function(C){return x(B)(C);});});}), y, z);});o = (function(x,y,z){return p(x, y, m(z));});p = (function(x,y,z){var A = {contents: 0};var B = {contents: y};while (z.MoveNext()){B.contents = x(A.contents)(B.contents)(z.get_Current());null;A.contents = (A.contents + 1);null;};return B.contents;});q = (function(x){var y;y = (new a(x));return {GetEnumerator: (function(z){return (function(A,z){var B;return A.factory(B);})(y, z);})};});r = (function(x,y){var z;return n((function(A){return (function(B){return x(B);});}), z, y);});s = (function(x,y){return q((function(z){var A;A = (new v(y, x));return {get_Current: (function(B){return (function(C,B){return C.current;})(A, B);}), MoveNext: (function(B){return (function(C,B){var D = (function(E){var F = c(C.acc);var G = C.unfold(F);if ((G.Tag == 1.000000)) {var H = e(G).Items[0.000000];var I = e(G).Items[1.000000];C.acc = {Tag: 1.000000, Value: I};C.current = H;return true;}else{C.acc = {Tag: 0.000000};C.current = null;return false;};});return (g(C.acc) && (function(){var E;return D(E);})());})(A, B);}), Reset: (function(B){return (function(C,B){C.acc = {Tag: 1.000000, Value: C.seed};C.current = null;})(A, B);}), Dispose: (function(B){return (function(C,B){;})(A, B);})};}));});t = (function(x,y){return q((function(z){var A;A = (new w(y, x));return {get_Current: (function(B){return (function(C,B){return C.current;})(A, B);}), MoveNext: (function(B){return (function(C,B){var D = (function(E){var F = d(C.acc);var G = C.unfold(F);if ((G.Tag == 1.000000)) {var H = f(G).Items[0.000000];var I = f(G).Items[1.000000];C.acc = {Tag: 1.000000, Value: I};C.current = H;return true;}else{C.acc = {Tag: 0.000000};C.current = null;return false;};});return (h(C.acc) && (function(){var E;return D(E);})());})(A, B);}), Reset: (function(B){return (function(C,B){C.acc = {Tag: 1.000000, Value: C.seed};C.current = null;})(A, B);}), Dispose: (function(B){return (function(C,B){;})(A, B);})};}));});u = (function(Item0,Item1){var z = this;z.Items = [Item0, Item1];});v = (function(x,y){var z = this;{};z.seed = x;z.unfold = y;z.acc = {Tag: 1.000000, Value: z.seed};z.current = null;});w = (function(x,y){var z = this;{};z.seed = x;z.unfold = y;z.acc = {Tag: 1.000000, Value: z.seed};z.current = null;});var x = {contents: 0.000000};r((function(y){var z = y;}), k((function(y){return j((new b((function(z){x.contents = (x.contents + 1.000000);}))), (function(z){var A = z;return l();}));})));return x.contents | |
***** FunScript.Tests.SeqExpressions.while in seq expressions works | |
// Code: | |
var I, H, G, F, E, D, C, B, A, z, y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(J){var K = this;{};K.factory = J;});b = (function(J){var K = this;{};K.factory = J;});c = (function(J){return J.Value;;});d = (function(J){return J.Value;;});e = (function(J){return J.Value;;});f = (function(J){return J.Value;;});g = (function(J){return J.Value;;});h = (function(J){return J.Value;;});i = (function(J){return J.Value;;});j = (function(J){return J.Value;;});k = (function(J){return ((J.Tag == 1.000000) && true);});l = (function(J){return ((J.Tag == 1.000000) && true);});m = (function(J){return ((J.Tag == 1.000000) && true);});n = (function(J,K){var L;return o(B((function(M){var N;if (J(N)) {var O;return {Tag: 1.000000, Value: (new F(K, O))};}else{return {Tag: 0.000000};};}), L));});o = (function(J){return p((function(K){var L = r(J);var M = (function(N){var O = {contents: N};var P = {contents: {Tag: 0.000000}};var Q = {contents: false};while ((!Q.contents)){var R = O.contents;if ((R.Tag == 1.000000)) {var S = f(R);if (S.MoveNext()) {P.contents = {Tag: 1.000000, Value: S.get_Current()};null;Q.contents = true;null;}else{O.contents = {Tag: 0.000000};null;};}else{if (L.MoveNext()) {O.contents = {Tag: 1.000000, Value: q(L.get_Current())};null;}else{Q.contents = true;null;};};};var T = (new E(O.contents, P.contents));if ((T.Items[0.000000].Tag == 1.000000)) {if ((T.Items[1.000000].Tag == 1.000000)) {var U = f(T.Items[0.000000]);var V = c(T.Items[1.000000]);return {Tag: 1.000000, Value: (new D(V, {Tag: 1.000000, Value: U}))};}else{return {Tag: 0.000000};};}else{return {Tag: 0.000000};};});return A((function(N){return M(N);}), {Tag: 0.000000});}));});p = (function(J){return v((function(K){var L;return q(J(L));}));});q = (function(J){return J.GetEnumerator();});r = (function(J){return J.GetEnumerator();});s = (function(J,K,L){return t((function(M){return (function(N){return (function(O){return J(N)(O);});});}), K, L);});t = (function(J,K,L){return u(J, K, q(L));});u = (function(J,K,L){var M = {contents: 0};var N = {contents: K};while (L.MoveNext()){N.contents = J(M.contents)(N.contents)(L.get_Current());null;M.contents = (M.contents + 1);null;};return N.contents;});v = (function(J){var K;K = (new a(J));return {GetEnumerator: (function(L){return (function(M,L){var N;return M.factory(N);})(K, L);})};});w = (function(J){var K;K = (new b(J));return {GetEnumerator: (function(L){return (function(M,L){var N;return M.factory(N);})(K, L);})};});x = (function(J){return z((function(K){if ((K.Tag == 0.000000)) {return {Tag: 0.000000};}else{var L = c(K);return {Tag: 1.000000, Value: (new C(L, {Tag: 0.000000}))};};}), {Tag: 1.000000, Value: J});});y = (function(J){return s((function(K){return (function(L){return (K + L);});}), 0, J);});z = (function(J,K){return v((function(L){var M;M = (new G(K, J));return {get_Current: (function(N){return (function(O,N){return O.current;})(M, N);}), MoveNext: (function(N){return (function(O,N){var P = (function(Q){var R = d(O.acc);var S = O.unfold(R);if ((S.Tag == 1.000000)) {var T = g(S).Items[0.000000];var U = g(S).Items[1.000000];O.acc = {Tag: 1.000000, Value: U};O.current = T;return true;}else{O.acc = {Tag: 0.000000};O.current = null;return false;};});return (k(O.acc) && (function(){var Q;return P(Q);})());})(M, N);}), Reset: (function(N){return (function(O,N){O.acc = {Tag: 1.000000, Value: O.seed};O.current = null;})(M, N);}), Dispose: (function(N){return (function(O,N){;})(M, N);})};}));});A = (function(J,K){return v((function(L){var M;M = (new H(K, J));return {get_Current: (function(N){return (function(O,N){return O.current;})(M, N);}), MoveNext: (function(N){return (function(O,N){var P = (function(Q){var R = e(O.acc);var S = O.unfold(R);if ((S.Tag == 1.000000)) {var T = h(S).Items[0.000000];var U = h(S).Items[1.000000];O.acc = {Tag: 1.000000, Value: U};O.current = T;return true;}else{O.acc = {Tag: 0.000000};O.current = null;return false;};});return (l(O.acc) && (function(){var Q;return P(Q);})());})(M, N);}), Reset: (function(N){return (function(O,N){O.acc = {Tag: 1.000000, Value: O.seed};O.current = null;})(M, N);}), Dispose: (function(N){return (function(O,N){;})(M, N);})};}));});B = (function(J,K){return w((function(L){var M;M = (new I(K, J));return {get_Current: (function(N){return (function(O,N){return O.current;})(M, N);}), MoveNext: (function(N){return (function(O,N){var P = (function(Q){var R = j(O.acc);var S = O.unfold(R);if ((S.Tag == 1.000000)) {var T = i(S).Items[0.000000];var U = i(S).Items[1.000000];O.acc = {Tag: 1.000000, Value: U};O.current = T;return true;}else{O.acc = {Tag: 0.000000};O.current = null;return false;};});return (m(O.acc) && (function(){var Q;return P(Q);})());})(M, N);}), Reset: (function(N){return (function(O,N){O.acc = {Tag: 1.000000, Value: O.seed};O.current = null;})(M, N);}), Dispose: (function(N){return (function(O,N){;})(M, N);})};}));});C = (function(Item0,Item1){var L = this;L.Items = [Item0, Item1];});D = (function(Item0,Item1){var L = this;L.Items = [Item0, Item1];});E = (function(Item0,Item1){var L = this;L.Items = [Item0, Item1];});F = (function(Item0,Item1){var L = this;L.Items = [Item0, Item1];});G = (function(J,K){var L = this;{};L.seed = J;L.unfold = K;L.acc = {Tag: 1.000000, Value: L.seed};L.current = null;});H = (function(J,K){var L = this;{};L.seed = J;L.unfold = K;L.acc = {Tag: 1.000000, Value: L.seed};L.current = null;});I = (function(J,K){var L = this;{};L.seed = J;L.unfold = K;L.acc = {Tag: 1.000000, Value: L.seed};L.current = null;});var J = {contents: 0.000000};return y(p((function(K){return n((function(L){return (J.contents < 10.000000);}), p((function(L){J.contents = (J.contents + 1.000000);null;return x(J.contents);})));}))) | |
***** FunScript.Tests.SeqExpressions.yield from in seq expressions works | |
// Code: | |
var p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(q){var r = this;{};r.factory = q;});b = (function(q){return q.Value;;});c = (function(q){return q.Value;;});d = (function(q){return q.Value;;});e = (function(q){return ((q.Tag == 1.000000) && true);});f = (function(q){return k((function(r){var s;return g(q(s));}));});g = (function(q){return q.GetEnumerator();});h = (function(q,r,s){return i((function(t){return (function(u){return (function(v){return q(u)(v);});});}), r, s);});i = (function(q,r,s){return j(q, r, g(s));});j = (function(q,r,s){var t = {contents: 0};var u = {contents: r};while (s.MoveNext()){u.contents = q(t.contents)(u.contents)(s.get_Current());null;t.contents = (t.contents + 1);null;};return u.contents;});k = (function(q){var r;r = (new a(q));return {GetEnumerator: (function(s){return (function(t,s){var u;return t.factory(u);})(r, s);})};});l = (function(q){return h((function(r){return (function(s){return (r + 1);});}), 0, q);});m = (function(q){return n((function(r){if ((r.Tag == 0.000000)) {return {Tag: 0.000000};}else{var s = c(r);return {Tag: 1.000000, Value: (new o(s, {Tag: 0.000000}))};};}), {Tag: 1.000000, Value: q});});n = (function(q,r){return k((function(s){var t;t = (new p(r, q));return {get_Current: (function(u){return (function(v,u){return v.current;})(t, u);}), MoveNext: (function(u){return (function(v,u){var w = (function(x){var y = b(v.acc);var z = v.unfold(y);if ((z.Tag == 1.000000)) {var A = d(z).Items[0.000000];var B = d(z).Items[1.000000];v.acc = {Tag: 1.000000, Value: B};v.current = A;return true;}else{v.acc = {Tag: 0.000000};v.current = null;return false;};});return (e(v.acc) && (function(){var x;return w(x);})());})(t, u);}), Reset: (function(u){return (function(v,u){v.acc = {Tag: 1.000000, Value: v.seed};v.current = null;})(t, u);}), Dispose: (function(u){return (function(v,u){;})(t, u);})};}));});o = (function(Item0,Item1){var s = this;s.Items = [Item0, Item1];});p = (function(q,r){var s = this;{};s.seed = q;s.unfold = r;s.acc = {Tag: 1.000000, Value: s.seed};s.current = null;});var q = f((function(r){return m(1);}));var r = f((function(s){return q;}));return l(r) | |
***** FunScript.Tests.SeqExpressions.yield in seq expressions works | |
// Code: | |
var p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(q){var r = this;{};r.factory = q;});b = (function(q){return q.Value;;});c = (function(q){return q.Value;;});d = (function(q){return q.Value;;});e = (function(q){return ((q.Tag == 1.000000) && true);});f = (function(q){return k((function(r){var s;return g(q(s));}));});g = (function(q){return q.GetEnumerator();});h = (function(q,r,s){return i((function(t){return (function(u){return (function(v){return q(u)(v);});});}), r, s);});i = (function(q,r,s){return j(q, r, g(s));});j = (function(q,r,s){var t = {contents: 0};var u = {contents: r};while (s.MoveNext()){u.contents = q(t.contents)(u.contents)(s.get_Current());null;t.contents = (t.contents + 1);null;};return u.contents;});k = (function(q){var r;r = (new a(q));return {GetEnumerator: (function(s){return (function(t,s){var u;return t.factory(u);})(r, s);})};});l = (function(q){return h((function(r){return (function(s){return (r + 1);});}), 0, q);});m = (function(q){return n((function(r){if ((r.Tag == 0.000000)) {return {Tag: 0.000000};}else{var s = c(r);return {Tag: 1.000000, Value: (new o(s, {Tag: 0.000000}))};};}), {Tag: 1.000000, Value: q});});n = (function(q,r){return k((function(s){var t;t = (new p(r, q));return {get_Current: (function(u){return (function(v,u){return v.current;})(t, u);}), MoveNext: (function(u){return (function(v,u){var w = (function(x){var y = b(v.acc);var z = v.unfold(y);if ((z.Tag == 1.000000)) {var A = d(z).Items[0.000000];var B = d(z).Items[1.000000];v.acc = {Tag: 1.000000, Value: B};v.current = A;return true;}else{v.acc = {Tag: 0.000000};v.current = null;return false;};});return (e(v.acc) && (function(){var x;return w(x);})());})(t, u);}), Reset: (function(u){return (function(v,u){v.acc = {Tag: 1.000000, Value: v.seed};v.current = null;})(t, u);}), Dispose: (function(u){return (function(v,u){;})(t, u);})};}));});o = (function(Item0,Item1){var s = this;s.Items = [Item0, Item1];});p = (function(q,r){var s = this;{};s.seed = q;s.unfold = r;s.acc = {Tag: 1.000000, Value: s.seed};s.current = null;});var q = f((function(r){return m(1);}));return l(q) | |
***** FunScript.Tests.Seqs.Seq.append works | |
// Code: | |
var E, D, C, B, A, z, y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(F){var G = this;{};G.factory = F;});b = (function(F){return (new c(null, F));});c = (function(F,G){var H = this;{};H.factory = G;H.isCreated = false;H.value_24 = F;});d = (function(F,G){if ((!F.isCreated)) {var H;F.value_24 = F.factory(H);F.isCreated = true;}else{;};return F.value_24;});e = (function(F,G){return (new D(F, G));});f = (function(){return (new E());});g = (function(F){if ((F.Tag == 1.000000)) {var G = F.Item2;var H = F.Item1;return H;}else{throw ("List was empty");return null;};});h = (function(F){if ((F.Tag == 1.000000)) {var G = F.Item2;var H = F.Item1;return G;}else{throw ("List was empty");return null;};});i = (function(F){return F.Value;;});j = (function(F){return F.Value;;});k = (function(F){return F.Value;;});l = (function(F){return F.Value;;});m = (function(F){return ((F.Tag == 1.000000) && true);});n = (function(F){return ((F.Tag == 1.000000) && true);});o = (function(F,G){return p((function(H){var I = (new A(b((function(J){return q(F);})), b((function(J){return q(G);}))));return w((function(J){var K = J.Items[1.000000];var L = J;var M = J.Items[0.000000];if (d(M).MoveNext()) {var N = J.Items[1.000000];var O = J;var P = J.Items[0.000000];return {Tag: 1.000000, Value: (new z(d(P).get_Current(), O))};}else{var Q = J.Items[1.000000];var R = J.Items[0.000000];if (d(Q).MoveNext()) {var S = J.Items[1.000000];var T = J.Items[0.000000];return {Tag: 1.000000, Value: (new z(d(S).get_Current(), (new A(S, T))))};}else{return {Tag: 0.000000};};};}), I);}));});p = (function(F){return r((function(G){var H;return q(F(H));}));});q = (function(F){return F.GetEnumerator();});r = (function(F){var G;G = (new a(F));return {GetEnumerator: (function(H){return (function(I,H){var J;return I.factory(J);})(G, H);})};});s = (function(F){var G = q(F);if (G.MoveNext()) {return G.get_Current();}else{throw ("Seq was empty");return null;};});t = (function(F){return v((function(G){if ((G.Tag == 1.000000)) {var H = h(G);var I = g(G);return {Tag: 1.000000, Value: (new y(I, H))};}else{return {Tag: 0.000000};};}), F);});u = (function(F,G){return r((function(H){var I = q(G);for (var J = 1; J <= F; J++){(function(K){var L = I.MoveNext();})(J);};return I;}));});v = (function(F,G){return r((function(H){var I;I = (new B(G, F));return {get_Current: (function(J){return (function(K,J){return K.current;})(I, J);}), MoveNext: (function(J){return (function(K,J){var L = (function(M){var N = i(K.acc);var O = K.unfold(N);if ((O.Tag == 1.000000)) {var P = j(O).Items[0.000000];var Q = j(O).Items[1.000000];K.acc = {Tag: 1.000000, Value: Q};K.current = P;return true;}else{K.acc = {Tag: 0.000000};K.current = null;return false;};});return (m(K.acc) && (function(){var M;return L(M);})());})(I, J);}), Reset: (function(J){return (function(K,J){K.acc = {Tag: 1.000000, Value: K.seed};K.current = null;})(I, J);}), Dispose: (function(J){return (function(K,J){;})(I, J);})};}));});w = (function(F,G){return r((function(H){var I;I = (new C(G, F));return {get_Current: (function(J){return (function(K,J){return K.current;})(I, J);}), MoveNext: (function(J){return (function(K,J){var L = (function(M){var N = l(K.acc);var O = K.unfold(N);if ((O.Tag == 1.000000)) {var P = k(O).Items[0.000000];var Q = k(O).Items[1.000000];K.acc = {Tag: 1.000000, Value: Q};K.current = P;return true;}else{K.acc = {Tag: 0.000000};K.current = null;return false;};});return (n(K.acc) && (function(){var M;return L(M);})());})(I, J);}), Reset: (function(J){return (function(K,J){K.acc = {Tag: 1.000000, Value: K.seed};K.current = null;})(I, J);}), Dispose: (function(J){return (function(K,J){;})(I, J);})};}));});x = (function(F){var G = s(F);var H = s(u(1, F));return (G + H);});y = (function(Item0,Item1){var H = this;H.Items = [Item0, Item1];});z = (function(Item0,Item1){var H = this;H.Items = [Item0, Item1];});A = (function(Item0,Item1){var H = this;H.Items = [Item0, Item1];});B = (function(F,G){var H = this;{};H.seed = F;H.unfold = G;H.acc = {Tag: 1.000000, Value: H.seed};H.current = null;});C = (function(F,G){var H = this;{};H.seed = F;H.unfold = G;H.acc = {Tag: 1.000000, Value: H.seed};H.current = null;});D = (function(Item1,Item2){var H = this;H.Tag = 1.000000;H._CaseName = "Cons";H.Item1 = Item1;H.Item2 = Item2;});E = (function(){var F = this;F.Tag = 0.000000;F._CaseName = "Nil";});var F = e(1.000000, e(2.000000, e(3.000000, e(4.000000, f()))));var G = e(0.000000, f());var H = o(t(G), t(F));return x(H) | |
***** FunScript.Tests.Seqs.Seq.average works | |
// Code: | |
var v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(w){var x = this;{};x.factory = w;});b = (function(w,x){return (new u(w, x));});c = (function(){return (new v());});d = (function(w){if ((w.Tag == 1.000000)) {var x = w.Item2;var y = w.Item1;return y;}else{throw ("List was empty");return null;};});e = (function(w){if ((w.Tag == 1.000000)) {var x = w.Item2;var y = w.Item1;return x;}else{throw ("List was empty");return null;};});f = (function(w){return w.Value;;});g = (function(w){return w.Value;;});h = (function(w){return ((w.Tag == 1.000000) && true);});i = (function(w){var x = p(w);var y = q((function(z){return 1;}), w);return (x / y);});j = (function(w){return w.GetEnumerator();});k = (function(w,x,y){return l((function(z){return (function(A){return (function(B){return w(A)(B);});});}), x, y);});l = (function(w,x,y){return m(w, x, j(y));});m = (function(w,x,y){var z = {contents: 0};var A = {contents: x};while (y.MoveNext()){A.contents = w(z.contents)(A.contents)(y.get_Current());null;z.contents = (z.contents + 1);null;};return A.contents;});n = (function(w){var x;x = (new a(w));return {GetEnumerator: (function(y){return (function(z,y){var A;return z.factory(A);})(x, y);})};});o = (function(w){return r((function(x){if ((x.Tag == 1.000000)) {var y = e(x);var z = d(x);return {Tag: 1.000000, Value: (new s(z, y))};}else{return {Tag: 0.000000};};}), w);});p = (function(w){return k((function(x){return (function(y){return (x + y);});}), 0, w);});q = (function(w,x){return k((function(y){return (function(z){return (y + w(z));});}), 0, x);});r = (function(w,x){return n((function(y){var z;z = (new t(x, w));return {get_Current: (function(A){return (function(B,A){return B.current;})(z, A);}), MoveNext: (function(A){return (function(B,A){var C = (function(D){var E = f(B.acc);var F = B.unfold(E);if ((F.Tag == 1.000000)) {var G = g(F).Items[0.000000];var H = g(F).Items[1.000000];B.acc = {Tag: 1.000000, Value: H};B.current = G;return true;}else{B.acc = {Tag: 0.000000};B.current = null;return false;};});return (h(B.acc) && (function(){var D;return C(D);})());})(z, A);}), Reset: (function(A){return (function(B,A){B.acc = {Tag: 1.000000, Value: B.seed};B.current = null;})(z, A);}), Dispose: (function(A){return (function(B,A){;})(z, A);})};}));});s = (function(Item0,Item1){var y = this;y.Items = [Item0, Item1];});t = (function(w,x){var y = this;{};y.seed = w;y.unfold = x;y.acc = {Tag: 1.000000, Value: y.seed};y.current = null;});u = (function(Item1,Item2){var y = this;y.Tag = 1.000000;y._CaseName = "Cons";y.Item1 = Item1;y.Item2 = Item2;});v = (function(){var w = this;w.Tag = 0.000000;w._CaseName = "Nil";});var w = b(1.000000, b(2.000000, b(3.000000, b(4.000000, c()))));return i(o(w)) | |
***** FunScript.Tests.Seqs.Seq.averageBy works | |
// Code: | |
var u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(v){var w = this;{};w.factory = v;});b = (function(v,w){return (new t(v, w));});c = (function(){return (new u());});d = (function(v){if ((v.Tag == 1.000000)) {var w = v.Item2;var x = v.Item1;return x;}else{throw ("List was empty");return null;};});e = (function(v){if ((v.Tag == 1.000000)) {var w = v.Item2;var x = v.Item1;return w;}else{throw ("List was empty");return null;};});f = (function(v){return v.Value;;});g = (function(v){return v.Value;;});h = (function(v){return ((v.Tag == 1.000000) && true);});i = (function(v,w){var x = p(v, w);var y = p((function(z){return 1;}), w);return (x / y);});j = (function(v){return v.GetEnumerator();});k = (function(v,w,x){return l((function(y){return (function(z){return (function(A){return v(z)(A);});});}), w, x);});l = (function(v,w,x){return m(v, w, j(x));});m = (function(v,w,x){var y = {contents: 0};var z = {contents: w};while (x.MoveNext()){z.contents = v(y.contents)(z.contents)(x.get_Current());null;y.contents = (y.contents + 1);null;};return z.contents;});n = (function(v){var w;w = (new a(v));return {GetEnumerator: (function(x){return (function(y,x){var z;return y.factory(z);})(w, x);})};});o = (function(v){return q((function(w){if ((w.Tag == 1.000000)) {var x = e(w);var y = d(w);return {Tag: 1.000000, Value: (new r(y, x))};}else{return {Tag: 0.000000};};}), v);});p = (function(v,w){return k((function(x){return (function(y){return (x + v(y));});}), 0, w);});q = (function(v,w){return n((function(x){var y;y = (new s(w, v));return {get_Current: (function(z){return (function(A,z){return A.current;})(y, z);}), MoveNext: (function(z){return (function(A,z){var B = (function(C){var D = f(A.acc);var E = A.unfold(D);if ((E.Tag == 1.000000)) {var F = g(E).Items[0.000000];var G = g(E).Items[1.000000];A.acc = {Tag: 1.000000, Value: G};A.current = F;return true;}else{A.acc = {Tag: 0.000000};A.current = null;return false;};});return (h(A.acc) && (function(){var C;return B(C);})());})(y, z);}), Reset: (function(z){return (function(A,z){A.acc = {Tag: 1.000000, Value: A.seed};A.current = null;})(y, z);}), Dispose: (function(z){return (function(A,z){;})(y, z);})};}));});r = (function(Item0,Item1){var x = this;x.Items = [Item0, Item1];});s = (function(v,w){var x = this;{};x.seed = v;x.unfold = w;x.acc = {Tag: 1.000000, Value: x.seed};x.current = null;});t = (function(Item1,Item2){var x = this;x.Tag = 1.000000;x._CaseName = "Cons";x.Item1 = Item1;x.Item2 = Item2;});u = (function(){var v = this;v.Tag = 0.000000;v._CaseName = "Nil";});var v = b(1.000000, b(2.000000, b(3.000000, b(4.000000, c()))));var w = 2.000000;return i((function(x){return (w * x);}), o(v)) | |
***** FunScript.Tests.Seqs.Seq.cast works | |
// Code: | |
var r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(s){var t = this;{};t.factory = s;});b = (function(s,t){return (new q(s, t));});c = (function(){return (new r());});d = (function(s){if ((s.Tag == 1.000000)) {var t = s.Item2;var u = s.Item1;return u;}else{throw ("List was empty");return null;};});e = (function(s){if ((s.Tag == 1.000000)) {var t = s.Item2;var u = s.Item1;return t;}else{throw ("List was empty");return null;};});f = (function(s){return s.Value;;});g = (function(s){return s.Value;;});h = (function(s){return ((s.Tag == 1.000000) && true);});i = (function(s){return s;});j = (function(s){return s.GetEnumerator();});k = (function(s){var t;t = (new a(s));return {GetEnumerator: (function(u){return (function(v,u){var w;return v.factory(w);})(t, u);})};});l = (function(s){var t = j(s);if (t.MoveNext()) {return t.get_Current();}else{throw ("Seq was empty");return null;};});m = (function(s){return n((function(t){if ((t.Tag == 1.000000)) {var u = e(t);var v = d(t);return {Tag: 1.000000, Value: (new o(v, u))};}else{return {Tag: 0.000000};};}), s);});n = (function(s,t){return k((function(u){var v;v = (new p(t, s));return {get_Current: (function(w){return (function(x,w){return x.current;})(v, w);}), MoveNext: (function(w){return (function(x,w){var y = (function(z){var A = f(x.acc);var B = x.unfold(A);if ((B.Tag == 1.000000)) {var C = g(B).Items[0.000000];var D = g(B).Items[1.000000];x.acc = {Tag: 1.000000, Value: D};x.current = C;return true;}else{x.acc = {Tag: 0.000000};x.current = null;return false;};});return (h(x.acc) && (function(){var z;return y(z);})());})(v, w);}), Reset: (function(w){return (function(x,w){x.acc = {Tag: 1.000000, Value: x.seed};x.current = null;})(v, w);}), Dispose: (function(w){return (function(x,w){;})(v, w);})};}));});o = (function(Item0,Item1){var u = this;u.Items = [Item0, Item1];});p = (function(s,t){var u = this;{};u.seed = s;u.unfold = t;u.acc = {Tag: 1.000000, Value: u.seed};u.current = null;});q = (function(Item1,Item2){var u = this;u.Tag = 1.000000;u._CaseName = "Cons";u.Item1 = Item1;u.Item2 = Item2;});r = (function(){var s = this;s.Tag = 0.000000;s._CaseName = "Nil";});var s = b(1, b(2, b(3, b(4, c()))));var t = i(m(s));return l(t) | |
***** FunScript.Tests.Seqs.Seq.choose works | |
// Code: | |
var B, A, z, y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(C){var D = this;{};D.factory = C;});b = (function(C,D){return (new A(C, D));});c = (function(){return (new B());});d = (function(C){if ((C.Tag == 1.000000)) {var D = C.Item2;var E = C.Item1;return E;}else{throw ("List was empty");return null;};});e = (function(C){if ((C.Tag == 1.000000)) {var D = C.Item2;var E = C.Item1;return D;}else{throw ("List was empty");return null;};});f = (function(C){return C.Value;;});g = (function(C){return C.Value;;});h = (function(C){return C.Value;;});i = (function(C){return C.Value;;});j = (function(C){return C.Value;;});k = (function(C){return ((C.Tag == 1.000000) && true);});l = (function(C){return ((C.Tag == 1.000000) && true);});m = (function(C,D){var E;E = (function(F){if (F.MoveNext()) {var G = C(F.get_Current());if ((G.Tag == 1.000000)) {var H = f(G);return {Tag: 1.000000, Value: (new x(H, F))};}else{return E(F);};}else{return {Tag: 0.000000};};});return n((function(F){return u(E, o(D));}));});n = (function(C){return p((function(D){var E;return o(C(E));}));});o = (function(C){return C.GetEnumerator();});p = (function(C){var D;D = (new a(C));return {GetEnumerator: (function(E){return (function(F,E){var G;return F.factory(G);})(D, E);})};});q = (function(C){var D = o(C);if (D.MoveNext()) {return D.get_Current();}else{throw ("Seq was empty");return null;};});r = (function(C){return t((function(D){if ((D.Tag == 1.000000)) {var E = e(D);var F = d(D);return {Tag: 1.000000, Value: (new w(F, E))};}else{return {Tag: 0.000000};};}), C);});s = (function(C,D){return p((function(E){var F = o(D);for (var G = 1; G <= C; G++){(function(H){var I = F.MoveNext();})(G);};return F;}));});t = (function(C,D){return p((function(E){var F;F = (new y(D, C));return {get_Current: (function(G){return (function(H,G){return H.current;})(F, G);}), MoveNext: (function(G){return (function(H,G){var I = (function(J){var K = g(H.acc);var L = H.unfold(K);if ((L.Tag == 1.000000)) {var M = i(L).Items[0.000000];var N = i(L).Items[1.000000];H.acc = {Tag: 1.000000, Value: N};H.current = M;return true;}else{H.acc = {Tag: 0.000000};H.current = null;return false;};});return (k(H.acc) && (function(){var J;return I(J);})());})(F, G);}), Reset: (function(G){return (function(H,G){H.acc = {Tag: 1.000000, Value: H.seed};H.current = null;})(F, G);}), Dispose: (function(G){return (function(H,G){;})(F, G);})};}));});u = (function(C,D){return p((function(E){var F;F = (new z(D, C));return {get_Current: (function(G){return (function(H,G){return H.current;})(F, G);}), MoveNext: (function(G){return (function(H,G){var I = (function(J){var K = h(H.acc);var L = H.unfold(K);if ((L.Tag == 1.000000)) {var M = j(L).Items[0.000000];var N = j(L).Items[1.000000];H.acc = {Tag: 1.000000, Value: N};H.current = M;return true;}else{H.acc = {Tag: 0.000000};H.current = null;return false;};});return (l(H.acc) && (function(){var J;return I(J);})());})(F, G);}), Reset: (function(G){return (function(H,G){H.acc = {Tag: 1.000000, Value: H.seed};H.current = null;})(F, G);}), Dispose: (function(G){return (function(H,G){;})(F, G);})};}));});v = (function(C){var D = q(C);var E = q(s(1, C));return (D + E);});w = (function(Item0,Item1){var E = this;E.Items = [Item0, Item1];});x = (function(Item0,Item1){var E = this;E.Items = [Item0, Item1];});y = (function(C,D){var E = this;{};E.seed = C;E.unfold = D;E.acc = {Tag: 1.000000, Value: E.seed};E.current = null;});z = (function(C,D){var E = this;{};E.seed = C;E.unfold = D;E.acc = {Tag: 1.000000, Value: E.seed};E.current = null;});A = (function(Item1,Item2){var E = this;E.Tag = 1.000000;E._CaseName = "Cons";E.Item1 = Item1;E.Item2 = Item2;});B = (function(){var C = this;C.Tag = 0.000000;C._CaseName = "Nil";});var C = b(1.000000, b(2.000000, b(3.000000, b(4.000000, c()))));var D = m((function(E){if ((E > 2.000000)) {return {Tag: 1.000000, Value: E};}else{return {Tag: 0.000000};};}), r(C));return v(D) | |
***** FunScript.Tests.Seqs.Seq.collect works | |
// Code: | |
var bb, ab, _, Z, Y, X, W, V, U, T, S, R, Q, P, O, N, M, L, K, J, I, H, G, F, E, D, C, B, A, z, y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(cb){var db = this;{};db.factory = cb;});b = (function(cb){var db = this;{};db.factory = cb;});c = (function(cb,db){return (new Z(cb, db));});d = (function(cb,db){return (new ab(cb, db));});e = (function(){return (new _());});f = (function(){return (new bb());});g = (function(cb){if ((cb.Tag == 1.000000)) {var db = cb.Item2;var eb = cb.Item1;return eb;}else{throw ("List was empty");return null;};});h = (function(cb){if ((cb.Tag == 1.000000)) {var db = cb.Item2;var eb = cb.Item1;return eb;}else{throw ("List was empty");return null;};});i = (function(cb){if ((cb.Tag == 1.000000)) {var db = cb.Item2;var eb = cb.Item1;return db;}else{throw ("List was empty");return null;};});j = (function(cb){if ((cb.Tag == 1.000000)) {var db = cb.Item2;var eb = cb.Item1;return db;}else{throw ("List was empty");return null;};});k = (function(cb){return cb.Value;;});l = (function(cb){return cb.Value;;});m = (function(cb){return cb.Value;;});n = (function(cb){return cb.Value;;});o = (function(cb){return cb.Value;;});p = (function(cb){return cb.Value;;});q = (function(cb){return cb.Value;;});r = (function(cb){return cb.Value;;});s = (function(cb){return cb.Value;;});t = (function(cb){return cb.Value;;});u = (function(cb){return ((cb.Tag == 1.000000) && true);});v = (function(cb){return ((cb.Tag == 1.000000) && true);});w = (function(cb){return ((cb.Tag == 1.000000) && true);});x = (function(cb){return ((cb.Tag == 1.000000) && true);});y = (function(cb,db){return z(H(cb, db));});z = (function(cb){return A((function(db){var eb = D(cb);var fb = (function(gb){var hb = {contents: gb};var ib = {contents: {Tag: 0.000000}};var jb = {contents: false};while ((!jb.contents)){var kb = hb.contents;if ((kb.Tag == 1.000000)) {var lb = o(kb);if (lb.MoveNext()) {ib.contents = {Tag: 1.000000, Value: lb.get_Current()};null;jb.contents = true;null;}else{hb.contents = {Tag: 0.000000};null;};}else{if (eb.MoveNext()) {hb.contents = {Tag: 1.000000, Value: C(I(eb.get_Current()))};null;}else{jb.contents = true;null;};};};var mb = (new U(hb.contents, ib.contents));if ((mb.Items[0.000000].Tag == 1.000000)) {if ((mb.Items[1.000000].Tag == 1.000000)) {var nb = o(mb.Items[0.000000]);var ob = k(mb.Items[1.000000]);return {Tag: 1.000000, Value: (new R(ob, {Tag: 1.000000, Value: nb}))};}else{return {Tag: 0.000000};};}else{return {Tag: 0.000000};};});return N((function(gb){return fb(gb);}), {Tag: 0.000000});}));});A = (function(cb){return E((function(db){var eb;return C(cb(eb));}));});B = (function(cb){return F((function(db){var eb;return D(cb(eb));}));});C = (function(cb){return cb.GetEnumerator();});D = (function(cb){return cb.GetEnumerator();});E = (function(cb){var db;db = (new a(cb));return {GetEnumerator: (function(eb){return (function(fb,eb){var gb;return fb.factory(gb);})(db, eb);})};});F = (function(cb){var db;db = (new b(cb));return {GetEnumerator: (function(eb){return (function(fb,eb){var gb;return fb.factory(gb);})(db, eb);})};});G = (function(cb){var db = C(cb);if (db.MoveNext()) {return db.get_Current();}else{throw ("Seq was empty");return null;};});H = (function(cb,db){return B((function(eb){return O((function(fb){if (fb.MoveNext()) {return {Tag: 1.000000, Value: (new T(cb(fb.get_Current()), fb))};}else{return {Tag: 0.000000};};}), D(db));}));});I = (function(cb){return L((function(db){if ((db.Tag == 1.000000)) {var eb = i(db);var fb = g(db);return {Tag: 1.000000, Value: (new Q(fb, eb))};}else{return {Tag: 0.000000};};}), cb);});J = (function(cb){return M((function(db){if ((db.Tag == 1.000000)) {var eb = j(db);var fb = h(db);return {Tag: 1.000000, Value: (new S(fb, eb))};}else{return {Tag: 0.000000};};}), cb);});K = (function(cb,db){return E((function(eb){var fb = C(db);for (var gb = 1; gb <= cb; gb++){(function(hb){var ib = fb.MoveNext();})(gb);};return fb;}));});L = (function(cb,db){return E((function(eb){var fb;fb = (new V(db, cb));return {get_Current: (function(gb){return (function(hb,gb){return hb.current;})(fb, gb);}), MoveNext: (function(gb){return (function(hb,gb){var ib = (function(jb){var kb = l(hb.acc);var lb = hb.unfold(kb);if ((lb.Tag == 1.000000)) {var mb = q(lb).Items[0.000000];var nb = q(lb).Items[1.000000];hb.acc = {Tag: 1.000000, Value: nb};hb.current = mb;return true;}else{hb.acc = {Tag: 0.000000};hb.current = null;return false;};});return (u(hb.acc) && (function(){var jb;return ib(jb);})());})(fb, gb);}), Reset: (function(gb){return (function(hb,gb){hb.acc = {Tag: 1.000000, Value: hb.seed};hb.current = null;})(fb, gb);}), Dispose: (function(gb){return (function(hb,gb){;})(fb, gb);})};}));});M = (function(cb,db){return F((function(eb){var fb;fb = (new W(db, cb));return {get_Current: (function(gb){return (function(hb,gb){return hb.current;})(fb, gb);}), MoveNext: (function(gb){return (function(hb,gb){var ib = (function(jb){var kb = m(hb.acc);var lb = hb.unfold(kb);if ((lb.Tag == 1.000000)) {var mb = s(lb).Items[0.000000];var nb = s(lb).Items[1.000000];hb.acc = {Tag: 1.000000, Value: nb};hb.current = mb;return true;}else{hb.acc = {Tag: 0.000000};hb.current = null;return false;};});return (v(hb.acc) && (function(){var jb;return ib(jb);})());})(fb, gb);}), Reset: (function(gb){return (function(hb,gb){hb.acc = {Tag: 1.000000, Value: hb.seed};hb.current = null;})(fb, gb);}), Dispose: (function(gb){return (function(hb,gb){;})(fb, gb);})};}));});N = (function(cb,db){return E((function(eb){var fb;fb = (new X(db, cb));return {get_Current: (function(gb){return (function(hb,gb){return hb.current;})(fb, gb);}), MoveNext: (function(gb){return (function(hb,gb){var ib = (function(jb){var kb = n(hb.acc);var lb = hb.unfold(kb);if ((lb.Tag == 1.000000)) {var mb = r(lb).Items[0.000000];var nb = r(lb).Items[1.000000];hb.acc = {Tag: 1.000000, Value: nb};hb.current = mb;return true;}else{hb.acc = {Tag: 0.000000};hb.current = null;return false;};});return (w(hb.acc) && (function(){var jb;return ib(jb);})());})(fb, gb);}), Reset: (function(gb){return (function(hb,gb){hb.acc = {Tag: 1.000000, Value: hb.seed};hb.current = null;})(fb, gb);}), Dispose: (function(gb){return (function(hb,gb){;})(fb, gb);})};}));});O = (function(cb,db){return F((function(eb){var fb;fb = (new Y(db, cb));return {get_Current: (function(gb){return (function(hb,gb){return hb.current;})(fb, gb);}), MoveNext: (function(gb){return (function(hb,gb){var ib = (function(jb){var kb = p(hb.acc);var lb = hb.unfold(kb);if ((lb.Tag == 1.000000)) {var mb = t(lb).Items[0.000000];var nb = t(lb).Items[1.000000];hb.acc = {Tag: 1.000000, Value: nb};hb.current = mb;return true;}else{hb.acc = {Tag: 0.000000};hb.current = null;return false;};});return (x(hb.acc) && (function(){var jb;return ib(jb);})());})(fb, gb);}), Reset: (function(gb){return (function(hb,gb){hb.acc = {Tag: 1.000000, Value: hb.seed};hb.current = null;})(fb, gb);}), Dispose: (function(gb){return (function(hb,gb){;})(fb, gb);})};}));});P = (function(cb){var db = G(cb);var eb = G(K(1, cb));return (db + eb);});Q = (function(Item0,Item1){var eb = this;eb.Items = [Item0, Item1];});R = (function(Item0,Item1){var eb = this;eb.Items = [Item0, Item1];});S = (function(Item0,Item1){var eb = this;eb.Items = [Item0, Item1];});T = (function(Item0,Item1){var eb = this;eb.Items = [Item0, Item1];});U = (function(Item0,Item1){var eb = this;eb.Items = [Item0, Item1];});V = (function(cb,db){var eb = this;{};eb.seed = cb;eb.unfold = db;eb.acc = {Tag: 1.000000, Value: eb.seed};eb.current = null;});W = (function(cb,db){var eb = this;{};eb.seed = cb;eb.unfold = db;eb.acc = {Tag: 1.000000, Value: eb.seed};eb.current = null;});X = (function(cb,db){var eb = this;{};eb.seed = cb;eb.unfold = db;eb.acc = {Tag: 1.000000, Value: eb.seed};eb.current = null;});Y = (function(cb,db){var eb = this;{};eb.seed = cb;eb.unfold = db;eb.acc = {Tag: 1.000000, Value: eb.seed};eb.current = null;});Z = (function(Item1,Item2){var eb = this;eb.Tag = 1.000000;eb._CaseName = "Cons";eb.Item1 = Item1;eb.Item2 = Item2;});_ = (function(){var cb = this;cb.Tag = 0.000000;cb._CaseName = "Nil";});ab = (function(Item1,Item2){var eb = this;eb.Tag = 1.000000;eb._CaseName = "Cons";eb.Item1 = Item1;eb.Item2 = Item2;});bb = (function(){var cb = this;cb.Tag = 0.000000;cb._CaseName = "Nil";});var cb = d(c(1.000000, e()), d(c(2.000000, e()), d(c(3.000000, e()), d(c(4.000000, e()), f()))));var db = y((function(eb){return eb;}), J(cb));return P(db) | |
***** FunScript.Tests.Seqs.Seq.compareWith works | |
// Code: | |
var G, F, E, D, C, B, A, z, y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(H){var I = this;{};I.factory = H;});b = (function(H,I){return (new F(H, I));});c = (function(){return (new G());});d = (function(H){if ((H.Tag == 1.000000)) {var I = H.Item2;var J = H.Item1;return J;}else{throw ("List was empty");return null;};});e = (function(H){if ((H.Tag == 1.000000)) {var I = H.Item2;var J = H.Item1;return I;}else{throw ("List was empty");return null;};});f = (function(H){return H.Value;;});g = (function(H){return H.Value;;});h = (function(H){return H.Value;;});i = (function(H){return H.Value;;});j = (function(H){return H.Value;;});k = (function(H){return ((H.Tag == 1.000000) && true);});l = (function(H){return ((H.Tag == 1.000000) && true);});m = (function(H,I,J){var K = w((function(L){return (L != 0);}), u((function(L){return (function(M){return H(L)(M);});}), I, J));if ((K.Tag == 0.000000)) {return (t(I) - t(J));}else{var L = g(K);return L;};});n = (function(H){return s((function(I){var J;return o(H(J));}));});o = (function(H){return H.GetEnumerator();});p = (function(H,I,J){return q((function(K){return (function(L){return (function(M){return H(L)(M);});});}), I, J);});q = (function(H,I,J){return r(H, I, o(J));});r = (function(H,I,J){var K = {contents: 0};var L = {contents: I};while (J.MoveNext()){L.contents = H(K.contents)(L.contents)(J.get_Current());null;K.contents = (K.contents + 1);null;};return L.contents;});s = (function(H){var I;I = (new a(H));return {GetEnumerator: (function(J){return (function(K,J){var L;return K.factory(L);})(I, J);})};});t = (function(H){return p((function(I){return (function(J){return (I + 1);});}), 0, H);});u = (function(H,I,J){return n((function(K){var L = o(I);var M = o(J);var N;return A((function(O){if ((L.MoveNext() && M.MoveNext())) {var P;return {Tag: 1.000000, Value: (new C(H(L.get_Current())(M.get_Current()), P))};}else{return {Tag: 0.000000};};}), N);}));});v = (function(H){return z((function(I){if ((I.Tag == 1.000000)) {var J = e(I);var K = d(I);return {Tag: 1.000000, Value: (new B(K, J))};}else{return {Tag: 0.000000};};}), H);});w = (function(H,I){return x((function(J){return (function(K){if (H(K)) {return {Tag: 1.000000, Value: K};}else{return {Tag: 0.000000};};});}), I);});x = (function(H,I){return y(H, 0, o(I));});y = (function(H,I,J){if (J.MoveNext()) {var K = H(I)(J.get_Current());if ((K.Tag == 0.000000)) {return y(H, (I + 1), J);}else{return K;};}else{return {Tag: 0.000000};};});z = (function(H,I){return s((function(J){var K;K = (new D(I, H));return {get_Current: (function(L){return (function(M,L){return M.current;})(K, L);}), MoveNext: (function(L){return (function(M,L){var N = (function(O){var P = f(M.acc);var Q = M.unfold(P);if ((Q.Tag == 1.000000)) {var R = h(Q).Items[0.000000];var S = h(Q).Items[1.000000];M.acc = {Tag: 1.000000, Value: S};M.current = R;return true;}else{M.acc = {Tag: 0.000000};M.current = null;return false;};});return (k(M.acc) && (function(){var O;return N(O);})());})(K, L);}), Reset: (function(L){return (function(M,L){M.acc = {Tag: 1.000000, Value: M.seed};M.current = null;})(K, L);}), Dispose: (function(L){return (function(M,L){;})(K, L);})};}));});A = (function(H,I){return s((function(J){var K;K = (new E(I, H));return {get_Current: (function(L){return (function(M,L){return M.current;})(K, L);}), MoveNext: (function(L){return (function(M,L){var N = (function(O){var P = j(M.acc);var Q = M.unfold(P);if ((Q.Tag == 1.000000)) {var R = i(Q).Items[0.000000];var S = i(Q).Items[1.000000];M.acc = {Tag: 1.000000, Value: S};M.current = R;return true;}else{M.acc = {Tag: 0.000000};M.current = null;return false;};});return (l(M.acc) && (function(){var O;return N(O);})());})(K, L);}), Reset: (function(L){return (function(M,L){M.acc = {Tag: 1.000000, Value: M.seed};M.current = null;})(K, L);}), Dispose: (function(L){return (function(M,L){;})(K, L);})};}));});B = (function(Item0,Item1){var J = this;J.Items = [Item0, Item1];});C = (function(Item0,Item1){var J = this;J.Items = [Item0, Item1];});D = (function(H,I){var J = this;{};J.seed = H;J.unfold = I;J.acc = {Tag: 1.000000, Value: J.seed};J.current = null;});E = (function(H,I){var J = this;{};J.seed = H;J.unfold = I;J.acc = {Tag: 1.000000, Value: J.seed};J.current = null;});F = (function(Item1,Item2){var J = this;J.Tag = 1.000000;J._CaseName = "Cons";J.Item1 = Item1;J.Item2 = Item2;});G = (function(){var H = this;H.Tag = 0.000000;H._CaseName = "Nil";});var H = b(1, b(2, b(3, b(4, c()))));var I = b(1, b(2, b(3, b(4, c()))));var J = m((function(K){return (function(L){return (K - L);});}), v(H), v(I));return J | |
***** FunScript.Tests.Seqs.Seq.concat works | |
// Code: | |
var T, S, R, Q, P, O, N, M, L, K, J, I, H, G, F, E, D, C, B, A, z, y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a;a = (function(U){var V = this;{};V.factory = U;});b = (function(U){var V = this;{};V.factory = U;});c = (function(U,V){return (new Q(U, V));});d = (function(U,V){return (new S(U, V));});e = (function(){return (new R());});f = (function(){return (new T());});g = (function(U){if ((U.Tag == 1.000000)) {var V = U.Item2;var W = U.Item1;return W;}else{throw ("List was empty");return null;};});h = (function(U){if ((U.Tag == 1.000000)) {var V = U.Item2;var W = U.Item1;return W;}else{throw ("List was empty");return null;};});i = (function(U){if ((U.Tag == 1.000000)) {var V = U.Item2;var W = U.Item1;return V;}else{throw ("List was empty");return null;};});j = (function(U){if ((U.Tag == 1.000000)) {var V = U.Item2;var W = U.Item1;return V;}else{throw ("List was empty");return null;};});k = (function(U){return U.Value;;});l = (function(U){return U.Value;;});m = (function(U){return U.Value;;});n = (function(U){return U.Value;;});o = (function(U){return U.Value;;});p = (function(U){return U.Value;;});q = (function(U){return U.Value;;});r = (function(U){return U.Value;;});s = (function(U){return ((U.Tag == 1.000000) && true);});t = (function(U){return ((U.Tag == 1.000000) && true);});u = (function(U){return ((U.Tag == 1.000000) && true);});v = (function(U){return w((function(V){var W = y(U);var X = (function(Y){var Z = {contents: Y};var _ = {contents: {Tag: 0.000000}};var ab = {contents: false};while ((!ab.contents)){var bb = Z.contents;if ((bb.Tag == 1.000000)) {var cb = o(bb);if (cb.MoveNext()) {_.contents = {Tag: 1.000000, Value: cb.get_Current()};null;ab.contents = true;null;}else{Z.contents = {Tag: 0.000000};null;};}else{if (W.MoveNext()) {Z.contents = {Tag: 1.000000, Value: x(C(W.get_Current()))};null;}else{ab.contents = true;null;};};};var db = (new M(Z.contents, _.contents));if ((db.Items[0.000000].Tag == 1.000000)) {if ((db.Items[1.000000].Tag == 1.000000)) {var eb = o(db.Items[0.000000]);var fb = k(db.Items[1.000000]);return {Tag: 1.000000, Value: (new K(fb, {Tag: 1.000000, Value: eb}))};}else{return {Tag: 0.000000};};}else{return {Tag: 0.000000};};});return H((function(Y){return X(Y);}), {Tag: 0.000000});}));});w = (function(U){return z((function(V){var W;return x(U(W));}));});x = (function(U){return U.GetEnumerator();});y = (function(U){return U.GetEnumerator();});z = (function(U){var V;V = (new a(U));return {GetEnumerator: (function(W){return (function(X,W){var Y;return X.factory(Y);})(V, W);})};});A = (function(U){var V;V = (new b(U));return {GetEnumerator: (function(W){return (function(X,W){var Y;return X.factory(Y);})(V, W);})};});B = (function(U){var V = x(U);if (V.MoveNext()) {return V.get_Current();}else{throw ("Seq was empty");return null;};});C = (function(U){return F((function(V){if ((V.Tag == 1.000000)) {var W = |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment