arctrl 3.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (511) hide show
  1. arctrl/__init__.py +23 -0
  2. arctrl/cwl.py +12 -0
  3. arctrl/py/CWL/__init__.py +0 -0
  4. arctrl/py/CWL/cwlprocessing_unit.py +221 -0
  5. arctrl/py/CWL/cwltypes.py +364 -0
  6. arctrl/py/CWL/decode.py +3532 -0
  7. arctrl/py/CWL/encode.py +1905 -0
  8. arctrl/py/CWL/expression_tool_description.py +192 -0
  9. arctrl/py/CWL/hash_helpers.py +60 -0
  10. arctrl/py/CWL/inputs.py +122 -0
  11. arctrl/py/CWL/operation_description.py +169 -0
  12. arctrl/py/CWL/outputs.py +171 -0
  13. arctrl/py/CWL/parameter_reference.py +74 -0
  14. arctrl/py/CWL/requirements.py +350 -0
  15. arctrl/py/CWL/tool_description.py +192 -0
  16. arctrl/py/CWL/workflow_description.py +181 -0
  17. arctrl/py/CWL/workflow_steps.py +354 -0
  18. arctrl/py/Contract/__init__.py +0 -0
  19. arctrl/py/Contract/arc.py +89 -0
  20. arctrl/py/Contract/arc_assay.py +125 -0
  21. arctrl/py/Contract/arc_investigation.py +88 -0
  22. arctrl/py/Contract/arc_run.py +291 -0
  23. arctrl/py/Contract/arc_study.py +126 -0
  24. arctrl/py/Contract/arc_workflow.py +213 -0
  25. arctrl/py/Contract/contract.py +153 -0
  26. arctrl/py/Contract/datamap.py +396 -0
  27. arctrl/py/Contract/git.py +116 -0
  28. arctrl/py/Contract/license.py +58 -0
  29. arctrl/py/Contract/validation_packages_config.py +107 -0
  30. arctrl/py/ContractIO/__init__.py +0 -0
  31. arctrl/py/ContractIO/contract_io.py +350 -0
  32. arctrl/py/ContractIO/file_system_helper.py +264 -0
  33. arctrl/py/Conversion/__init__.py +0 -0
  34. arctrl/py/Conversion/assay.py +151 -0
  35. arctrl/py/Conversion/basic.py +559 -0
  36. arctrl/py/Conversion/column_index.py +91 -0
  37. arctrl/py/Conversion/datamap.py +36 -0
  38. arctrl/py/Conversion/date_time.py +32 -0
  39. arctrl/py/Conversion/investigation.py +171 -0
  40. arctrl/py/Conversion/person.py +148 -0
  41. arctrl/py/Conversion/process.py +828 -0
  42. arctrl/py/Conversion/run.py +367 -0
  43. arctrl/py/Conversion/scholarly_article.py +163 -0
  44. arctrl/py/Conversion/study.py +99 -0
  45. arctrl/py/Conversion/table.py +229 -0
  46. arctrl/py/Conversion/workflow.py +680 -0
  47. arctrl/py/Core/Helper/__init__.py +0 -0
  48. arctrl/py/Core/Helper/collections_.py +512 -0
  49. arctrl/py/Core/Helper/date_time.py +26 -0
  50. arctrl/py/Core/Helper/hash_codes.py +60 -0
  51. arctrl/py/Core/Helper/identifier.py +290 -0
  52. arctrl/py/Core/Helper/orcid.py +42 -0
  53. arctrl/py/Core/Helper/printer.py +13 -0
  54. arctrl/py/Core/Helper/regex.py +554 -0
  55. arctrl/py/Core/Helper/sem_ver.py +71 -0
  56. arctrl/py/Core/Helper/url.py +148 -0
  57. arctrl/py/Core/Process/__init__.py +0 -0
  58. arctrl/py/Core/Process/column_index.py +280 -0
  59. arctrl/py/Core/Process/component.py +200 -0
  60. arctrl/py/Core/Process/factor.py +151 -0
  61. arctrl/py/Core/Process/factor_value.py +182 -0
  62. arctrl/py/Core/Process/material.py +74 -0
  63. arctrl/py/Core/Process/material_attribute.py +95 -0
  64. arctrl/py/Core/Process/material_attribute_value.py +184 -0
  65. arctrl/py/Core/Process/material_type.py +45 -0
  66. arctrl/py/Core/Process/process.py +477 -0
  67. arctrl/py/Core/Process/process_input.py +265 -0
  68. arctrl/py/Core/Process/process_output.py +235 -0
  69. arctrl/py/Core/Process/process_parameter_value.py +200 -0
  70. arctrl/py/Core/Process/process_sequence.py +435 -0
  71. arctrl/py/Core/Process/protocol.py +175 -0
  72. arctrl/py/Core/Process/protocol_parameter.py +98 -0
  73. arctrl/py/Core/Process/sample.py +82 -0
  74. arctrl/py/Core/Process/source.py +62 -0
  75. arctrl/py/Core/Table/__init__.py +0 -0
  76. arctrl/py/Core/Table/arc_table.py +1206 -0
  77. arctrl/py/Core/Table/arc_table_aux.py +1308 -0
  78. arctrl/py/Core/Table/arc_tables.py +574 -0
  79. arctrl/py/Core/Table/composite_cell.py +319 -0
  80. arctrl/py/Core/Table/composite_column.py +73 -0
  81. arctrl/py/Core/Table/composite_header.py +739 -0
  82. arctrl/py/Core/__init__.py +0 -0
  83. arctrl/py/Core/arc_types.py +5312 -0
  84. arctrl/py/Core/comment.py +128 -0
  85. arctrl/py/Core/comment_list.py +127 -0
  86. arctrl/py/Core/conversion.py +1375 -0
  87. arctrl/py/Core/data.py +247 -0
  88. arctrl/py/Core/data_context.py +157 -0
  89. arctrl/py/Core/data_file.py +112 -0
  90. arctrl/py/Core/datamap.py +217 -0
  91. arctrl/py/Core/identifier_setters.py +43 -0
  92. arctrl/py/Core/iproperty_value.py +36 -0
  93. arctrl/py/Core/ontology_annotation.py +298 -0
  94. arctrl/py/Core/ontology_source_reference.py +114 -0
  95. arctrl/py/Core/person.py +259 -0
  96. arctrl/py/Core/publication.py +161 -0
  97. arctrl/py/Core/template.py +231 -0
  98. arctrl/py/Core/templates.py +148 -0
  99. arctrl/py/Core/uri.py +11 -0
  100. arctrl/py/Core/value.py +188 -0
  101. arctrl/py/FileSystem/__init__.py +0 -0
  102. arctrl/py/FileSystem/commit.py +21 -0
  103. arctrl/py/FileSystem/default_gitattributes.py +1 -0
  104. arctrl/py/FileSystem/default_gitignore.py +1 -0
  105. arctrl/py/FileSystem/default_license.py +1 -0
  106. arctrl/py/FileSystem/file_system.py +58 -0
  107. arctrl/py/FileSystem/file_system_tree.py +483 -0
  108. arctrl/py/FileSystem/path.py +266 -0
  109. arctrl/py/Json/Datamap/__init__.py +0 -0
  110. arctrl/py/Json/Datamap/data_context.py +101 -0
  111. arctrl/py/Json/Datamap/datamap.py +53 -0
  112. arctrl/py/Json/Process/__init__.py +0 -0
  113. arctrl/py/Json/Process/assay_materials.py +46 -0
  114. arctrl/py/Json/Process/component.py +125 -0
  115. arctrl/py/Json/Process/factor.py +107 -0
  116. arctrl/py/Json/Process/factor_value.py +101 -0
  117. arctrl/py/Json/Process/material.py +226 -0
  118. arctrl/py/Json/Process/material_attribute.py +79 -0
  119. arctrl/py/Json/Process/material_attribute_value.py +101 -0
  120. arctrl/py/Json/Process/material_type.py +53 -0
  121. arctrl/py/Json/Process/process.py +296 -0
  122. arctrl/py/Json/Process/process_input.py +83 -0
  123. arctrl/py/Json/Process/process_output.py +67 -0
  124. arctrl/py/Json/Process/process_parameter_value.py +81 -0
  125. arctrl/py/Json/Process/protocol.py +354 -0
  126. arctrl/py/Json/Process/protocol_parameter.py +91 -0
  127. arctrl/py/Json/Process/sample.py +277 -0
  128. arctrl/py/Json/Process/source.py +214 -0
  129. arctrl/py/Json/Process/study_materials.py +52 -0
  130. arctrl/py/Json/Process/value.py +56 -0
  131. arctrl/py/Json/ROCrate/__init__.py +0 -0
  132. arctrl/py/Json/ROCrate/ldcontext.py +143 -0
  133. arctrl/py/Json/ROCrate/ldgraph.py +117 -0
  134. arctrl/py/Json/ROCrate/ldnode.py +304 -0
  135. arctrl/py/Json/ROCrate/ldref.py +44 -0
  136. arctrl/py/Json/ROCrate/ldvalue.py +102 -0
  137. arctrl/py/Json/Table/__init__.py +0 -0
  138. arctrl/py/Json/Table/arc_table.py +375 -0
  139. arctrl/py/Json/Table/cell_table.py +83 -0
  140. arctrl/py/Json/Table/composite_cell.py +136 -0
  141. arctrl/py/Json/Table/composite_header.py +67 -0
  142. arctrl/py/Json/Table/iotype.py +24 -0
  143. arctrl/py/Json/Table/oatable.py +82 -0
  144. arctrl/py/Json/Table/templates.py +281 -0
  145. arctrl/py/Json/__init__.py +0 -0
  146. arctrl/py/Json/assay.py +600 -0
  147. arctrl/py/Json/comment.py +206 -0
  148. arctrl/py/Json/context/rocrate/__init__.py +0 -0
  149. arctrl/py/Json/context/rocrate/isa_assay_context.py +101 -0
  150. arctrl/py/Json/context/rocrate/isa_comment_context.py +60 -0
  151. arctrl/py/Json/context/rocrate/isa_component_context.py +77 -0
  152. arctrl/py/Json/context/rocrate/isa_data_context.py +74 -0
  153. arctrl/py/Json/context/rocrate/isa_factor_context.py +74 -0
  154. arctrl/py/Json/context/rocrate/isa_factor_value_context.py +84 -0
  155. arctrl/py/Json/context/rocrate/isa_investigation_context.py +110 -0
  156. arctrl/py/Json/context/rocrate/isa_material_attribute_context.py +64 -0
  157. arctrl/py/Json/context/rocrate/isa_material_attribute_value_context.py +80 -0
  158. arctrl/py/Json/context/rocrate/isa_material_context.py +71 -0
  159. arctrl/py/Json/context/rocrate/isa_ontology_annotation_context.py +68 -0
  160. arctrl/py/Json/context/rocrate/isa_ontology_source_reference_context.py +75 -0
  161. arctrl/py/Json/context/rocrate/isa_organization_context.py +55 -0
  162. arctrl/py/Json/context/rocrate/isa_person_context.py +131 -0
  163. arctrl/py/Json/context/rocrate/isa_process_context.py +94 -0
  164. arctrl/py/Json/context/rocrate/isa_process_parameter_value_context.py +80 -0
  165. arctrl/py/Json/context/rocrate/isa_protocol_context.py +97 -0
  166. arctrl/py/Json/context/rocrate/isa_protocol_parameter_context.py +64 -0
  167. arctrl/py/Json/context/rocrate/isa_publication_context.py +78 -0
  168. arctrl/py/Json/context/rocrate/isa_sample_context.py +65 -0
  169. arctrl/py/Json/context/rocrate/isa_source_context.py +66 -0
  170. arctrl/py/Json/context/rocrate/isa_study_context.py +125 -0
  171. arctrl/py/Json/context/rocrate/property_value_context.py +73 -0
  172. arctrl/py/Json/context/rocrate/rocrate_context.py +81 -0
  173. arctrl/py/Json/converter_options.py +23 -0
  174. arctrl/py/Json/data.py +356 -0
  175. arctrl/py/Json/data_file.py +63 -0
  176. arctrl/py/Json/decode.py +271 -0
  177. arctrl/py/Json/encode.py +140 -0
  178. arctrl/py/Json/idtable.py +44 -0
  179. arctrl/py/Json/investigation.py +695 -0
  180. arctrl/py/Json/ontology_annotation.py +404 -0
  181. arctrl/py/Json/ontology_source_reference.py +255 -0
  182. arctrl/py/Json/person.py +658 -0
  183. arctrl/py/Json/property_value.py +359 -0
  184. arctrl/py/Json/publication.py +279 -0
  185. arctrl/py/Json/run.py +275 -0
  186. arctrl/py/Json/string_table.py +87 -0
  187. arctrl/py/Json/study.py +793 -0
  188. arctrl/py/Json/workflow.py +307 -0
  189. arctrl/py/JsonIO/Process/__init__.py +0 -0
  190. arctrl/py/JsonIO/Process/component.py +60 -0
  191. arctrl/py/JsonIO/Process/factor.py +36 -0
  192. arctrl/py/JsonIO/Process/factor_value.py +38 -0
  193. arctrl/py/JsonIO/Process/material.py +60 -0
  194. arctrl/py/JsonIO/Process/material_attribute.py +38 -0
  195. arctrl/py/JsonIO/Process/material_attribute_value.py +60 -0
  196. arctrl/py/JsonIO/Process/material_type.py +36 -0
  197. arctrl/py/JsonIO/Process/process.py +60 -0
  198. arctrl/py/JsonIO/Process/process_input.py +38 -0
  199. arctrl/py/JsonIO/Process/process_output.py +60 -0
  200. arctrl/py/JsonIO/Process/process_parameter_value.py +60 -0
  201. arctrl/py/JsonIO/Process/process_sequence.py +71 -0
  202. arctrl/py/JsonIO/Process/protocol.py +60 -0
  203. arctrl/py/JsonIO/Process/protocol_parameter.py +36 -0
  204. arctrl/py/JsonIO/Process/sample.py +60 -0
  205. arctrl/py/JsonIO/Process/source.py +60 -0
  206. arctrl/py/JsonIO/Process/study_materials.py +52 -0
  207. arctrl/py/JsonIO/Process/value.py +32 -0
  208. arctrl/py/JsonIO/Table/__init__.py +0 -0
  209. arctrl/py/JsonIO/Table/arc_table.py +103 -0
  210. arctrl/py/JsonIO/Table/composite_cell.py +36 -0
  211. arctrl/py/JsonIO/Table/composite_header.py +36 -0
  212. arctrl/py/JsonIO/Table/compression.py +67 -0
  213. arctrl/py/JsonIO/Table/iotype.py +36 -0
  214. arctrl/py/JsonIO/Table/templates.py +113 -0
  215. arctrl/py/JsonIO/__init__.py +0 -0
  216. arctrl/py/JsonIO/assay.py +113 -0
  217. arctrl/py/JsonIO/comment.py +80 -0
  218. arctrl/py/JsonIO/data.py +60 -0
  219. arctrl/py/JsonIO/data_file.py +58 -0
  220. arctrl/py/JsonIO/datamap.py +36 -0
  221. arctrl/py/JsonIO/decode.py +9 -0
  222. arctrl/py/JsonIO/encode.py +1 -0
  223. arctrl/py/JsonIO/investigation.py +91 -0
  224. arctrl/py/JsonIO/ldobject.py +106 -0
  225. arctrl/py/JsonIO/ontology_annotation.py +80 -0
  226. arctrl/py/JsonIO/ontology_source_reference.py +80 -0
  227. arctrl/py/JsonIO/person.py +82 -0
  228. arctrl/py/JsonIO/publication.py +82 -0
  229. arctrl/py/JsonIO/run.py +68 -0
  230. arctrl/py/JsonIO/study.py +114 -0
  231. arctrl/py/JsonIO/workflow.py +68 -0
  232. arctrl/py/ROCrate/ISAProfile/__init__.py +0 -0
  233. arctrl/py/ROCrate/ISAProfile/assay.py +70 -0
  234. arctrl/py/ROCrate/ISAProfile/data.py +65 -0
  235. arctrl/py/ROCrate/ISAProfile/dataset.py +24 -0
  236. arctrl/py/ROCrate/ISAProfile/investigation.py +73 -0
  237. arctrl/py/ROCrate/ISAProfile/lab_process.py +162 -0
  238. arctrl/py/ROCrate/ISAProfile/lab_protocol.py +37 -0
  239. arctrl/py/ROCrate/ISAProfile/person.py +72 -0
  240. arctrl/py/ROCrate/ISAProfile/property_value.py +98 -0
  241. arctrl/py/ROCrate/ISAProfile/sample.py +64 -0
  242. arctrl/py/ROCrate/ISAProfile/scholarly_article.py +98 -0
  243. arctrl/py/ROCrate/ISAProfile/study.py +74 -0
  244. arctrl/py/ROCrate/LDTypes/__init__.py +0 -0
  245. arctrl/py/ROCrate/LDTypes/comment.py +131 -0
  246. arctrl/py/ROCrate/LDTypes/computational_workflow.py +455 -0
  247. arctrl/py/ROCrate/LDTypes/computer_language.py +269 -0
  248. arctrl/py/ROCrate/LDTypes/create_action.py +303 -0
  249. arctrl/py/ROCrate/LDTypes/creative_work.py +566 -0
  250. arctrl/py/ROCrate/LDTypes/dataset.py +943 -0
  251. arctrl/py/ROCrate/LDTypes/defined_term.py +131 -0
  252. arctrl/py/ROCrate/LDTypes/file.py +281 -0
  253. arctrl/py/ROCrate/LDTypes/formal_parameter.py +431 -0
  254. arctrl/py/ROCrate/LDTypes/lab_process.py +352 -0
  255. arctrl/py/ROCrate/LDTypes/lab_protocol.py +395 -0
  256. arctrl/py/ROCrate/LDTypes/organization.py +83 -0
  257. arctrl/py/ROCrate/LDTypes/person.py +484 -0
  258. arctrl/py/ROCrate/LDTypes/postal_address.py +195 -0
  259. arctrl/py/ROCrate/LDTypes/property_value.py +952 -0
  260. arctrl/py/ROCrate/LDTypes/sample.py +202 -0
  261. arctrl/py/ROCrate/LDTypes/scholarly_article.py +229 -0
  262. arctrl/py/ROCrate/LDTypes/software_source_code.py +310 -0
  263. arctrl/py/ROCrate/LDTypes/workflow_invocation.py +48 -0
  264. arctrl/py/ROCrate/LDTypes/workflow_protocol.py +52 -0
  265. arctrl/py/ROCrate/__init__.py +0 -0
  266. arctrl/py/ROCrate/arc_rocrate_metadata.py +39 -0
  267. arctrl/py/ROCrate/dyn_obj_extensions.py +1 -0
  268. arctrl/py/ROCrate/helper.py +8 -0
  269. arctrl/py/ROCrate/ldcontext.py +406 -0
  270. arctrl/py/ROCrate/ldobject.py +1247 -0
  271. arctrl/py/ROCrate/rocrate_context.py +51 -0
  272. arctrl/py/Spreadsheet/AnnotationTable/__init__.py +0 -0
  273. arctrl/py/Spreadsheet/AnnotationTable/arc_table.py +203 -0
  274. arctrl/py/Spreadsheet/AnnotationTable/composite_cell.py +78 -0
  275. arctrl/py/Spreadsheet/AnnotationTable/composite_column.py +305 -0
  276. arctrl/py/Spreadsheet/AnnotationTable/composite_header.py +623 -0
  277. arctrl/py/Spreadsheet/DatamapTable/__init__.py +0 -0
  278. arctrl/py/Spreadsheet/DatamapTable/datamap_column.py +114 -0
  279. arctrl/py/Spreadsheet/DatamapTable/datamap_header.py +621 -0
  280. arctrl/py/Spreadsheet/DatamapTable/datamap_table.py +118 -0
  281. arctrl/py/Spreadsheet/Metadata/__init__.py +0 -0
  282. arctrl/py/Spreadsheet/Metadata/assays.py +125 -0
  283. arctrl/py/Spreadsheet/Metadata/comment.py +77 -0
  284. arctrl/py/Spreadsheet/Metadata/contacts.py +134 -0
  285. arctrl/py/Spreadsheet/Metadata/conversions.py +190 -0
  286. arctrl/py/Spreadsheet/Metadata/design_descriptors.py +34 -0
  287. arctrl/py/Spreadsheet/Metadata/factors.py +107 -0
  288. arctrl/py/Spreadsheet/Metadata/ontology_annotation.py +88 -0
  289. arctrl/py/Spreadsheet/Metadata/ontology_source_reference.py +96 -0
  290. arctrl/py/Spreadsheet/Metadata/protocols.py +146 -0
  291. arctrl/py/Spreadsheet/Metadata/publication.py +122 -0
  292. arctrl/py/Spreadsheet/Metadata/run.py +122 -0
  293. arctrl/py/Spreadsheet/Metadata/sparse_table.py +499 -0
  294. arctrl/py/Spreadsheet/Metadata/study.py +312 -0
  295. arctrl/py/Spreadsheet/Metadata/workflow.py +159 -0
  296. arctrl/py/Spreadsheet/__init__.py +0 -0
  297. arctrl/py/Spreadsheet/arc_assay.py +233 -0
  298. arctrl/py/Spreadsheet/arc_investigation.py +435 -0
  299. arctrl/py/Spreadsheet/arc_run.py +190 -0
  300. arctrl/py/Spreadsheet/arc_study.py +144 -0
  301. arctrl/py/Spreadsheet/arc_workflow.py +177 -0
  302. arctrl/py/Spreadsheet/assembly_info.py +1 -0
  303. arctrl/py/Spreadsheet/collection_aux.py +167 -0
  304. arctrl/py/Spreadsheet/datamap.py +43 -0
  305. arctrl/py/Spreadsheet/template.py +460 -0
  306. arctrl/py/ValidationPackages/__init__.py +0 -0
  307. arctrl/py/ValidationPackages/validation_package.py +82 -0
  308. arctrl/py/ValidationPackages/validation_packages_config.py +132 -0
  309. arctrl/py/WebRequest/__init__.py +0 -0
  310. arctrl/py/WebRequest/web_request.py +9 -0
  311. arctrl/py/WebRequest/web_request_py.py +135 -0
  312. arctrl/py/WorkflowGraph/__init__.py +0 -0
  313. arctrl/py/WorkflowGraph/adapters.py +141 -0
  314. arctrl/py/WorkflowGraph/build_options.py +45 -0
  315. arctrl/py/WorkflowGraph/builder.py +720 -0
  316. arctrl/py/WorkflowGraph/graph_types.py +260 -0
  317. arctrl/py/WorkflowGraph/query_helpers.py +76 -0
  318. arctrl/py/WorkflowGraph/reference_parsing.py +59 -0
  319. arctrl/py/WorkflowGraph/visualization_siren.py +574 -0
  320. arctrl/py/WorkflowGraph/workflow_graph.py +119 -0
  321. arctrl/py/Yaml/__init__.py +0 -0
  322. arctrl/py/Yaml/decode.py +1 -0
  323. arctrl/py/Yaml/encode.py +10 -0
  324. arctrl/py/Yaml/validation_package.py +77 -0
  325. arctrl/py/Yaml/validation_packages_config.py +86 -0
  326. arctrl/py/__init__.py +0 -0
  327. arctrl/py/arc.py +1891 -0
  328. arctrl/py/column_index.py +280 -0
  329. arctrl/py/conversion.py +142 -0
  330. arctrl/py/cross_async.py +76 -0
  331. arctrl/py/cwlrun_resolver.py +228 -0
  332. arctrl/py/fable_modules/dynamic_obj/__init__.py +0 -0
  333. arctrl/py/fable_modules/dynamic_obj/dyn_obj.py +136 -0
  334. arctrl/py/fable_modules/dynamic_obj/dynamic_obj.py +415 -0
  335. arctrl/py/fable_modules/dynamic_obj/fable_js.py +1 -0
  336. arctrl/py/fable_modules/dynamic_obj/fable_py.py +288 -0
  337. arctrl/py/fable_modules/dynamic_obj/hash_codes.py +82 -0
  338. arctrl/py/fable_modules/dynamic_obj/property_helper.py +25 -0
  339. arctrl/py/fable_modules/dynamic_obj/reflection_utils.py +87 -0
  340. arctrl/py/fable_modules/fable_library/__init__.py +0 -0
  341. arctrl/py/fable_modules/fable_library/array_.py +1528 -0
  342. arctrl/py/fable_modules/fable_library/async_.py +377 -0
  343. arctrl/py/fable_modules/fable_library/async_builder.py +379 -0
  344. arctrl/py/fable_modules/fable_library/big_int.py +330 -0
  345. arctrl/py/fable_modules/fable_library/bit_converter.py +131 -0
  346. arctrl/py/fable_modules/fable_library/boolean.py +26 -0
  347. arctrl/py/fable_modules/fable_library/char.py +237 -0
  348. arctrl/py/fable_modules/fable_library/choice.py +212 -0
  349. arctrl/py/fable_modules/fable_library/date.py +779 -0
  350. arctrl/py/fable_modules/fable_library/date_offset.py +79 -0
  351. arctrl/py/fable_modules/fable_library/decimal_.py +190 -0
  352. arctrl/py/fable_modules/fable_library/diagnostics.py +54 -0
  353. arctrl/py/fable_modules/fable_library/double.py +87 -0
  354. arctrl/py/fable_modules/fable_library/encoding.py +41 -0
  355. arctrl/py/fable_modules/fable_library/event.py +206 -0
  356. arctrl/py/fable_modules/fable_library/file.py +107 -0
  357. arctrl/py/fable_modules/fable_library/fsharp_collections.py +52 -0
  358. arctrl/py/fable_modules/fable_library/fsharp_core.py +123 -0
  359. arctrl/py/fable_modules/fable_library/global_.py +63 -0
  360. arctrl/py/fable_modules/fable_library/guid.py +41 -0
  361. arctrl/py/fable_modules/fable_library/int32.py +73 -0
  362. arctrl/py/fable_modules/fable_library/list.py +1788 -0
  363. arctrl/py/fable_modules/fable_library/long.py +240 -0
  364. arctrl/py/fable_modules/fable_library/mailbox_processor.py +179 -0
  365. arctrl/py/fable_modules/fable_library/map.py +1854 -0
  366. arctrl/py/fable_modules/fable_library/map_util.py +148 -0
  367. arctrl/py/fable_modules/fable_library/mutable_map.py +397 -0
  368. arctrl/py/fable_modules/fable_library/mutable_set.py +279 -0
  369. arctrl/py/fable_modules/fable_library/native.py +45 -0
  370. arctrl/py/fable_modules/fable_library/numeric.py +46 -0
  371. arctrl/py/fable_modules/fable_library/observable.py +222 -0
  372. arctrl/py/fable_modules/fable_library/option.py +128 -0
  373. arctrl/py/fable_modules/fable_library/path.py +62 -0
  374. arctrl/py/fable_modules/fable_library/range.py +117 -0
  375. arctrl/py/fable_modules/fable_library/reflection.py +463 -0
  376. arctrl/py/fable_modules/fable_library/reg_exp.py +137 -0
  377. arctrl/py/fable_modules/fable_library/resize_array.py +31 -0
  378. arctrl/py/fable_modules/fable_library/result.py +212 -0
  379. arctrl/py/fable_modules/fable_library/seq.py +1979 -0
  380. arctrl/py/fable_modules/fable_library/seq2.py +221 -0
  381. arctrl/py/fable_modules/fable_library/set.py +2414 -0
  382. arctrl/py/fable_modules/fable_library/singleton_local_time_zone.py +36 -0
  383. arctrl/py/fable_modules/fable_library/string_.py +573 -0
  384. arctrl/py/fable_modules/fable_library/system_collections_generic.py +462 -0
  385. arctrl/py/fable_modules/fable_library/system_text.py +237 -0
  386. arctrl/py/fable_modules/fable_library/task.py +116 -0
  387. arctrl/py/fable_modules/fable_library/task_builder.py +122 -0
  388. arctrl/py/fable_modules/fable_library/thread.py +5 -0
  389. arctrl/py/fable_modules/fable_library/time_span.py +283 -0
  390. arctrl/py/fable_modules/fable_library/timer.py +24 -0
  391. arctrl/py/fable_modules/fable_library/types.py +401 -0
  392. arctrl/py/fable_modules/fable_library/uri.py +109 -0
  393. arctrl/py/fable_modules/fable_library/util.py +2735 -0
  394. arctrl/py/fable_modules/fable_openpyxl/__init__.py +0 -0
  395. arctrl/py/fable_modules/fable_openpyxl/openpyxl.py +362 -0
  396. arctrl/py/fable_modules/fable_python/cognite-sdk/__init__.py +0 -0
  397. arctrl/py/fable_modules/fable_python/cognite-sdk/cognite_sdk.py +22 -0
  398. arctrl/py/fable_modules/fable_python/flask/__init__.py +0 -0
  399. arctrl/py/fable_modules/fable_python/flask/flask.py +34 -0
  400. arctrl/py/fable_modules/fable_python/jupyter/__init__.py +0 -0
  401. arctrl/py/fable_modules/fable_python/jupyter/ipy_widgets.py +47 -0
  402. arctrl/py/fable_modules/fable_python/jupyter/ipython.py +13 -0
  403. arctrl/py/fable_modules/fable_python/stdlib/__init__.py +0 -0
  404. arctrl/py/fable_modules/fable_python/stdlib/ast.py +1 -0
  405. arctrl/py/fable_modules/fable_python/stdlib/asyncio/__init__.py +0 -0
  406. arctrl/py/fable_modules/fable_python/stdlib/asyncio/events.py +17 -0
  407. arctrl/py/fable_modules/fable_python/stdlib/asyncio/futures.py +52 -0
  408. arctrl/py/fable_modules/fable_python/stdlib/asyncio/tasks.py +38 -0
  409. arctrl/py/fable_modules/fable_python/stdlib/base64_.py +1 -0
  410. arctrl/py/fable_modules/fable_python/stdlib/builtins_.py +38 -0
  411. arctrl/py/fable_modules/fable_python/stdlib/html.py +1 -0
  412. arctrl/py/fable_modules/fable_python/stdlib/json.py +1 -0
  413. arctrl/py/fable_modules/fable_python/stdlib/math_.py +1 -0
  414. arctrl/py/fable_modules/fable_python/stdlib/os_.py +1 -0
  415. arctrl/py/fable_modules/fable_python/stdlib/queue_.py +1 -0
  416. arctrl/py/fable_modules/fable_python/stdlib/string_.py +1 -0
  417. arctrl/py/fable_modules/fable_python/stdlib/sys_.py +30 -0
  418. arctrl/py/fable_modules/fable_python/stdlib/time_.py +1 -0
  419. arctrl/py/fable_modules/fable_python/stdlib/tk_inter.py +1 -0
  420. arctrl/py/fable_modules/fs_spreadsheet/Cells/__init__.py +0 -0
  421. arctrl/py/fable_modules/fs_spreadsheet/Cells/fs_cell.py +340 -0
  422. arctrl/py/fable_modules/fs_spreadsheet/Cells/fs_cells_collection.py +466 -0
  423. arctrl/py/fable_modules/fs_spreadsheet/DSL/__init__.py +0 -0
  424. arctrl/py/fable_modules/fs_spreadsheet/DSL/cell_builder.py +214 -0
  425. arctrl/py/fable_modules/fs_spreadsheet/DSL/column_builder.py +139 -0
  426. arctrl/py/fable_modules/fs_spreadsheet/DSL/dsl.py +50 -0
  427. arctrl/py/fable_modules/fs_spreadsheet/DSL/expression.py +65 -0
  428. arctrl/py/fable_modules/fs_spreadsheet/DSL/operators.py +9 -0
  429. arctrl/py/fable_modules/fs_spreadsheet/DSL/row_builder.py +139 -0
  430. arctrl/py/fable_modules/fs_spreadsheet/DSL/sheet_builder.py +118 -0
  431. arctrl/py/fable_modules/fs_spreadsheet/DSL/table_builder.py +122 -0
  432. arctrl/py/fable_modules/fs_spreadsheet/DSL/transform.py +463 -0
  433. arctrl/py/fable_modules/fs_spreadsheet/DSL/types.py +314 -0
  434. arctrl/py/fable_modules/fs_spreadsheet/DSL/workbook_builder.py +106 -0
  435. arctrl/py/fable_modules/fs_spreadsheet/Json/__init__.py +0 -0
  436. arctrl/py/fable_modules/fs_spreadsheet/Json/cell.py +103 -0
  437. arctrl/py/fable_modules/fs_spreadsheet/Json/column.py +70 -0
  438. arctrl/py/fable_modules/fs_spreadsheet/Json/row.py +70 -0
  439. arctrl/py/fable_modules/fs_spreadsheet/Json/table.py +54 -0
  440. arctrl/py/fable_modules/fs_spreadsheet/Json/value.py +93 -0
  441. arctrl/py/fable_modules/fs_spreadsheet/Json/workbook.py +71 -0
  442. arctrl/py/fable_modules/fs_spreadsheet/Json/worksheet.py +216 -0
  443. arctrl/py/fable_modules/fs_spreadsheet/Ranges/__init__.py +0 -0
  444. arctrl/py/fable_modules/fs_spreadsheet/Ranges/fs_range.py +43 -0
  445. arctrl/py/fable_modules/fs_spreadsheet/Ranges/fs_range_address.py +190 -0
  446. arctrl/py/fable_modules/fs_spreadsheet/Ranges/fs_range_base.py +92 -0
  447. arctrl/py/fable_modules/fs_spreadsheet/Ranges/fs_range_column.py +77 -0
  448. arctrl/py/fable_modules/fs_spreadsheet/Ranges/fs_range_row.py +48 -0
  449. arctrl/py/fable_modules/fs_spreadsheet/Tables/__init__.py +0 -0
  450. arctrl/py/fable_modules/fs_spreadsheet/Tables/fs_table.py +461 -0
  451. arctrl/py/fable_modules/fs_spreadsheet/Tables/fs_table_field.py +117 -0
  452. arctrl/py/fable_modules/fs_spreadsheet/Tables/fs_table_row.py +23 -0
  453. arctrl/py/fable_modules/fs_spreadsheet/__init__.py +0 -0
  454. arctrl/py/fable_modules/fs_spreadsheet/fs_address.py +236 -0
  455. arctrl/py/fable_modules/fs_spreadsheet/fs_column.py +172 -0
  456. arctrl/py/fable_modules/fs_spreadsheet/fs_row.py +183 -0
  457. arctrl/py/fable_modules/fs_spreadsheet/fs_workbook.py +192 -0
  458. arctrl/py/fable_modules/fs_spreadsheet/fs_worksheet.py +610 -0
  459. arctrl/py/fable_modules/fs_spreadsheet/hash_codes.py +60 -0
  460. arctrl/py/fable_modules/fs_spreadsheet/sheet_builder.py +329 -0
  461. arctrl/py/fable_modules/fs_spreadsheet_py/__init__.py +0 -0
  462. arctrl/py/fable_modules/fs_spreadsheet_py/cell.py +60 -0
  463. arctrl/py/fable_modules/fs_spreadsheet_py/cell_type.py +50 -0
  464. arctrl/py/fable_modules/fs_spreadsheet_py/fs_extension.py +60 -0
  465. arctrl/py/fable_modules/fs_spreadsheet_py/json.py +47 -0
  466. arctrl/py/fable_modules/fs_spreadsheet_py/table.py +54 -0
  467. arctrl/py/fable_modules/fs_spreadsheet_py/workbook.py +41 -0
  468. arctrl/py/fable_modules/fs_spreadsheet_py/worksheet.py +52 -0
  469. arctrl/py/fable_modules/fs_spreadsheet_py/xlsx.py +37 -0
  470. arctrl/py/fable_modules/siren/__init__.py +0 -0
  471. arctrl/py/fable_modules/siren/config.py +1038 -0
  472. arctrl/py/fable_modules/siren/formatting.py +1121 -0
  473. arctrl/py/fable_modules/siren/siren.py +1941 -0
  474. arctrl/py/fable_modules/siren/siren_types.py +1229 -0
  475. arctrl/py/fable_modules/siren/theme_variables.py +517 -0
  476. arctrl/py/fable_modules/siren/util.py +37 -0
  477. arctrl/py/fable_modules/siren/yaml.py +101 -0
  478. arctrl/py/fable_modules/thoth_json_core/__init__.py +0 -0
  479. arctrl/py/fable_modules/thoth_json_core/decode.py +1614 -0
  480. arctrl/py/fable_modules/thoth_json_core/encode.py +305 -0
  481. arctrl/py/fable_modules/thoth_json_core/types.py +181 -0
  482. arctrl/py/fable_modules/thoth_json_python/__init__.py +0 -0
  483. arctrl/py/fable_modules/thoth_json_python/decode.py +112 -0
  484. arctrl/py/fable_modules/thoth_json_python/encode.py +72 -0
  485. arctrl/py/fable_modules/thoth_json_python/python.py +1 -0
  486. arctrl/py/fable_modules/yamlicious/Interop/__init__.py +0 -0
  487. arctrl/py/fable_modules/yamlicious/Interop/js_interop.py +1 -0
  488. arctrl/py/fable_modules/yamlicious/Interop/py_interop.py +7 -0
  489. arctrl/py/fable_modules/yamlicious/__init__.py +0 -0
  490. arctrl/py/fable_modules/yamlicious/decode.py +1784 -0
  491. arctrl/py/fable_modules/yamlicious/encode.py +84 -0
  492. arctrl/py/fable_modules/yamlicious/flow_to_block.py +994 -0
  493. arctrl/py/fable_modules/yamlicious/library.py +10 -0
  494. arctrl/py/fable_modules/yamlicious/persil.py +57 -0
  495. arctrl/py/fable_modules/yamlicious/preprocessing.py +99 -0
  496. arctrl/py/fable_modules/yamlicious/reader.py +739 -0
  497. arctrl/py/fable_modules/yamlicious/regex.py +29 -0
  498. arctrl/py/fable_modules/yamlicious/regex_active_patterns.py +265 -0
  499. arctrl/py/fable_modules/yamlicious/writer.py +175 -0
  500. arctrl/py/fable_modules/yamlicious/yamlicious_types.py +128 -0
  501. arctrl/py/json.py +389 -0
  502. arctrl/py/license.py +169 -0
  503. arctrl/py/rocrate_io.py +242 -0
  504. arctrl/py/template_web.py +23 -0
  505. arctrl/py/xlsx.py +212 -0
  506. arctrl/py/yaml.py +79 -0
  507. arctrl/rocrate.py +21 -0
  508. arctrl-3.0.0.dist-info/METADATA +157 -0
  509. arctrl-3.0.0.dist-info/RECORD +511 -0
  510. arctrl-3.0.0.dist-info/WHEEL +4 -0
  511. arctrl-3.0.0.dist-info/licenses/LICENSE +21 -0
@@ -0,0 +1,1854 @@
1
+ from __future__ import annotations
2
+
3
+ from collections.abc import Callable
4
+ from dataclasses import dataclass
5
+ from typing import Any, Generic, TypeVar
6
+
7
+ from .array_ import fill
8
+ from .array_ import map as map_2
9
+ from .list import FSharpList, cons, head, of_array_with_tail, singleton, tail
10
+ from .list import empty as empty_1
11
+ from .list import fold as fold_1
12
+ from .list import is_empty as is_empty_1
13
+ from .option import some
14
+ from .option import value as value_1
15
+ from .reflection import TypeInfo, bool_type, class_type, list_type, option_type, record_type
16
+ from .seq import compare_with, unfold
17
+ from .seq import iterate as iterate_1
18
+ from .seq import map as map_1
19
+ from .seq import pick as pick_1
20
+ from .seq import try_pick as try_pick_1
21
+ from .string_ import format, join
22
+ from .types import Array, FSharpRef, Record
23
+ from .util import (
24
+ ICollection,
25
+ IComparer_1,
26
+ IEnumerable_1,
27
+ IEnumerator,
28
+ compare,
29
+ equals,
30
+ get_enumerator,
31
+ ignore,
32
+ is_array_like,
33
+ structural_hash,
34
+ to_iterator,
35
+ )
36
+
37
+
38
+ _KEY = TypeVar("_KEY")
39
+
40
+ _VALUE = TypeVar("_VALUE")
41
+
42
+ __A = TypeVar("__A")
43
+
44
+ __B = TypeVar("__B")
45
+
46
+ __C = TypeVar("__C")
47
+
48
+ _RESULT = TypeVar("_RESULT")
49
+
50
+ _A = TypeVar("_A")
51
+
52
+ _B = TypeVar("_B")
53
+
54
+ _Z = TypeVar("_Z")
55
+
56
+ _STATE = TypeVar("_STATE")
57
+
58
+ _T = TypeVar("_T")
59
+
60
+
61
+ def _expr249(gen0: TypeInfo, gen1: TypeInfo) -> TypeInfo:
62
+ return class_type("Map.MapTreeLeaf`2", [gen0, gen1], MapTreeLeaf_2)
63
+
64
+
65
+ class MapTreeLeaf_2(Generic[_KEY, _VALUE]):
66
+ def __init__(self, k: Any, v: Any) -> None:
67
+ self.k: _KEY = k
68
+ self.v: _VALUE = v
69
+
70
+
71
+ MapTreeLeaf_2_reflection = _expr249
72
+
73
+
74
+ def MapTreeLeaf_2__ctor_5BDDA1(k: Any, v: Any) -> MapTreeLeaf_2[_KEY, _VALUE]:
75
+ return MapTreeLeaf_2(k, v)
76
+
77
+
78
+ def MapTreeLeaf_2__get_Key(_: MapTreeLeaf_2[Any, Any]) -> Any:
79
+ return _.k
80
+
81
+
82
+ def MapTreeLeaf_2__get_Value(_: MapTreeLeaf_2[Any, Any]) -> Any:
83
+ return _.v
84
+
85
+
86
+ def _expr250(gen0: TypeInfo, gen1: TypeInfo) -> TypeInfo:
87
+ return class_type("Map.MapTreeNode`2", [gen0, gen1], MapTreeNode_2, MapTreeLeaf_2_reflection(gen0, gen1))
88
+
89
+
90
+ class MapTreeNode_2(MapTreeLeaf_2, Generic[_KEY, _VALUE]):
91
+ def __init__(
92
+ self, k: Any, v: Any, left: MapTreeLeaf_2[Any, Any] | None, right: MapTreeLeaf_2[Any, Any] | None, h: int
93
+ ) -> None:
94
+ super().__init__(k, v)
95
+ self.left: MapTreeLeaf_2[_KEY, _VALUE] | None = left
96
+ self.right: MapTreeLeaf_2[_KEY, _VALUE] | None = right
97
+ self.h: int = h or 0
98
+
99
+
100
+ MapTreeNode_2_reflection = _expr250
101
+
102
+
103
+ def MapTreeNode_2__ctor_Z39DE9543(
104
+ k: Any, v: Any, left: MapTreeLeaf_2[Any, Any] | None, right: MapTreeLeaf_2[Any, Any] | None, h: int
105
+ ) -> MapTreeNode_2[_KEY, _VALUE]:
106
+ return MapTreeNode_2(k, v, left, right, h)
107
+
108
+
109
+ def MapTreeNode_2__get_Left(_: MapTreeNode_2[Any, Any]) -> MapTreeLeaf_2[Any, Any] | None:
110
+ return _.left
111
+
112
+
113
+ def MapTreeNode_2__get_Right(_: MapTreeNode_2[Any, Any]) -> MapTreeLeaf_2[Any, Any] | None:
114
+ return _.right
115
+
116
+
117
+ def MapTreeNode_2__get_Height(_: MapTreeNode_2[Any, Any]) -> int:
118
+ return _.h
119
+
120
+
121
+ def MapTreeModule_empty(__unit: None = None) -> MapTreeLeaf_2[Any, Any] | None:
122
+ return None
123
+
124
+
125
+ def MapTreeModule_sizeAux(acc_mut: int, m_mut: MapTreeLeaf_2[Any, Any] | None) -> int:
126
+ while True:
127
+ (acc, m) = (acc_mut, m_mut)
128
+ if m is not None:
129
+ m2: MapTreeLeaf_2[_KEY, _VALUE] = m
130
+ if isinstance(m2, MapTreeNode_2):
131
+ acc_mut = MapTreeModule_sizeAux(acc + 1, MapTreeNode_2__get_Left(m2))
132
+ m_mut = MapTreeNode_2__get_Right(m2)
133
+ continue
134
+
135
+ else:
136
+ return acc + 1
137
+
138
+ else:
139
+ return acc
140
+
141
+ break
142
+
143
+
144
+ def MapTreeModule_size(x: MapTreeLeaf_2[Any, Any] | None = None) -> int:
145
+ return MapTreeModule_sizeAux(0, x)
146
+
147
+
148
+ def MapTreeModule_mk(
149
+ l: MapTreeLeaf_2[Any, Any] | None, k: Any, v: Any, r: MapTreeLeaf_2[Any, Any] | None = None
150
+ ) -> MapTreeLeaf_2[Any, Any] | None:
151
+ hl: int
152
+ m: MapTreeLeaf_2[_KEY, _VALUE] | None = l
153
+ if m is not None:
154
+ m2: MapTreeLeaf_2[_KEY, _VALUE] = m
155
+ hl = MapTreeNode_2__get_Height(m2) if isinstance(m2, MapTreeNode_2) else 1
156
+
157
+ else:
158
+ hl = 0
159
+
160
+ hr: int
161
+ m_1: MapTreeLeaf_2[_KEY, _VALUE] | None = r
162
+ if m_1 is not None:
163
+ m2_1: MapTreeLeaf_2[_KEY, _VALUE] = m_1
164
+ hr = MapTreeNode_2__get_Height(m2_1) if isinstance(m2_1, MapTreeNode_2) else 1
165
+
166
+ else:
167
+ hr = 0
168
+
169
+ m_2: int = (hr if (hl < hr) else hl) or 0
170
+ if m_2 == 0:
171
+ return MapTreeLeaf_2__ctor_5BDDA1(k, v)
172
+
173
+ else:
174
+ return MapTreeNode_2__ctor_Z39DE9543(k, v, l, r, m_2 + 1)
175
+
176
+
177
+ def MapTreeModule_rebalance(
178
+ t1: MapTreeLeaf_2[Any, Any] | None, k: Any, v: Any, t2: MapTreeLeaf_2[Any, Any] | None = None
179
+ ) -> MapTreeLeaf_2[Any, Any] | None:
180
+ t1h: int
181
+ m: MapTreeLeaf_2[_KEY, _VALUE] | None = t1
182
+ if m is not None:
183
+ m2: MapTreeLeaf_2[_KEY, _VALUE] = m
184
+ t1h = MapTreeNode_2__get_Height(m2) if isinstance(m2, MapTreeNode_2) else 1
185
+
186
+ else:
187
+ t1h = 0
188
+
189
+ t2h: int
190
+ m_1: MapTreeLeaf_2[_KEY, _VALUE] | None = t2
191
+ if m_1 is not None:
192
+ m2_1: MapTreeLeaf_2[_KEY, _VALUE] = m_1
193
+ t2h = MapTreeNode_2__get_Height(m2_1) if isinstance(m2_1, MapTreeNode_2) else 1
194
+
195
+ else:
196
+ t2h = 0
197
+
198
+ if t2h > (t1h + 2):
199
+ match_value: MapTreeLeaf_2[_KEY, _VALUE] = value_1(t2)
200
+ if isinstance(match_value, MapTreeNode_2):
201
+
202
+ def _arrow251(__unit: None = None, t1: Any = t1, k: Any = k, v: Any = v, t2: Any = t2) -> int:
203
+ m_2: MapTreeLeaf_2[_KEY, _VALUE] | None = MapTreeNode_2__get_Left(match_value)
204
+ if m_2 is not None:
205
+ m2_2: MapTreeLeaf_2[_KEY, _VALUE] = m_2
206
+ return MapTreeNode_2__get_Height(m2_2) if isinstance(m2_2, MapTreeNode_2) else 1
207
+
208
+ else:
209
+ return 0
210
+
211
+ if _arrow251() > (t1h + 1):
212
+ match_value_1: MapTreeLeaf_2[_KEY, _VALUE] = value_1(MapTreeNode_2__get_Left(match_value))
213
+ if isinstance(match_value_1, MapTreeNode_2):
214
+ return MapTreeModule_mk(
215
+ MapTreeModule_mk(t1, k, v, MapTreeNode_2__get_Left(match_value_1)),
216
+ MapTreeLeaf_2__get_Key(match_value_1),
217
+ MapTreeLeaf_2__get_Value(match_value_1),
218
+ MapTreeModule_mk(
219
+ MapTreeNode_2__get_Right(match_value_1),
220
+ MapTreeLeaf_2__get_Key(match_value),
221
+ MapTreeLeaf_2__get_Value(match_value),
222
+ MapTreeNode_2__get_Right(match_value),
223
+ ),
224
+ )
225
+
226
+ else:
227
+ raise Exception("internal error: Map.rebalance")
228
+
229
+ else:
230
+ return MapTreeModule_mk(
231
+ MapTreeModule_mk(t1, k, v, MapTreeNode_2__get_Left(match_value)),
232
+ MapTreeLeaf_2__get_Key(match_value),
233
+ MapTreeLeaf_2__get_Value(match_value),
234
+ MapTreeNode_2__get_Right(match_value),
235
+ )
236
+
237
+ else:
238
+ raise Exception("internal error: Map.rebalance")
239
+
240
+ elif t1h > (t2h + 2):
241
+ match_value_2: MapTreeLeaf_2[_KEY, _VALUE] = value_1(t1)
242
+ if isinstance(match_value_2, MapTreeNode_2):
243
+
244
+ def _arrow252(__unit: None = None, t1: Any = t1, k: Any = k, v: Any = v, t2: Any = t2) -> int:
245
+ m_3: MapTreeLeaf_2[_KEY, _VALUE] | None = MapTreeNode_2__get_Right(match_value_2)
246
+ if m_3 is not None:
247
+ m2_3: MapTreeLeaf_2[_KEY, _VALUE] = m_3
248
+ return MapTreeNode_2__get_Height(m2_3) if isinstance(m2_3, MapTreeNode_2) else 1
249
+
250
+ else:
251
+ return 0
252
+
253
+ if _arrow252() > (t2h + 1):
254
+ match_value_3: MapTreeLeaf_2[_KEY, _VALUE] = value_1(MapTreeNode_2__get_Right(match_value_2))
255
+ if isinstance(match_value_3, MapTreeNode_2):
256
+ return MapTreeModule_mk(
257
+ MapTreeModule_mk(
258
+ MapTreeNode_2__get_Left(match_value_2),
259
+ MapTreeLeaf_2__get_Key(match_value_2),
260
+ MapTreeLeaf_2__get_Value(match_value_2),
261
+ MapTreeNode_2__get_Left(match_value_3),
262
+ ),
263
+ MapTreeLeaf_2__get_Key(match_value_3),
264
+ MapTreeLeaf_2__get_Value(match_value_3),
265
+ MapTreeModule_mk(MapTreeNode_2__get_Right(match_value_3), k, v, t2),
266
+ )
267
+
268
+ else:
269
+ raise Exception("internal error: Map.rebalance")
270
+
271
+ else:
272
+ return MapTreeModule_mk(
273
+ MapTreeNode_2__get_Left(match_value_2),
274
+ MapTreeLeaf_2__get_Key(match_value_2),
275
+ MapTreeLeaf_2__get_Value(match_value_2),
276
+ MapTreeModule_mk(MapTreeNode_2__get_Right(match_value_2), k, v, t2),
277
+ )
278
+
279
+ else:
280
+ raise Exception("internal error: Map.rebalance")
281
+
282
+ else:
283
+ return MapTreeModule_mk(t1, k, v, t2)
284
+
285
+
286
+ def MapTreeModule_add(
287
+ comparer: IComparer_1[Any], k: Any, v: Any, m: MapTreeLeaf_2[Any, Any] | None = None
288
+ ) -> MapTreeLeaf_2[Any, Any] | None:
289
+ if m is not None:
290
+ m2: MapTreeLeaf_2[_KEY, _VALUE] = m
291
+ c: int = comparer.Compare(k, MapTreeLeaf_2__get_Key(m2)) or 0
292
+ if isinstance(m2, MapTreeNode_2):
293
+ if c < 0:
294
+ return MapTreeModule_rebalance(
295
+ MapTreeModule_add(comparer, k, v, MapTreeNode_2__get_Left(m2)),
296
+ MapTreeLeaf_2__get_Key(m2),
297
+ MapTreeLeaf_2__get_Value(m2),
298
+ MapTreeNode_2__get_Right(m2),
299
+ )
300
+
301
+ elif c == 0:
302
+ return MapTreeNode_2__ctor_Z39DE9543(
303
+ k, v, MapTreeNode_2__get_Left(m2), MapTreeNode_2__get_Right(m2), MapTreeNode_2__get_Height(m2)
304
+ )
305
+
306
+ else:
307
+ return MapTreeModule_rebalance(
308
+ MapTreeNode_2__get_Left(m2),
309
+ MapTreeLeaf_2__get_Key(m2),
310
+ MapTreeLeaf_2__get_Value(m2),
311
+ MapTreeModule_add(comparer, k, v, MapTreeNode_2__get_Right(m2)),
312
+ )
313
+
314
+ elif c < 0:
315
+ return MapTreeNode_2__ctor_Z39DE9543(k, v, MapTreeModule_empty(), m, 2)
316
+
317
+ elif c == 0:
318
+ return MapTreeLeaf_2__ctor_5BDDA1(k, v)
319
+
320
+ else:
321
+ return MapTreeNode_2__ctor_Z39DE9543(k, v, m, MapTreeModule_empty(), 2)
322
+
323
+ else:
324
+ return MapTreeLeaf_2__ctor_5BDDA1(k, v)
325
+
326
+
327
+ def MapTreeModule_tryFind(
328
+ comparer_mut: IComparer_1[Any], k_mut: Any, m_mut: MapTreeLeaf_2[Any, Any] | None
329
+ ) -> Any | None:
330
+ while True:
331
+ (comparer, k, m) = (comparer_mut, k_mut, m_mut)
332
+ if m is not None:
333
+ m2: MapTreeLeaf_2[_KEY, _VALUE] = m
334
+ c: int = comparer.Compare(k, MapTreeLeaf_2__get_Key(m2)) or 0
335
+ if c == 0:
336
+ return some(MapTreeLeaf_2__get_Value(m2))
337
+
338
+ elif isinstance(m2, MapTreeNode_2):
339
+ comparer_mut = comparer
340
+ k_mut = k
341
+ m_mut = MapTreeNode_2__get_Left(m2) if (c < 0) else MapTreeNode_2__get_Right(m2)
342
+ continue
343
+
344
+ else:
345
+ return None
346
+
347
+ else:
348
+ return None
349
+
350
+ break
351
+
352
+
353
+ def MapTreeModule_find(comparer: IComparer_1[Any], k: Any, m: MapTreeLeaf_2[Any, Any] | None = None) -> Any:
354
+ match_value: _VALUE | None = MapTreeModule_tryFind(comparer, k, m)
355
+ if match_value is None:
356
+ raise Exception()
357
+
358
+ else:
359
+ return value_1(match_value)
360
+
361
+
362
+ def MapTreeModule_partition1(
363
+ comparer: IComparer_1[Any],
364
+ f: Any,
365
+ k: Any,
366
+ v: Any,
367
+ acc1: MapTreeLeaf_2[Any, Any] | None = None,
368
+ acc2: MapTreeLeaf_2[Any, Any] | None = None,
369
+ ) -> tuple[MapTreeLeaf_2[_KEY, __A] | None, MapTreeLeaf_2[_KEY, __A] | None]:
370
+ if f(k, v):
371
+ return (MapTreeModule_add(comparer, k, v, acc1), acc2)
372
+
373
+ else:
374
+ return (acc1, MapTreeModule_add(comparer, k, v, acc2))
375
+
376
+
377
+ def MapTreeModule_partitionAux(
378
+ comparer_mut: IComparer_1[Any],
379
+ f_mut: Any,
380
+ m_mut: MapTreeLeaf_2[Any, Any] | None,
381
+ acc__mut: MapTreeLeaf_2[Any, Any] | None,
382
+ acc__1_mut: MapTreeLeaf_2[Any, Any] | None,
383
+ ) -> tuple[MapTreeLeaf_2[_KEY, _VALUE] | None, MapTreeLeaf_2[_KEY, _VALUE] | None]:
384
+ while True:
385
+ (comparer, f, m, acc_, acc__1) = (comparer_mut, f_mut, m_mut, acc__mut, acc__1_mut)
386
+ acc: tuple[MapTreeLeaf_2[_KEY, _VALUE] | None, MapTreeLeaf_2[_KEY, _VALUE] | None] = (acc_, acc__1)
387
+ if m is not None:
388
+ m2: MapTreeLeaf_2[_KEY, _VALUE] = m
389
+ if isinstance(m2, MapTreeNode_2):
390
+ acc_1: tuple[MapTreeLeaf_2[_KEY, _VALUE] | None, MapTreeLeaf_2[_KEY, _VALUE] | None] = (
391
+ MapTreeModule_partitionAux(comparer, f, MapTreeNode_2__get_Right(m2), acc[0], acc[1])
392
+ )
393
+ acc_4: tuple[MapTreeLeaf_2[_KEY, _VALUE] | None, MapTreeLeaf_2[_KEY, _VALUE] | None] = (
394
+ MapTreeModule_partition1(
395
+ comparer, f, MapTreeLeaf_2__get_Key(m2), MapTreeLeaf_2__get_Value(m2), acc_1[0], acc_1[1]
396
+ )
397
+ )
398
+ comparer_mut = comparer
399
+ f_mut = f
400
+ m_mut = MapTreeNode_2__get_Left(m2)
401
+ acc__mut = acc_4[0]
402
+ acc__1_mut = acc_4[1]
403
+ continue
404
+
405
+ else:
406
+ return MapTreeModule_partition1(
407
+ comparer, f, MapTreeLeaf_2__get_Key(m2), MapTreeLeaf_2__get_Value(m2), acc[0], acc[1]
408
+ )
409
+
410
+ else:
411
+ return acc
412
+
413
+ break
414
+
415
+
416
+ def MapTreeModule_partition(
417
+ comparer: IComparer_1[Any], f: Callable[[_KEY, __A], bool], m: MapTreeLeaf_2[Any, Any] | None = None
418
+ ) -> tuple[MapTreeLeaf_2[_KEY, __A] | None, MapTreeLeaf_2[_KEY, __A] | None]:
419
+ return MapTreeModule_partitionAux(comparer, f, m, MapTreeModule_empty(), MapTreeModule_empty())
420
+
421
+
422
+ def MapTreeModule_filter1(
423
+ comparer: IComparer_1[Any], f: Any, k: Any, v: Any, acc: MapTreeLeaf_2[Any, Any] | None = None
424
+ ) -> MapTreeLeaf_2[Any, Any] | None:
425
+ if f(k, v):
426
+ return MapTreeModule_add(comparer, k, v, acc)
427
+
428
+ else:
429
+ return acc
430
+
431
+
432
+ def MapTreeModule_filterAux(
433
+ comparer_mut: IComparer_1[Any],
434
+ f_mut: Any,
435
+ m_mut: MapTreeLeaf_2[Any, Any] | None,
436
+ acc_mut: MapTreeLeaf_2[Any, Any] | None,
437
+ ) -> MapTreeLeaf_2[Any, Any] | None:
438
+ while True:
439
+ (comparer, f, m, acc) = (comparer_mut, f_mut, m_mut, acc_mut)
440
+ if m is not None:
441
+ m2: MapTreeLeaf_2[_KEY, _VALUE] = m
442
+ if isinstance(m2, MapTreeNode_2):
443
+ acc_1: MapTreeLeaf_2[_KEY, _VALUE] | None = MapTreeModule_filterAux(
444
+ comparer, f, MapTreeNode_2__get_Left(m2), acc
445
+ )
446
+ acc_2: MapTreeLeaf_2[_KEY, _VALUE] | None = MapTreeModule_filter1(
447
+ comparer, f, MapTreeLeaf_2__get_Key(m2), MapTreeLeaf_2__get_Value(m2), acc_1
448
+ )
449
+ comparer_mut = comparer
450
+ f_mut = f
451
+ m_mut = MapTreeNode_2__get_Right(m2)
452
+ acc_mut = acc_2
453
+ continue
454
+
455
+ else:
456
+ return MapTreeModule_filter1(comparer, f, MapTreeLeaf_2__get_Key(m2), MapTreeLeaf_2__get_Value(m2), acc)
457
+
458
+ else:
459
+ return acc
460
+
461
+ break
462
+
463
+
464
+ def MapTreeModule_filter(
465
+ comparer: IComparer_1[Any], f: Callable[[_KEY, __A], bool], m: MapTreeLeaf_2[Any, Any] | None = None
466
+ ) -> MapTreeLeaf_2[Any, Any] | None:
467
+ return MapTreeModule_filterAux(comparer, f, m, MapTreeModule_empty())
468
+
469
+
470
+ def MapTreeModule_spliceOutSuccessor(
471
+ m: MapTreeLeaf_2[Any, Any] | None = None,
472
+ ) -> tuple[_KEY, _VALUE, MapTreeLeaf_2[_KEY, _VALUE] | None]:
473
+ if m is not None:
474
+ m2: MapTreeLeaf_2[_KEY, _VALUE] = m
475
+ if isinstance(m2, MapTreeNode_2):
476
+ if MapTreeNode_2__get_Left(m2) is None:
477
+ return (MapTreeLeaf_2__get_Key(m2), MapTreeLeaf_2__get_Value(m2), MapTreeNode_2__get_Right(m2))
478
+
479
+ else:
480
+ pattern_input: tuple[_KEY, _VALUE, MapTreeLeaf_2[_KEY, _VALUE] | None] = (
481
+ MapTreeModule_spliceOutSuccessor(MapTreeNode_2__get_Left(m2))
482
+ )
483
+ return (
484
+ pattern_input[0],
485
+ pattern_input[1],
486
+ MapTreeModule_mk(
487
+ pattern_input[2],
488
+ MapTreeLeaf_2__get_Key(m2),
489
+ MapTreeLeaf_2__get_Value(m2),
490
+ MapTreeNode_2__get_Right(m2),
491
+ ),
492
+ )
493
+
494
+ else:
495
+ return (MapTreeLeaf_2__get_Key(m2), MapTreeLeaf_2__get_Value(m2), MapTreeModule_empty())
496
+
497
+ else:
498
+ raise Exception("internal error: Map.spliceOutSuccessor")
499
+
500
+
501
+ def MapTreeModule_remove(
502
+ comparer: IComparer_1[Any], k: Any, m: MapTreeLeaf_2[Any, Any] | None = None
503
+ ) -> MapTreeLeaf_2[Any, Any] | None:
504
+ if m is not None:
505
+ m2: MapTreeLeaf_2[_KEY, _VALUE] = m
506
+ c: int = comparer.Compare(k, MapTreeLeaf_2__get_Key(m2)) or 0
507
+ if isinstance(m2, MapTreeNode_2):
508
+ if c < 0:
509
+ return MapTreeModule_rebalance(
510
+ MapTreeModule_remove(comparer, k, MapTreeNode_2__get_Left(m2)),
511
+ MapTreeLeaf_2__get_Key(m2),
512
+ MapTreeLeaf_2__get_Value(m2),
513
+ MapTreeNode_2__get_Right(m2),
514
+ )
515
+
516
+ elif c == 0:
517
+ if MapTreeNode_2__get_Left(m2) is None:
518
+ return MapTreeNode_2__get_Right(m2)
519
+
520
+ elif MapTreeNode_2__get_Right(m2) is None:
521
+ return MapTreeNode_2__get_Left(m2)
522
+
523
+ else:
524
+ pattern_input: tuple[_KEY, _VALUE, MapTreeLeaf_2[_KEY, _VALUE] | None] = (
525
+ MapTreeModule_spliceOutSuccessor(MapTreeNode_2__get_Right(m2))
526
+ )
527
+ return MapTreeModule_mk(
528
+ MapTreeNode_2__get_Left(m2), pattern_input[0], pattern_input[1], pattern_input[2]
529
+ )
530
+
531
+ else:
532
+ return MapTreeModule_rebalance(
533
+ MapTreeNode_2__get_Left(m2),
534
+ MapTreeLeaf_2__get_Key(m2),
535
+ MapTreeLeaf_2__get_Value(m2),
536
+ MapTreeModule_remove(comparer, k, MapTreeNode_2__get_Right(m2)),
537
+ )
538
+
539
+ elif c == 0:
540
+ return MapTreeModule_empty()
541
+
542
+ else:
543
+ return m
544
+
545
+ else:
546
+ return MapTreeModule_empty()
547
+
548
+
549
+ def MapTreeModule_change(
550
+ comparer: IComparer_1[Any],
551
+ k: Any,
552
+ u: Callable[[_VALUE | None], _VALUE | None],
553
+ m: MapTreeLeaf_2[Any, Any] | None = None,
554
+ ) -> MapTreeLeaf_2[Any, Any] | None:
555
+ if m is not None:
556
+ m2: MapTreeLeaf_2[_KEY, _VALUE] = m
557
+ if isinstance(m2, MapTreeNode_2):
558
+ c: int = comparer.Compare(k, MapTreeLeaf_2__get_Key(m2)) or 0
559
+ if c < 0:
560
+ return MapTreeModule_rebalance(
561
+ MapTreeModule_change(comparer, k, u, MapTreeNode_2__get_Left(m2)),
562
+ MapTreeLeaf_2__get_Key(m2),
563
+ MapTreeLeaf_2__get_Value(m2),
564
+ MapTreeNode_2__get_Right(m2),
565
+ )
566
+
567
+ elif c == 0:
568
+ match_value_1: _VALUE | None = u(some(MapTreeLeaf_2__get_Value(m2)))
569
+ if match_value_1 is not None:
570
+ return MapTreeNode_2__ctor_Z39DE9543(
571
+ k,
572
+ value_1(match_value_1),
573
+ MapTreeNode_2__get_Left(m2),
574
+ MapTreeNode_2__get_Right(m2),
575
+ MapTreeNode_2__get_Height(m2),
576
+ )
577
+
578
+ elif MapTreeNode_2__get_Left(m2) is None:
579
+ return MapTreeNode_2__get_Right(m2)
580
+
581
+ elif MapTreeNode_2__get_Right(m2) is None:
582
+ return MapTreeNode_2__get_Left(m2)
583
+
584
+ else:
585
+ pattern_input: tuple[_KEY, _VALUE, MapTreeLeaf_2[_KEY, _VALUE] | None] = (
586
+ MapTreeModule_spliceOutSuccessor(MapTreeNode_2__get_Right(m2))
587
+ )
588
+ return MapTreeModule_mk(
589
+ MapTreeNode_2__get_Left(m2), pattern_input[0], pattern_input[1], pattern_input[2]
590
+ )
591
+
592
+ else:
593
+ return MapTreeModule_rebalance(
594
+ MapTreeNode_2__get_Left(m2),
595
+ MapTreeLeaf_2__get_Key(m2),
596
+ MapTreeLeaf_2__get_Value(m2),
597
+ MapTreeModule_change(comparer, k, u, MapTreeNode_2__get_Right(m2)),
598
+ )
599
+
600
+ else:
601
+ c_1: int = comparer.Compare(k, MapTreeLeaf_2__get_Key(m2)) or 0
602
+ if c_1 < 0:
603
+ match_value_2: _VALUE | None = u(None)
604
+ if match_value_2 is not None:
605
+ return MapTreeNode_2__ctor_Z39DE9543(k, value_1(match_value_2), MapTreeModule_empty(), m, 2)
606
+
607
+ else:
608
+ return m
609
+
610
+ elif c_1 == 0:
611
+ match_value_3: _VALUE | None = u(some(MapTreeLeaf_2__get_Value(m2)))
612
+ if match_value_3 is not None:
613
+ return MapTreeLeaf_2__ctor_5BDDA1(k, value_1(match_value_3))
614
+
615
+ else:
616
+ return MapTreeModule_empty()
617
+
618
+ else:
619
+ match_value_4: _VALUE | None = u(None)
620
+ if match_value_4 is not None:
621
+ return MapTreeNode_2__ctor_Z39DE9543(k, value_1(match_value_4), m, MapTreeModule_empty(), 2)
622
+
623
+ else:
624
+ return m
625
+
626
+ else:
627
+ match_value: _VALUE | None = u(None)
628
+ if match_value is not None:
629
+ return MapTreeLeaf_2__ctor_5BDDA1(k, value_1(match_value))
630
+
631
+ else:
632
+ return m
633
+
634
+
635
+ def MapTreeModule_mem(comparer_mut: IComparer_1[Any], k_mut: Any, m_mut: MapTreeLeaf_2[Any, Any] | None) -> bool:
636
+ while True:
637
+ (comparer, k, m) = (comparer_mut, k_mut, m_mut)
638
+ if m is not None:
639
+ m2: MapTreeLeaf_2[_KEY, _VALUE] = m
640
+ c: int = comparer.Compare(k, MapTreeLeaf_2__get_Key(m2)) or 0
641
+ if isinstance(m2, MapTreeNode_2):
642
+ if c < 0:
643
+ comparer_mut = comparer
644
+ k_mut = k
645
+ m_mut = MapTreeNode_2__get_Left(m2)
646
+ continue
647
+
648
+ elif c == 0:
649
+ return True
650
+
651
+ else:
652
+ comparer_mut = comparer
653
+ k_mut = k
654
+ m_mut = MapTreeNode_2__get_Right(m2)
655
+ continue
656
+
657
+ else:
658
+ return c == 0
659
+
660
+ else:
661
+ return False
662
+
663
+ break
664
+
665
+
666
+ def MapTreeModule_iterOpt(f_mut: Any, m_mut: MapTreeLeaf_2[Any, Any] | None) -> None:
667
+ while True:
668
+ (f, m) = (f_mut, m_mut)
669
+ if m is not None:
670
+ m2: MapTreeLeaf_2[_KEY, _VALUE] = m
671
+ if isinstance(m2, MapTreeNode_2):
672
+ MapTreeModule_iterOpt(f, MapTreeNode_2__get_Left(m2))
673
+ f(MapTreeLeaf_2__get_Key(m2), MapTreeLeaf_2__get_Value(m2))
674
+ f_mut = f
675
+ m_mut = MapTreeNode_2__get_Right(m2)
676
+ continue
677
+
678
+ else:
679
+ f(MapTreeLeaf_2__get_Key(m2), MapTreeLeaf_2__get_Value(m2))
680
+
681
+ break
682
+
683
+
684
+ def MapTreeModule_iter(f: Callable[[__A, __B], None], m: MapTreeLeaf_2[Any, Any] | None = None) -> None:
685
+ MapTreeModule_iterOpt(f, m)
686
+
687
+
688
+ def MapTreeModule_tryPickOpt(f_mut: Any, m_mut: MapTreeLeaf_2[Any, Any] | None) -> Any | None:
689
+ while True:
690
+ (f, m) = (f_mut, m_mut)
691
+ if m is not None:
692
+ m2: MapTreeLeaf_2[_KEY, _VALUE] = m
693
+ if isinstance(m2, MapTreeNode_2):
694
+ match_value: __A | None = MapTreeModule_tryPickOpt(f, MapTreeNode_2__get_Left(m2))
695
+ if match_value is None:
696
+ match_value_1: __A | None = f(MapTreeLeaf_2__get_Key(m2), MapTreeLeaf_2__get_Value(m2))
697
+ if match_value_1 is None:
698
+ f_mut = f
699
+ m_mut = MapTreeNode_2__get_Right(m2)
700
+ continue
701
+
702
+ else:
703
+ return match_value_1
704
+
705
+ else:
706
+ return match_value
707
+
708
+ else:
709
+ return f(MapTreeLeaf_2__get_Key(m2), MapTreeLeaf_2__get_Value(m2))
710
+
711
+ else:
712
+ return None
713
+
714
+ break
715
+
716
+
717
+ def MapTreeModule_tryPick(f: Callable[[__A, __B], __C | None], m: MapTreeLeaf_2[Any, Any] | None = None) -> Any | None:
718
+ return MapTreeModule_tryPickOpt(f, m)
719
+
720
+
721
+ def MapTreeModule_existsOpt(f_mut: Any, m_mut: MapTreeLeaf_2[Any, Any] | None) -> bool:
722
+ while True:
723
+ (f, m) = (f_mut, m_mut)
724
+ if m is not None:
725
+ m2: MapTreeLeaf_2[_KEY, _VALUE] = m
726
+ if isinstance(m2, MapTreeNode_2):
727
+ if (
728
+ True
729
+ if MapTreeModule_existsOpt(f, MapTreeNode_2__get_Left(m2))
730
+ else f(MapTreeLeaf_2__get_Key(m2), MapTreeLeaf_2__get_Value(m2))
731
+ ):
732
+ return True
733
+
734
+ else:
735
+ f_mut = f
736
+ m_mut = MapTreeNode_2__get_Right(m2)
737
+ continue
738
+
739
+ else:
740
+ return f(MapTreeLeaf_2__get_Key(m2), MapTreeLeaf_2__get_Value(m2))
741
+
742
+ else:
743
+ return False
744
+
745
+ break
746
+
747
+
748
+ def MapTreeModule_exists(f: Callable[[__A, __B], bool], m: MapTreeLeaf_2[Any, Any] | None = None) -> bool:
749
+ return MapTreeModule_existsOpt(f, m)
750
+
751
+
752
+ def MapTreeModule_forallOpt(f_mut: Any, m_mut: MapTreeLeaf_2[Any, Any] | None) -> bool:
753
+ while True:
754
+ (f, m) = (f_mut, m_mut)
755
+ if m is not None:
756
+ m2: MapTreeLeaf_2[_KEY, _VALUE] = m
757
+ if isinstance(m2, MapTreeNode_2):
758
+ if (
759
+ f(MapTreeLeaf_2__get_Key(m2), MapTreeLeaf_2__get_Value(m2))
760
+ if MapTreeModule_forallOpt(f, MapTreeNode_2__get_Left(m2))
761
+ else False
762
+ ):
763
+ f_mut = f
764
+ m_mut = MapTreeNode_2__get_Right(m2)
765
+ continue
766
+
767
+ else:
768
+ return False
769
+
770
+ else:
771
+ return f(MapTreeLeaf_2__get_Key(m2), MapTreeLeaf_2__get_Value(m2))
772
+
773
+ else:
774
+ return True
775
+
776
+ break
777
+
778
+
779
+ def MapTreeModule_forall(f: Callable[[__A, __B], bool], m: MapTreeLeaf_2[Any, Any] | None = None) -> bool:
780
+ return MapTreeModule_forallOpt(f, m)
781
+
782
+
783
+ def MapTreeModule_map(
784
+ f: Callable[[_VALUE], _RESULT], m: MapTreeLeaf_2[Any, Any] | None = None
785
+ ) -> MapTreeLeaf_2[Any, Any] | None:
786
+ if m is not None:
787
+ m2: MapTreeLeaf_2[_KEY, _VALUE] = m
788
+ if isinstance(m2, MapTreeNode_2):
789
+ l2: MapTreeLeaf_2[_KEY, _RESULT] | None = MapTreeModule_map(f, MapTreeNode_2__get_Left(m2))
790
+ v2: _RESULT = f(MapTreeLeaf_2__get_Value(m2))
791
+ r2: MapTreeLeaf_2[_KEY, _RESULT] | None = MapTreeModule_map(f, MapTreeNode_2__get_Right(m2))
792
+ return MapTreeNode_2__ctor_Z39DE9543(MapTreeLeaf_2__get_Key(m2), v2, l2, r2, MapTreeNode_2__get_Height(m2))
793
+
794
+ else:
795
+ return MapTreeLeaf_2__ctor_5BDDA1(MapTreeLeaf_2__get_Key(m2), f(MapTreeLeaf_2__get_Value(m2)))
796
+
797
+ else:
798
+ return MapTreeModule_empty()
799
+
800
+
801
+ def MapTreeModule_mapiOpt(f: Any, m: MapTreeLeaf_2[Any, Any] | None = None) -> MapTreeLeaf_2[Any, Any] | None:
802
+ if m is not None:
803
+ m2: MapTreeLeaf_2[_KEY, _VALUE] = m
804
+ if isinstance(m2, MapTreeNode_2):
805
+ l2: MapTreeLeaf_2[_KEY, _RESULT] | None = MapTreeModule_mapiOpt(f, MapTreeNode_2__get_Left(m2))
806
+ v2: _RESULT = f(MapTreeLeaf_2__get_Key(m2), MapTreeLeaf_2__get_Value(m2))
807
+ r2: MapTreeLeaf_2[_KEY, _RESULT] | None = MapTreeModule_mapiOpt(f, MapTreeNode_2__get_Right(m2))
808
+ return MapTreeNode_2__ctor_Z39DE9543(MapTreeLeaf_2__get_Key(m2), v2, l2, r2, MapTreeNode_2__get_Height(m2))
809
+
810
+ else:
811
+ return MapTreeLeaf_2__ctor_5BDDA1(
812
+ MapTreeLeaf_2__get_Key(m2), f(MapTreeLeaf_2__get_Key(m2), MapTreeLeaf_2__get_Value(m2))
813
+ )
814
+
815
+ else:
816
+ return MapTreeModule_empty()
817
+
818
+
819
+ def MapTreeModule_mapi(
820
+ f: Callable[[__A, __B], __C], m: MapTreeLeaf_2[Any, Any] | None = None
821
+ ) -> MapTreeLeaf_2[Any, Any] | None:
822
+ return MapTreeModule_mapiOpt(f, m)
823
+
824
+
825
+ def MapTreeModule_foldBackOpt(f_mut: Any, m_mut: MapTreeLeaf_2[Any, Any] | None, x_mut: Any) -> Any:
826
+ while True:
827
+ (f, m, x) = (f_mut, m_mut, x_mut)
828
+ if m is not None:
829
+ m2: MapTreeLeaf_2[_KEY, _VALUE] = m
830
+ if isinstance(m2, MapTreeNode_2):
831
+ x_1: __A = MapTreeModule_foldBackOpt(f, MapTreeNode_2__get_Right(m2), x)
832
+ x_2: __A = f(MapTreeLeaf_2__get_Key(m2), MapTreeLeaf_2__get_Value(m2), x_1)
833
+ f_mut = f
834
+ m_mut = MapTreeNode_2__get_Left(m2)
835
+ x_mut = x_2
836
+ continue
837
+
838
+ else:
839
+ return f(MapTreeLeaf_2__get_Key(m2), MapTreeLeaf_2__get_Value(m2), x)
840
+
841
+ else:
842
+ return x
843
+
844
+ break
845
+
846
+
847
+ def MapTreeModule_foldBack(f: Callable[[__A, __B, __C], __C], m: MapTreeLeaf_2[Any, Any] | None, x: Any) -> Any:
848
+ return MapTreeModule_foldBackOpt(f, m, x)
849
+
850
+
851
+ def MapTreeModule_foldOpt(f_mut: Any, x_mut: Any, m_mut: MapTreeLeaf_2[Any, Any] | None) -> Any:
852
+ while True:
853
+ (f, x, m) = (f_mut, x_mut, m_mut)
854
+ if m is not None:
855
+ m2: MapTreeLeaf_2[_KEY, _VALUE] = m
856
+ if isinstance(m2, MapTreeNode_2):
857
+ f_mut = f
858
+ x_mut = f(
859
+ MapTreeModule_foldOpt(f, x, MapTreeNode_2__get_Left(m2)),
860
+ MapTreeLeaf_2__get_Key(m2),
861
+ MapTreeLeaf_2__get_Value(m2),
862
+ )
863
+ m_mut = MapTreeNode_2__get_Right(m2)
864
+ continue
865
+
866
+ else:
867
+ return f(x, MapTreeLeaf_2__get_Key(m2), MapTreeLeaf_2__get_Value(m2))
868
+
869
+ else:
870
+ return x
871
+
872
+ break
873
+
874
+
875
+ def MapTreeModule_fold(f: Callable[[__A, __B, __C], __A], x: Any, m: MapTreeLeaf_2[Any, Any] | None = None) -> Any:
876
+ return MapTreeModule_foldOpt(f, x, m)
877
+
878
+
879
+ def MapTreeModule_foldSectionOpt(
880
+ comparer: IComparer_1[Any], lo: Any, hi: Any, f: Any, m: MapTreeLeaf_2[Any, Any] | None, x: Any
881
+ ) -> Any:
882
+ def fold_from_to(
883
+ f_1_mut: Any,
884
+ m_1_mut: MapTreeLeaf_2[_KEY, _VALUE] | None,
885
+ x_1_mut: _A,
886
+ comparer: Any = comparer,
887
+ lo: Any = lo,
888
+ hi: Any = hi,
889
+ f: Any = f,
890
+ m: Any = m,
891
+ x: Any = x,
892
+ ) -> _A:
893
+ while True:
894
+ (f_1, m_1, x_1) = (f_1_mut, m_1_mut, x_1_mut)
895
+ if m_1 is not None:
896
+ m2: MapTreeLeaf_2[_KEY, _VALUE] = m_1
897
+ if isinstance(m2, MapTreeNode_2):
898
+ c_lo_key: int = comparer.Compare(lo, MapTreeLeaf_2__get_Key(m2)) or 0
899
+ c_key_hi: int = comparer.Compare(MapTreeLeaf_2__get_Key(m2), hi) or 0
900
+ x_2: _A = fold_from_to(f_1, MapTreeNode_2__get_Left(m2), x_1) if (c_lo_key < 0) else x_1
901
+ x_3: _A = (
902
+ f_1(MapTreeLeaf_2__get_Key(m2), MapTreeLeaf_2__get_Value(m2), x_2)
903
+ if ((c_key_hi <= 0) if (c_lo_key <= 0) else False)
904
+ else x_2
905
+ )
906
+ if c_key_hi < 0:
907
+ f_1_mut = f_1
908
+ m_1_mut = MapTreeNode_2__get_Right(m2)
909
+ x_1_mut = x_3
910
+ continue
911
+
912
+ else:
913
+ return x_3
914
+
915
+ elif (
916
+ (comparer.Compare(MapTreeLeaf_2__get_Key(m2), hi) <= 0)
917
+ if (comparer.Compare(lo, MapTreeLeaf_2__get_Key(m2)) <= 0)
918
+ else False
919
+ ):
920
+ return f_1(MapTreeLeaf_2__get_Key(m2), MapTreeLeaf_2__get_Value(m2), x_1)
921
+
922
+ else:
923
+ return x_1
924
+
925
+ else:
926
+ return x_1
927
+
928
+ break
929
+
930
+ if comparer.Compare(lo, hi) == 1:
931
+ return x
932
+
933
+ else:
934
+ return fold_from_to(f, m, x)
935
+
936
+
937
+ def MapTreeModule_foldSection(
938
+ comparer: IComparer_1[Any],
939
+ lo: Any,
940
+ hi: Any,
941
+ f: Callable[[_KEY, __A, __B], __B],
942
+ m: MapTreeLeaf_2[Any, Any] | None,
943
+ x: Any,
944
+ ) -> Any:
945
+ return MapTreeModule_foldSectionOpt(comparer, lo, hi, f, m, x)
946
+
947
+
948
+ def MapTreeModule_toList(m: MapTreeLeaf_2[Any, Any] | None = None) -> FSharpList[tuple[_KEY, _VALUE]]:
949
+ def loop(
950
+ m_1_mut: MapTreeLeaf_2[_KEY, _VALUE] | None, acc_mut: FSharpList[tuple[_KEY, _VALUE]], m: Any = m
951
+ ) -> FSharpList[tuple[_KEY, _VALUE]]:
952
+ while True:
953
+ (m_1, acc) = (m_1_mut, acc_mut)
954
+ if m_1 is not None:
955
+ m2: MapTreeLeaf_2[_KEY, _VALUE] = m_1
956
+ if isinstance(m2, MapTreeNode_2):
957
+ m_1_mut = MapTreeNode_2__get_Left(m2)
958
+ acc_mut = cons(
959
+ (MapTreeLeaf_2__get_Key(m2), MapTreeLeaf_2__get_Value(m2)),
960
+ loop(MapTreeNode_2__get_Right(m2), acc),
961
+ )
962
+ continue
963
+
964
+ else:
965
+ return cons((MapTreeLeaf_2__get_Key(m2), MapTreeLeaf_2__get_Value(m2)), acc)
966
+
967
+ else:
968
+ return acc
969
+
970
+ break
971
+
972
+ return loop(m, empty_1())
973
+
974
+
975
+ def MapTreeModule_copyToArray(m: MapTreeLeaf_2[Any, Any] | None, arr: Array[Any], i: int) -> None:
976
+ j: int = i or 0
977
+
978
+ def _arrow253(x: __A, y: __B, m: Any = m, arr: Any = arr, i: Any = i) -> None:
979
+ nonlocal j
980
+ arr[j] = (x, y)
981
+ j = (j + 1) or 0
982
+
983
+ MapTreeModule_iter(_arrow253, m)
984
+
985
+
986
+ def MapTreeModule_toArray(m: MapTreeLeaf_2[Any, Any] | None = None) -> Array[Any]:
987
+ n: int = MapTreeModule_size(m) or 0
988
+ res: Array[Any] = fill([0] * n, 0, n, (None, None))
989
+ MapTreeModule_copyToArray(m, res, 0)
990
+ return res
991
+
992
+
993
+ def MapTreeModule_ofList(comparer: IComparer_1[Any], l: FSharpList[tuple[__A, __B]]) -> MapTreeLeaf_2[Any, Any] | None:
994
+ def _arrow254(
995
+ acc: MapTreeLeaf_2[__A, __B] | None, tupled_arg: tuple[__A, __B], comparer: Any = comparer, l: Any = l
996
+ ) -> MapTreeLeaf_2[__A, __B] | None:
997
+ return MapTreeModule_add(comparer, tupled_arg[0], tupled_arg[1], acc)
998
+
999
+ return fold_1(_arrow254, MapTreeModule_empty(), l)
1000
+
1001
+
1002
+ def MapTreeModule_mkFromEnumerator(
1003
+ comparer_mut: IComparer_1[Any], acc_mut: MapTreeLeaf_2[Any, Any] | None, e_mut: IEnumerator[tuple[__A, __B]]
1004
+ ) -> MapTreeLeaf_2[Any, Any] | None:
1005
+ while True:
1006
+ (comparer, acc, e) = (comparer_mut, acc_mut, e_mut)
1007
+ if e.System_Collections_IEnumerator_MoveNext():
1008
+ pattern_input: tuple[__A, __B] = e.System_Collections_Generic_IEnumerator_1_get_Current()
1009
+ comparer_mut = comparer
1010
+ acc_mut = MapTreeModule_add(comparer, pattern_input[0], pattern_input[1], acc)
1011
+ e_mut = e
1012
+ continue
1013
+
1014
+ else:
1015
+ return acc
1016
+
1017
+ break
1018
+
1019
+
1020
+ def MapTreeModule_ofArray(
1021
+ comparer: IComparer_1[Any], arr: Array[tuple[_KEY, _VALUE]]
1022
+ ) -> MapTreeLeaf_2[Any, Any] | None:
1023
+ res: MapTreeLeaf_2[_KEY, _VALUE] | None = MapTreeModule_empty()
1024
+ for idx in range(0, (len(arr) - 1) + 1, 1):
1025
+ for_loop_var: tuple[_KEY, _VALUE] = arr[idx]
1026
+ res = MapTreeModule_add(comparer, for_loop_var[0], for_loop_var[1], res)
1027
+ return res
1028
+
1029
+
1030
+ def MapTreeModule_ofSeq(
1031
+ comparer: IComparer_1[Any], c: IEnumerable_1[tuple[_KEY, _VALUE]]
1032
+ ) -> MapTreeLeaf_2[Any, Any] | None:
1033
+ if is_array_like(c):
1034
+ return MapTreeModule_ofArray(comparer, c)
1035
+
1036
+ elif isinstance(c, FSharpList):
1037
+ return MapTreeModule_ofList(comparer, c)
1038
+
1039
+ else:
1040
+ with get_enumerator(c) as ie:
1041
+ return MapTreeModule_mkFromEnumerator(comparer, MapTreeModule_empty(), ie)
1042
+
1043
+
1044
+ def _expr255(gen0: TypeInfo, gen1: TypeInfo) -> TypeInfo:
1045
+ return record_type(
1046
+ "Map.MapTreeModule.MapIterator`2",
1047
+ [gen0, gen1],
1048
+ MapTreeModule_MapIterator_2,
1049
+ lambda: [("stack", list_type(option_type(MapTreeLeaf_2_reflection(gen0, gen1)))), ("started", bool_type)],
1050
+ )
1051
+
1052
+
1053
+ @dataclass(eq=False, repr=False, slots=True)
1054
+ class MapTreeModule_MapIterator_2(Record, Generic[_KEY, _VALUE]):
1055
+ stack: FSharpList[MapTreeLeaf_2[_KEY, _VALUE] | None]
1056
+ started: bool
1057
+
1058
+
1059
+ MapTreeModule_MapIterator_2_reflection = _expr255
1060
+
1061
+
1062
+ def MapTreeModule_collapseLHS(
1063
+ stack_mut: FSharpList[MapTreeLeaf_2[Any, Any] | None],
1064
+ ) -> FSharpList[MapTreeLeaf_2[Any, Any] | None]:
1065
+ while True:
1066
+ (stack,) = (stack_mut,)
1067
+ if not is_empty_1(stack):
1068
+ rest: FSharpList[MapTreeLeaf_2[_KEY, _VALUE] | None] = tail(stack)
1069
+ m: MapTreeLeaf_2[_KEY, _VALUE] | None = head(stack)
1070
+ if m is not None:
1071
+ m2: MapTreeLeaf_2[_KEY, _VALUE] = m
1072
+ if isinstance(m2, MapTreeNode_2):
1073
+ stack_mut = of_array_with_tail(
1074
+ [
1075
+ MapTreeNode_2__get_Left(m2),
1076
+ MapTreeLeaf_2__ctor_5BDDA1(MapTreeLeaf_2__get_Key(m2), MapTreeLeaf_2__get_Value(m2)),
1077
+ MapTreeNode_2__get_Right(m2),
1078
+ ],
1079
+ rest,
1080
+ )
1081
+ continue
1082
+
1083
+ else:
1084
+ return stack
1085
+
1086
+ else:
1087
+ stack_mut = rest
1088
+ continue
1089
+
1090
+ else:
1091
+ return empty_1()
1092
+
1093
+ break
1094
+
1095
+
1096
+ def MapTreeModule_mkIterator(m: MapTreeLeaf_2[Any, Any] | None = None) -> MapTreeModule_MapIterator_2[Any, Any]:
1097
+ return MapTreeModule_MapIterator_2(MapTreeModule_collapseLHS(singleton(m)), False)
1098
+
1099
+
1100
+ def MapTreeModule_notStarted(__unit: None = None) -> Any:
1101
+ raise Exception("enumeration not started")
1102
+
1103
+
1104
+ def MapTreeModule_alreadyFinished(__unit: None = None) -> Any:
1105
+ raise Exception("enumeration already finished")
1106
+
1107
+
1108
+ def MapTreeModule_current(i: MapTreeModule_MapIterator_2[Any, Any]) -> Any:
1109
+ if i.started:
1110
+ match_value: FSharpList[MapTreeLeaf_2[_KEY, _VALUE] | None] = i.stack
1111
+ if not is_empty_1(match_value):
1112
+ if head(match_value) is not None:
1113
+ m: MapTreeLeaf_2[_KEY, _VALUE] = head(match_value)
1114
+ if isinstance(m, MapTreeNode_2):
1115
+ raise Exception("Please report error: Map iterator, unexpected stack for current")
1116
+
1117
+ else:
1118
+ return (MapTreeLeaf_2__get_Key(m), MapTreeLeaf_2__get_Value(m))
1119
+
1120
+ else:
1121
+ raise Exception("Please report error: Map iterator, unexpected stack for current")
1122
+
1123
+ else:
1124
+ return MapTreeModule_alreadyFinished()
1125
+
1126
+ else:
1127
+ return MapTreeModule_notStarted()
1128
+
1129
+
1130
+ def MapTreeModule_moveNext(i: MapTreeModule_MapIterator_2[Any, Any]) -> bool:
1131
+ if i.started:
1132
+ match_value: FSharpList[MapTreeLeaf_2[_KEY, _VALUE] | None] = i.stack
1133
+ if not is_empty_1(match_value):
1134
+ if head(match_value) is not None:
1135
+ m: MapTreeLeaf_2[_KEY, _VALUE] = head(match_value)
1136
+ if isinstance(m, MapTreeNode_2):
1137
+ raise Exception("Please report error: Map iterator, unexpected stack for moveNext")
1138
+
1139
+ else:
1140
+ i.stack = MapTreeModule_collapseLHS(tail(match_value))
1141
+ return not is_empty_1(i.stack)
1142
+
1143
+ else:
1144
+ raise Exception("Please report error: Map iterator, unexpected stack for moveNext")
1145
+
1146
+ else:
1147
+ return False
1148
+
1149
+ else:
1150
+ i.started = True
1151
+ return not is_empty_1(i.stack)
1152
+
1153
+
1154
+ def MapTreeModule_mkIEnumerator(m: MapTreeLeaf_2[Any, Any] | None = None) -> IEnumerator[Any]:
1155
+ i: MapTreeModule_MapIterator_2[_A, _B] = MapTreeModule_mkIterator(m)
1156
+
1157
+ class ObjectExpr256(IEnumerator[Any]):
1158
+ def System_Collections_Generic_IEnumerator_1_get_Current(self, __unit: None = None, m: Any = m) -> Any:
1159
+ return MapTreeModule_current(i)
1160
+
1161
+ def System_Collections_IEnumerator_get_Current(self, __unit: None = None, m: Any = m) -> Any:
1162
+ return MapTreeModule_current(i)
1163
+
1164
+ def System_Collections_IEnumerator_MoveNext(self, __unit: None = None, m: Any = m) -> bool:
1165
+ return MapTreeModule_moveNext(i)
1166
+
1167
+ def System_Collections_IEnumerator_Reset(self, __unit: None = None, m: Any = m) -> None:
1168
+ nonlocal i
1169
+ i = MapTreeModule_mkIterator(m)
1170
+
1171
+ def Dispose(self, __unit: None = None, m: Any = m) -> None:
1172
+ pass
1173
+
1174
+ return ObjectExpr256()
1175
+
1176
+
1177
+ def MapTreeModule_toSeq(s: MapTreeLeaf_2[Any, Any] | None = None) -> IEnumerable_1[Any]:
1178
+ def generator(en_1: IEnumerator[Any], s: Any = s) -> tuple[Any, IEnumerator[Any]] | None:
1179
+ if en_1.System_Collections_IEnumerator_MoveNext():
1180
+ return (en_1.System_Collections_Generic_IEnumerator_1_get_Current(), en_1)
1181
+
1182
+ else:
1183
+ return None
1184
+
1185
+ return unfold(generator, MapTreeModule_mkIEnumerator(s))
1186
+
1187
+
1188
+ def MapTreeModule_leftmost(m_mut: MapTreeLeaf_2[Any, Any] | None) -> tuple[_KEY, _VALUE]:
1189
+ while True:
1190
+ (m,) = (m_mut,)
1191
+ if m is not None:
1192
+ m2: MapTreeLeaf_2[_KEY, _VALUE] = m
1193
+ (pattern_matching_result, nd_1) = (None, None)
1194
+ if isinstance(m2, MapTreeNode_2):
1195
+ if MapTreeNode_2__get_Height(m2) > 1:
1196
+ pattern_matching_result = 0
1197
+ nd_1 = m2
1198
+
1199
+ else:
1200
+ pattern_matching_result = 1
1201
+
1202
+ else:
1203
+ pattern_matching_result = 1
1204
+
1205
+ if pattern_matching_result == 0:
1206
+ if MapTreeNode_2__get_Left(nd_1) is None:
1207
+ return (MapTreeLeaf_2__get_Key(nd_1), MapTreeLeaf_2__get_Value(nd_1))
1208
+
1209
+ else:
1210
+ m_mut = MapTreeNode_2__get_Left(nd_1)
1211
+ continue
1212
+
1213
+ elif pattern_matching_result == 1:
1214
+ return (MapTreeLeaf_2__get_Key(m2), MapTreeLeaf_2__get_Value(m2))
1215
+
1216
+ else:
1217
+ raise Exception()
1218
+
1219
+ break
1220
+
1221
+
1222
+ def MapTreeModule_rightmost(m_mut: MapTreeLeaf_2[Any, Any] | None) -> tuple[_KEY, _VALUE]:
1223
+ while True:
1224
+ (m,) = (m_mut,)
1225
+ if m is not None:
1226
+ m2: MapTreeLeaf_2[_KEY, _VALUE] = m
1227
+ (pattern_matching_result, nd_1) = (None, None)
1228
+ if isinstance(m2, MapTreeNode_2):
1229
+ if MapTreeNode_2__get_Height(m2) > 1:
1230
+ pattern_matching_result = 0
1231
+ nd_1 = m2
1232
+
1233
+ else:
1234
+ pattern_matching_result = 1
1235
+
1236
+ else:
1237
+ pattern_matching_result = 1
1238
+
1239
+ if pattern_matching_result == 0:
1240
+ if MapTreeNode_2__get_Right(nd_1) is None:
1241
+ return (MapTreeLeaf_2__get_Key(nd_1), MapTreeLeaf_2__get_Value(nd_1))
1242
+
1243
+ else:
1244
+ m_mut = MapTreeNode_2__get_Right(nd_1)
1245
+ continue
1246
+
1247
+ elif pattern_matching_result == 1:
1248
+ return (MapTreeLeaf_2__get_Key(m2), MapTreeLeaf_2__get_Value(m2))
1249
+
1250
+ else:
1251
+ raise Exception()
1252
+
1253
+ break
1254
+
1255
+
1256
+ def _expr259(gen0: TypeInfo, gen1: TypeInfo) -> TypeInfo:
1257
+ return class_type("Map.FSharpMap", [gen0, gen1], FSharpMap)
1258
+
1259
+
1260
+ class FSharpMap(Generic[_KEY, _VALUE]):
1261
+ def __init__(self, comparer: IComparer_1[Any], tree: MapTreeLeaf_2[Any, Any] | None = None) -> None:
1262
+ self.comparer: IComparer_1[_KEY] = comparer
1263
+ self.tree: MapTreeLeaf_2[_KEY, _VALUE] | None = tree
1264
+
1265
+ def __hash__(self, __unit: None = None) -> int:
1266
+ this: FSharpMap[_KEY, _VALUE] = self
1267
+ return FSharpMap__ComputeHashCode(this)
1268
+
1269
+ def __eq__(self, that: Any = None) -> bool:
1270
+ this: FSharpMap[_KEY, _VALUE] = self
1271
+ if isinstance(that, FSharpMap):
1272
+ with get_enumerator(this) as e1:
1273
+ with get_enumerator(that) as e2:
1274
+
1275
+ def loop(__unit: None = None) -> bool:
1276
+ m1: bool = e1.System_Collections_IEnumerator_MoveNext()
1277
+ if m1 == e2.System_Collections_IEnumerator_MoveNext():
1278
+ if not m1:
1279
+ return True
1280
+
1281
+ else:
1282
+ e1c: Any = e1.System_Collections_Generic_IEnumerator_1_get_Current()
1283
+ e2c: Any = e2.System_Collections_Generic_IEnumerator_1_get_Current()
1284
+ if equals(e1c[1], e2c[1]) if equals(e1c[0], e2c[0]) else False:
1285
+ return loop(None)
1286
+
1287
+ else:
1288
+ return False
1289
+
1290
+ else:
1291
+ return False
1292
+
1293
+ return loop(None)
1294
+
1295
+ else:
1296
+ return False
1297
+
1298
+ def __str__(self, __unit: None = None) -> str:
1299
+ this: FSharpMap[_KEY, _VALUE] = self
1300
+
1301
+ def _arrow257(kv: Any) -> str:
1302
+ return format("({0}, {1})", kv[0], kv[1])
1303
+
1304
+ return ("map [" + join("; ", map_1(_arrow257, this))) + "]"
1305
+
1306
+ @property
1307
+ def Symbol_toStringTag(self, __unit: None = None) -> str:
1308
+ return "FSharpMap"
1309
+
1310
+ def to_json(self, __unit: None = None) -> Any:
1311
+ this: FSharpMap[_KEY, _VALUE] = self
1312
+ return Array.from_(this)
1313
+
1314
+ def GetEnumerator(self, __unit: None = None) -> IEnumerator[Any]:
1315
+ _: FSharpMap[_KEY, _VALUE] = self
1316
+ return MapTreeModule_mkIEnumerator(_.tree)
1317
+
1318
+ def __iter__(self) -> IEnumerator[Any]:
1319
+ return to_iterator(self.GetEnumerator())
1320
+
1321
+ def System_Collections_IEnumerable_GetEnumerator(self, __unit: None = None) -> IEnumerator[Any]:
1322
+ _: FSharpMap[_KEY, _VALUE] = self
1323
+ return MapTreeModule_mkIEnumerator(_.tree)
1324
+
1325
+ def __cmp__(self, obj: Any = None) -> int:
1326
+ m: FSharpMap[_KEY, _VALUE] = self
1327
+ if isinstance(obj, FSharpMap):
1328
+
1329
+ def _arrow258(kvp1: Any, kvp2: Any) -> int:
1330
+ c: int = m.comparer.Compare(kvp1[0], kvp2[0]) or 0
1331
+ return c if (c != 0) else compare(kvp1[1], kvp2[1])
1332
+
1333
+ return compare_with(_arrow258, m, obj)
1334
+
1335
+ else:
1336
+ raise Exception("not comparable\\nParameter name: obj")
1337
+
1338
+ def System_Collections_Generic_ICollection_1_Add2B595(self, x: Any) -> None:
1339
+ ignore(x)
1340
+ raise Exception("Map cannot be mutated")
1341
+
1342
+ def System_Collections_Generic_ICollection_1_Clear(self, __unit: None = None) -> None:
1343
+ raise Exception("Map cannot be mutated")
1344
+
1345
+ def System_Collections_Generic_ICollection_1_Remove2B595(self, x: Any) -> bool:
1346
+ ignore(x)
1347
+ raise Exception("Map cannot be mutated")
1348
+
1349
+ def System_Collections_Generic_ICollection_1_Contains2B595(self, x: Any) -> bool:
1350
+ m: FSharpMap[_KEY, _VALUE] = self
1351
+ return equals(FSharpMap__get_Item(m, x[0]), x[1]) if FSharpMap__ContainsKey(m, x[0]) else False
1352
+
1353
+ def System_Collections_Generic_ICollection_1_CopyToZ3B4C077E(self, arr: Array[Any], i: int) -> None:
1354
+ m: FSharpMap[_KEY, _VALUE] = self
1355
+ MapTreeModule_copyToArray(m.tree, arr, i)
1356
+
1357
+ def System_Collections_Generic_ICollection_1_get_IsReadOnly(self, __unit: None = None) -> bool:
1358
+ return True
1359
+
1360
+ def __len__(self, __unit: None = None) -> int:
1361
+ m: FSharpMap[_KEY, _VALUE] = self
1362
+ return FSharpMap__get_Count(m)
1363
+
1364
+ def __len__(self, __unit: None = None) -> int:
1365
+ m: FSharpMap[_KEY, _VALUE] = self
1366
+ return FSharpMap__get_Count(m)
1367
+
1368
+ @property
1369
+ def size(self, __unit: None = None) -> int:
1370
+ m: FSharpMap[_KEY, _VALUE] = self
1371
+ return FSharpMap__get_Count(m)
1372
+
1373
+ def clear(self, __unit: None = None) -> None:
1374
+ raise Exception("Map cannot be mutated")
1375
+
1376
+ def __delitem__(self, _arg: _KEY | None = None) -> bool:
1377
+ raise Exception("Map cannot be mutated")
1378
+ return False
1379
+
1380
+ def entries(self, __unit: None = None) -> IEnumerable_1[tuple[_KEY, _VALUE]]:
1381
+ m: FSharpMap[_KEY, _VALUE] = self
1382
+
1383
+ def mapping(p: Any) -> tuple[_KEY, _VALUE]:
1384
+ return (p[0], p[1])
1385
+
1386
+ return map_1(mapping, m)
1387
+
1388
+ def __getitem__(self, k: _KEY | None = None) -> _VALUE:
1389
+ m: FSharpMap[_KEY, _VALUE] = self
1390
+ return FSharpMap__get_Item(m, k)
1391
+
1392
+ def __contains__(self, k: _KEY | None = None) -> bool:
1393
+ m: FSharpMap[_KEY, _VALUE] = self
1394
+ return FSharpMap__ContainsKey(m, k)
1395
+
1396
+ def keys(self, __unit: None = None) -> IEnumerable_1[_KEY]:
1397
+ m: FSharpMap[_KEY, _VALUE] = self
1398
+
1399
+ def mapping(p: Any) -> _KEY:
1400
+ return p[0]
1401
+
1402
+ return map_1(mapping, m)
1403
+
1404
+ def __setitem__(self, k: _KEY, v: _VALUE) -> Map_2[_KEY, _VALUE]:
1405
+ m: FSharpMap[_KEY, _VALUE] = self
1406
+ raise Exception("Map cannot be mutated")
1407
+ return m
1408
+
1409
+ def values(self, __unit: None = None) -> IEnumerable_1[_VALUE]:
1410
+ m: FSharpMap[_KEY, _VALUE] = self
1411
+
1412
+ def mapping(p: Any) -> _VALUE:
1413
+ return p[1]
1414
+
1415
+ return map_1(mapping, m)
1416
+
1417
+ def for_each(self, f: Callable[[_VALUE, _KEY, Map_2[_KEY, _VALUE]], None], this_arg: Any | None = None) -> None:
1418
+ m: FSharpMap[_KEY, _VALUE] = self
1419
+
1420
+ def action(p: Any) -> None:
1421
+ f(p[1], p[0], m)
1422
+
1423
+ iterate_1(action, m)
1424
+
1425
+
1426
+ FSharpMap_reflection = _expr259
1427
+
1428
+
1429
+ def FSharpMap__ctor(comparer: IComparer_1[Any], tree: MapTreeLeaf_2[Any, Any] | None = None) -> FSharpMap[_KEY, _VALUE]:
1430
+ return FSharpMap(comparer, tree)
1431
+
1432
+
1433
+ def FSharpMap_Empty(comparer: IComparer_1[Any]) -> FSharpMap[Any, Any]:
1434
+ return FSharpMap__ctor(comparer, MapTreeModule_empty())
1435
+
1436
+
1437
+ def FSharpMap__get_Comparer(m: FSharpMap[Any, Any]) -> IComparer_1[Any]:
1438
+ return m.comparer
1439
+
1440
+
1441
+ def FSharpMap__get_Tree(m: FSharpMap[Any, Any]) -> MapTreeLeaf_2[Any, Any] | None:
1442
+ return m.tree
1443
+
1444
+
1445
+ def FSharpMap__Add(m: FSharpMap[Any, Any], key: Any, value: Any) -> FSharpMap[Any, Any]:
1446
+ return FSharpMap__ctor(m.comparer, MapTreeModule_add(m.comparer, key, value, m.tree))
1447
+
1448
+
1449
+ def FSharpMap__Change(
1450
+ m: FSharpMap[Any, Any], key: Any, f: Callable[[_VALUE | None], _VALUE | None]
1451
+ ) -> FSharpMap[Any, Any]:
1452
+ return FSharpMap__ctor(m.comparer, MapTreeModule_change(m.comparer, key, f, m.tree))
1453
+
1454
+
1455
+ def FSharpMap__get_IsEmpty(m: FSharpMap[Any, Any]) -> bool:
1456
+ return m.tree is None
1457
+
1458
+
1459
+ def FSharpMap__get_Item(m: FSharpMap[Any, Any], key: Any) -> Any:
1460
+ return MapTreeModule_find(m.comparer, key, m.tree)
1461
+
1462
+
1463
+ def FSharpMap__TryPick(m: FSharpMap[Any, Any], f: Callable[[_KEY, _VALUE], __A | None]) -> Any | None:
1464
+ return MapTreeModule_tryPick(f, m.tree)
1465
+
1466
+
1467
+ def FSharpMap__Exists(m: FSharpMap[Any, Any], predicate: Callable[[_KEY, _VALUE], bool]) -> bool:
1468
+ return MapTreeModule_exists(predicate, m.tree)
1469
+
1470
+
1471
+ def FSharpMap__Filter(m: FSharpMap[Any, Any], predicate: Callable[[_KEY, _VALUE], bool]) -> FSharpMap[Any, Any]:
1472
+ return FSharpMap__ctor(m.comparer, MapTreeModule_filter(m.comparer, predicate, m.tree))
1473
+
1474
+
1475
+ def FSharpMap__ForAll(m: FSharpMap[Any, Any], predicate: Callable[[_KEY, _VALUE], bool]) -> bool:
1476
+ return MapTreeModule_forall(predicate, m.tree)
1477
+
1478
+
1479
+ def FSharpMap__Fold(m: FSharpMap[Any, Any], f: Callable[[_KEY, _VALUE, __A], __A], acc: Any) -> Any:
1480
+ return MapTreeModule_foldBack(f, m.tree, acc)
1481
+
1482
+
1483
+ def FSharpMap__FoldSection(
1484
+ m: FSharpMap[Any, Any], lo: Any, hi: Any, f: Callable[[_KEY, _VALUE, _Z], _Z], acc: Any
1485
+ ) -> Any:
1486
+ return MapTreeModule_foldSection(m.comparer, lo, hi, f, m.tree, acc)
1487
+
1488
+
1489
+ def FSharpMap__Iterate(m: FSharpMap[Any, Any], f: Callable[[_KEY, _VALUE], None]) -> None:
1490
+ MapTreeModule_iter(f, m.tree)
1491
+
1492
+
1493
+ def FSharpMap__MapRange(m: FSharpMap[Any, Any], f: Callable[[_VALUE], _RESULT]) -> FSharpMap[Any, Any]:
1494
+ return FSharpMap__ctor(m.comparer, MapTreeModule_map(f, m.tree))
1495
+
1496
+
1497
+ def FSharpMap__Map(m: FSharpMap[Any, Any], f: Callable[[_KEY, _VALUE], _B]) -> FSharpMap[Any, Any]:
1498
+ return FSharpMap__ctor(m.comparer, MapTreeModule_mapi(f, m.tree))
1499
+
1500
+
1501
+ def FSharpMap__Partition(
1502
+ m: FSharpMap[Any, Any], predicate: Callable[[_KEY, _VALUE], bool]
1503
+ ) -> tuple[FSharpMap[_KEY, _VALUE], FSharpMap[_KEY, _VALUE]]:
1504
+ pattern_input: tuple[MapTreeLeaf_2[_KEY, _VALUE] | None, MapTreeLeaf_2[_KEY, _VALUE] | None] = (
1505
+ MapTreeModule_partition(m.comparer, predicate, m.tree)
1506
+ )
1507
+ return (FSharpMap__ctor(m.comparer, pattern_input[0]), FSharpMap__ctor(m.comparer, pattern_input[1]))
1508
+
1509
+
1510
+ def FSharpMap__get_Count(m: FSharpMap[Any, Any]) -> int:
1511
+ return MapTreeModule_size(m.tree)
1512
+
1513
+
1514
+ def FSharpMap__ContainsKey(m: FSharpMap[Any, Any], key: Any) -> bool:
1515
+ return MapTreeModule_mem(m.comparer, key, m.tree)
1516
+
1517
+
1518
+ def FSharpMap__Remove(m: FSharpMap[Any, Any], key: Any) -> FSharpMap[Any, Any]:
1519
+ return FSharpMap__ctor(m.comparer, MapTreeModule_remove(m.comparer, key, m.tree))
1520
+
1521
+
1522
+ def FSharpMap__TryGetValue(_: FSharpMap[Any, Any], key: Any, value: FSharpRef[_VALUE]) -> bool:
1523
+ match_value: _VALUE | None = MapTreeModule_tryFind(_.comparer, key, _.tree)
1524
+ if match_value is None:
1525
+ return False
1526
+
1527
+ else:
1528
+ v: _VALUE = value_1(match_value)
1529
+ value.contents = v
1530
+ return True
1531
+
1532
+
1533
+ def FSharpMap__get_Keys(_: FSharpMap[Any, Any]) -> ICollection[Any]:
1534
+ def mapping(kvp: Any, _: Any = _) -> _KEY:
1535
+ return kvp[0]
1536
+
1537
+ return map_2(mapping, MapTreeModule_toArray(_.tree), None)
1538
+
1539
+
1540
+ def FSharpMap__get_Values(_: FSharpMap[Any, Any]) -> ICollection[Any]:
1541
+ def mapping(kvp: Any, _: Any = _) -> _VALUE:
1542
+ return kvp[1]
1543
+
1544
+ return map_2(mapping, MapTreeModule_toArray(_.tree), None)
1545
+
1546
+
1547
+ def FSharpMap__get_MinKeyValue(m: FSharpMap[Any, Any]) -> tuple[_KEY, _VALUE]:
1548
+ return MapTreeModule_leftmost(m.tree)
1549
+
1550
+
1551
+ def FSharpMap__get_MaxKeyValue(m: FSharpMap[Any, Any]) -> tuple[_KEY, _VALUE]:
1552
+ return MapTreeModule_rightmost(m.tree)
1553
+
1554
+
1555
+ def FSharpMap__TryFind(m: FSharpMap[Any, Any], key: Any) -> Any | None:
1556
+ return MapTreeModule_tryFind(m.comparer, key, m.tree)
1557
+
1558
+
1559
+ def FSharpMap__ToList(m: FSharpMap[Any, Any]) -> FSharpList[tuple[_KEY, _VALUE]]:
1560
+ return MapTreeModule_toList(m.tree)
1561
+
1562
+
1563
+ def FSharpMap__ToArray(m: FSharpMap[Any, Any]) -> Array[Any]:
1564
+ return MapTreeModule_toArray(m.tree)
1565
+
1566
+
1567
+ def FSharpMap__ComputeHashCode(this: FSharpMap[Any, Any]) -> int:
1568
+ def combine_hash(x: int, y: int, this: Any = this) -> int:
1569
+ return ((x << 1) + y) + 631
1570
+
1571
+ res: int = 0
1572
+ with get_enumerator(this) as enumerator:
1573
+ while enumerator.System_Collections_IEnumerator_MoveNext():
1574
+ active_pattern_result: tuple[_KEY, _VALUE] = (
1575
+ enumerator.System_Collections_Generic_IEnumerator_1_get_Current()
1576
+ )
1577
+ res = combine_hash(res, structural_hash(active_pattern_result[0])) or 0
1578
+ res = combine_hash(res, structural_hash(active_pattern_result[1])) or 0
1579
+ return res
1580
+
1581
+
1582
+ def is_empty(table: FSharpMap[Any, Any]) -> bool:
1583
+ return FSharpMap__get_IsEmpty(table)
1584
+
1585
+
1586
+ def add(key: Any, value: Any, table: FSharpMap[Any, Any]) -> FSharpMap[Any, Any]:
1587
+ return FSharpMap__Add(table, key, value)
1588
+
1589
+
1590
+ def change(key: Any, f: Callable[[__B | None], __B | None], table: FSharpMap[Any, Any]) -> FSharpMap[Any, Any]:
1591
+ return FSharpMap__Change(table, key, f)
1592
+
1593
+
1594
+ def find(key: Any, table: FSharpMap[Any, Any]) -> Any:
1595
+ return FSharpMap__get_Item(table, key)
1596
+
1597
+
1598
+ def try_find(key: Any, table: FSharpMap[Any, Any]) -> Any | None:
1599
+ return FSharpMap__TryFind(table, key)
1600
+
1601
+
1602
+ def remove(key: Any, table: FSharpMap[Any, Any]) -> FSharpMap[Any, Any]:
1603
+ return FSharpMap__Remove(table, key)
1604
+
1605
+
1606
+ def contains_key(key: Any, table: FSharpMap[Any, Any]) -> bool:
1607
+ return FSharpMap__ContainsKey(table, key)
1608
+
1609
+
1610
+ def iterate(action: Callable[[__A, __B], None], table: FSharpMap[Any, Any]) -> None:
1611
+ FSharpMap__Iterate(table, action)
1612
+
1613
+
1614
+ def try_pick(chooser: Callable[[__A, __B], __C | None], table: FSharpMap[Any, Any]) -> Any | None:
1615
+ return FSharpMap__TryPick(table, chooser)
1616
+
1617
+
1618
+ def pick(chooser: Callable[[__A, __B], __C | None], table: FSharpMap[Any, Any]) -> Any:
1619
+ match_value: __C | None = try_pick(chooser, table)
1620
+ if match_value is not None:
1621
+ return value_1(match_value)
1622
+
1623
+ else:
1624
+ raise Exception()
1625
+
1626
+
1627
+ def exists(predicate: Callable[[__A, __B], bool], table: FSharpMap[Any, Any]) -> bool:
1628
+ return FSharpMap__Exists(table, predicate)
1629
+
1630
+
1631
+ def filter(predicate: Callable[[__A, __B], bool], table: FSharpMap[Any, Any]) -> FSharpMap[Any, Any]:
1632
+ return FSharpMap__Filter(table, predicate)
1633
+
1634
+
1635
+ def partition(
1636
+ predicate: Callable[[__A, __B], bool], table: FSharpMap[Any, Any]
1637
+ ) -> tuple[FSharpMap[__A, __B], FSharpMap[__A, __B]]:
1638
+ return FSharpMap__Partition(table, predicate)
1639
+
1640
+
1641
+ def for_all(predicate: Callable[[__A, __B], bool], table: FSharpMap[Any, Any]) -> bool:
1642
+ return FSharpMap__ForAll(table, predicate)
1643
+
1644
+
1645
+ def map(mapping: Callable[[__A, __B], __C], table: FSharpMap[Any, Any]) -> FSharpMap[Any, Any]:
1646
+ return FSharpMap__Map(table, mapping)
1647
+
1648
+
1649
+ def fold(folder: Callable[[_STATE, _KEY, _T], _STATE], state: Any, table: FSharpMap[Any, Any]) -> Any:
1650
+ return MapTreeModule_fold(folder, state, FSharpMap__get_Tree(table))
1651
+
1652
+
1653
+ def fold_back(folder: Callable[[_KEY, _T, _STATE], _STATE], table: FSharpMap[Any, Any], state: Any) -> Any:
1654
+ return MapTreeModule_foldBack(folder, FSharpMap__get_Tree(table), state)
1655
+
1656
+
1657
+ def to_seq(table: FSharpMap[Any, Any]) -> IEnumerable_1[tuple[__A, __B]]:
1658
+ def mapping(kvp: Any, table: Any = table) -> tuple[__A, __B]:
1659
+ return (kvp[0], kvp[1])
1660
+
1661
+ return map_1(mapping, table)
1662
+
1663
+
1664
+ def find_key(predicate: Callable[[__A, __B], bool], table: FSharpMap[Any, Any]) -> Any:
1665
+ def chooser(kvp: Any, predicate: Any = predicate, table: Any = table) -> __A | None:
1666
+ k: __A = kvp[0]
1667
+ if predicate(k, kvp[1]):
1668
+ return some(k)
1669
+
1670
+ else:
1671
+ return None
1672
+
1673
+ return pick_1(chooser, table)
1674
+
1675
+
1676
+ def try_find_key(predicate: Callable[[__A, __B], bool], table: FSharpMap[Any, Any]) -> Any | None:
1677
+ def chooser(kvp: Any, predicate: Any = predicate, table: Any = table) -> __A | None:
1678
+ k: __A = kvp[0]
1679
+ if predicate(k, kvp[1]):
1680
+ return some(k)
1681
+
1682
+ else:
1683
+ return None
1684
+
1685
+ return try_pick_1(chooser, table)
1686
+
1687
+
1688
+ def of_list(elements: FSharpList[tuple[_KEY, _VALUE]], comparer: IComparer_1[Any]) -> FSharpMap[Any, Any]:
1689
+ return FSharpMap__ctor(comparer, MapTreeModule_ofSeq(comparer, elements))
1690
+
1691
+
1692
+ def of_seq(elements: IEnumerable_1[tuple[_T, __A]], comparer: IComparer_1[Any]) -> FSharpMap[Any, Any]:
1693
+ return FSharpMap__ctor(comparer, MapTreeModule_ofSeq(comparer, elements))
1694
+
1695
+
1696
+ def of_array(elements: Array[tuple[_KEY, _VALUE]], comparer: IComparer_1[Any]) -> FSharpMap[Any, Any]:
1697
+ return FSharpMap__ctor(comparer, MapTreeModule_ofSeq(comparer, elements))
1698
+
1699
+
1700
+ def to_list(table: FSharpMap[Any, Any]) -> FSharpList[tuple[__A, __B]]:
1701
+ return FSharpMap__ToList(table)
1702
+
1703
+
1704
+ def to_array(table: FSharpMap[Any, Any]) -> Array[Any]:
1705
+ return FSharpMap__ToArray(table)
1706
+
1707
+
1708
+ def keys(table: FSharpMap[Any, Any]) -> ICollection[Any]:
1709
+ return FSharpMap__get_Keys(table)
1710
+
1711
+
1712
+ def values(table: FSharpMap[Any, Any]) -> ICollection[Any]:
1713
+ return FSharpMap__get_Values(table)
1714
+
1715
+
1716
+ def min_key_value(table: FSharpMap[Any, Any]) -> tuple[__A, __B]:
1717
+ return FSharpMap__get_MinKeyValue(table)
1718
+
1719
+
1720
+ def max_key_value(table: FSharpMap[Any, Any]) -> tuple[__A, __B]:
1721
+ return FSharpMap__get_MaxKeyValue(table)
1722
+
1723
+
1724
+ def empty(comparer: IComparer_1[Any]) -> FSharpMap[Any, Any]:
1725
+ return FSharpMap_Empty(comparer)
1726
+
1727
+
1728
+ def count(table: FSharpMap[Any, Any]) -> int:
1729
+ return FSharpMap__get_Count(table)
1730
+
1731
+
1732
+ __all__ = [
1733
+ "MapTreeLeaf_2_reflection",
1734
+ "MapTreeLeaf_2__get_Key",
1735
+ "MapTreeLeaf_2__get_Value",
1736
+ "MapTreeNode_2_reflection",
1737
+ "MapTreeNode_2__get_Left",
1738
+ "MapTreeNode_2__get_Right",
1739
+ "MapTreeNode_2__get_Height",
1740
+ "MapTreeModule_empty",
1741
+ "MapTreeModule_sizeAux",
1742
+ "MapTreeModule_size",
1743
+ "MapTreeModule_mk",
1744
+ "MapTreeModule_rebalance",
1745
+ "MapTreeModule_add",
1746
+ "MapTreeModule_tryFind",
1747
+ "MapTreeModule_find",
1748
+ "MapTreeModule_partition1",
1749
+ "MapTreeModule_partitionAux",
1750
+ "MapTreeModule_partition",
1751
+ "MapTreeModule_filter1",
1752
+ "MapTreeModule_filterAux",
1753
+ "MapTreeModule_filter",
1754
+ "MapTreeModule_spliceOutSuccessor",
1755
+ "MapTreeModule_remove",
1756
+ "MapTreeModule_change",
1757
+ "MapTreeModule_mem",
1758
+ "MapTreeModule_iterOpt",
1759
+ "MapTreeModule_iter",
1760
+ "MapTreeModule_tryPickOpt",
1761
+ "MapTreeModule_tryPick",
1762
+ "MapTreeModule_existsOpt",
1763
+ "MapTreeModule_exists",
1764
+ "MapTreeModule_forallOpt",
1765
+ "MapTreeModule_forall",
1766
+ "MapTreeModule_map",
1767
+ "MapTreeModule_mapiOpt",
1768
+ "MapTreeModule_mapi",
1769
+ "MapTreeModule_foldBackOpt",
1770
+ "MapTreeModule_foldBack",
1771
+ "MapTreeModule_foldOpt",
1772
+ "MapTreeModule_fold",
1773
+ "MapTreeModule_foldSectionOpt",
1774
+ "MapTreeModule_foldSection",
1775
+ "MapTreeModule_toList",
1776
+ "MapTreeModule_copyToArray",
1777
+ "MapTreeModule_toArray",
1778
+ "MapTreeModule_ofList",
1779
+ "MapTreeModule_mkFromEnumerator",
1780
+ "MapTreeModule_ofArray",
1781
+ "MapTreeModule_ofSeq",
1782
+ "MapTreeModule_MapIterator_2_reflection",
1783
+ "MapTreeModule_collapseLHS",
1784
+ "MapTreeModule_mkIterator",
1785
+ "MapTreeModule_notStarted",
1786
+ "MapTreeModule_alreadyFinished",
1787
+ "MapTreeModule_current",
1788
+ "MapTreeModule_moveNext",
1789
+ "MapTreeModule_mkIEnumerator",
1790
+ "MapTreeModule_toSeq",
1791
+ "MapTreeModule_leftmost",
1792
+ "MapTreeModule_rightmost",
1793
+ "FSharpMap_reflection",
1794
+ "FSharpMap_Empty",
1795
+ "FSharpMap__get_Comparer",
1796
+ "FSharpMap__get_Tree",
1797
+ "FSharpMap__Add",
1798
+ "FSharpMap__Change",
1799
+ "FSharpMap__get_IsEmpty",
1800
+ "FSharpMap__get_Item",
1801
+ "FSharpMap__TryPick",
1802
+ "FSharpMap__Exists",
1803
+ "FSharpMap__Filter",
1804
+ "FSharpMap__ForAll",
1805
+ "FSharpMap__Fold",
1806
+ "FSharpMap__FoldSection",
1807
+ "FSharpMap__Iterate",
1808
+ "FSharpMap__MapRange",
1809
+ "FSharpMap__Map",
1810
+ "FSharpMap__Partition",
1811
+ "FSharpMap__get_Count",
1812
+ "FSharpMap__ContainsKey",
1813
+ "FSharpMap__Remove",
1814
+ "FSharpMap__TryGetValue",
1815
+ "FSharpMap__get_Keys",
1816
+ "FSharpMap__get_Values",
1817
+ "FSharpMap__get_MinKeyValue",
1818
+ "FSharpMap__get_MaxKeyValue",
1819
+ "FSharpMap__TryFind",
1820
+ "FSharpMap__ToList",
1821
+ "FSharpMap__ToArray",
1822
+ "FSharpMap__ComputeHashCode",
1823
+ "is_empty",
1824
+ "add",
1825
+ "change",
1826
+ "find",
1827
+ "try_find",
1828
+ "remove",
1829
+ "contains_key",
1830
+ "iterate",
1831
+ "try_pick",
1832
+ "pick",
1833
+ "exists",
1834
+ "filter",
1835
+ "partition",
1836
+ "for_all",
1837
+ "map",
1838
+ "fold",
1839
+ "fold_back",
1840
+ "to_seq",
1841
+ "find_key",
1842
+ "try_find_key",
1843
+ "of_list",
1844
+ "of_seq",
1845
+ "of_array",
1846
+ "to_list",
1847
+ "to_array",
1848
+ "keys",
1849
+ "values",
1850
+ "min_key_value",
1851
+ "max_key_value",
1852
+ "empty",
1853
+ "count",
1854
+ ]