@explorable-viz/fluid 0.0.23 → 0.7.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (334) hide show
  1. package/.spago/aff/v7.0.0/.editorconfig +13 -0
  2. package/.spago/aff/v7.0.0/.eslintrc.json +28 -0
  3. package/.spago/aff/v7.0.0/.gitignore +14 -0
  4. package/.spago/aff/v7.0.0/.tidyrc.json +10 -0
  5. package/.spago/affjax/v13.0.0/.editorconfig +13 -0
  6. package/.spago/affjax/v13.0.0/.eslintrc.json +28 -0
  7. package/.spago/affjax/v13.0.0/.gitignore +14 -0
  8. package/.spago/affjax/v13.0.0/.tidyrc.json +10 -0
  9. package/.spago/affjax-web/v1.0.0/.editorconfig +13 -0
  10. package/.spago/affjax-web/v1.0.0/.eslintrc.json +30 -0
  11. package/.spago/affjax-web/v1.0.0/.gitignore +14 -0
  12. package/.spago/affjax-web/v1.0.0/.tidyrc.json +10 -0
  13. package/.spago/argonaut-codecs/v9.0.0/.editorconfig +13 -0
  14. package/.spago/argonaut-codecs/v9.0.0/.gitignore +9 -0
  15. package/.spago/argonaut-codecs/v9.0.0/.tidyrc.json +10 -0
  16. package/.spago/argonaut-core/v7.0.0/.editorconfig +13 -0
  17. package/.spago/argonaut-core/v7.0.0/.eslintrc.json +29 -0
  18. package/.spago/argonaut-core/v7.0.0/.gitignore +14 -0
  19. package/.spago/argonaut-core/v7.0.0/.tidyrc.json +10 -0
  20. package/.spago/arraybuffer-types/v3.0.2/.editorconfig +13 -0
  21. package/.spago/arraybuffer-types/v3.0.2/.gitignore +9 -0
  22. package/.spago/arraybuffer-types/v3.0.2/.tidyrc.json +10 -0
  23. package/.spago/arrays/v7.0.0/.eslintrc.json +26 -0
  24. package/.spago/arrays/v7.0.0/.gitignore +9 -0
  25. package/.spago/assert/v6.0.0/.eslintrc.json +26 -0
  26. package/.spago/assert/v6.0.0/.gitignore +8 -0
  27. package/.spago/avar/v5.0.0/.editorconfig +13 -0
  28. package/.spago/avar/v5.0.0/.eslintrc.json +29 -0
  29. package/.spago/avar/v5.0.0/.gitignore +14 -0
  30. package/.spago/avar/v5.0.0/.tidyrc.json +10 -0
  31. package/.spago/bifunctors/v6.0.0/.gitignore +7 -0
  32. package/.spago/catenable-lists/v7.0.0/.gitignore +7 -0
  33. package/.spago/console/v6.0.0/.eslintrc.json +30 -0
  34. package/.spago/console/v6.0.0/.gitignore +9 -0
  35. package/.spago/const/v6.0.0/.gitignore +7 -0
  36. package/.spago/contravariant/v6.0.0/.gitignore +7 -0
  37. package/.spago/control/v6.0.0/.gitignore +7 -0
  38. package/.spago/datetime/v6.1.0/.eslintrc.json +26 -0
  39. package/.spago/datetime/v6.1.0/.gitignore +8 -0
  40. package/.spago/debug/v6.0.0/.eslintrc.json +36 -0
  41. package/.spago/debug/v6.0.0/.gitignore +8 -0
  42. package/.spago/distributive/v6.0.0/.gitignore +7 -0
  43. package/.spago/effect/v4.0.0/.eslintrc.json +26 -0
  44. package/.spago/effect/v4.0.0/.gitignore +8 -0
  45. package/.spago/either/v6.1.0/.gitignore +7 -0
  46. package/.spago/enums/v6.0.0/.gitignore +7 -0
  47. package/.spago/exceptions/v6.0.0/.eslintrc.json +26 -0
  48. package/.spago/exceptions/v6.0.0/.gitignore +8 -0
  49. package/.spago/exists/v6.0.0/.gitignore +7 -0
  50. package/.spago/filterable/v5.0.0/.gitignore +11 -0
  51. package/.spago/foldable-traversable/v6.0.0/.eslintrc.json +26 -0
  52. package/.spago/foldable-traversable/v6.0.0/.gitignore +8 -0
  53. package/.spago/foreign/v7.0.0/.eslintrc.json +26 -0
  54. package/.spago/foreign/v7.0.0/.gitignore +8 -0
  55. package/.spago/foreign-object/v4.0.0/.eslintrc.json +26 -0
  56. package/.spago/foreign-object/v4.0.0/.gitignore +8 -0
  57. package/.spago/fork/v6.0.0/.editorconfig +13 -0
  58. package/.spago/fork/v6.0.0/.gitignore +9 -0
  59. package/.spago/fork/v6.0.0/.tidyrc.json +10 -0
  60. package/.spago/form-urlencoded/v7.0.0/.editorconfig +13 -0
  61. package/.spago/form-urlencoded/v7.0.0/.gitignore +9 -0
  62. package/.spago/form-urlencoded/v7.0.0/.tidyrc.json +10 -0
  63. package/.spago/free/v7.0.0/.gitignore +8 -0
  64. package/.spago/functions/v6.0.0/.eslintrc.json +26 -0
  65. package/.spago/functions/v6.0.0/.gitignore +8 -0
  66. package/.spago/functors/v5.0.0/.gitignore +7 -0
  67. package/.spago/gen/v4.0.0/.gitignore +8 -0
  68. package/.spago/graphs/v8.0.0/.gitignore +7 -0
  69. package/.spago/http-methods/v6.0.0/.editorconfig +13 -0
  70. package/.spago/http-methods/v6.0.0/.gitignore +9 -0
  71. package/.spago/http-methods/v6.0.0/.tidyrc.json +10 -0
  72. package/.spago/identity/v6.0.0/.gitignore +7 -0
  73. package/.spago/integers/v6.0.0/.eslintrc.json +26 -0
  74. package/.spago/integers/v6.0.0/.gitignore +8 -0
  75. package/.spago/invariant/v6.0.0/.gitignore +7 -0
  76. package/.spago/js-date/v8.0.0/.editorconfig +13 -0
  77. package/.spago/js-date/v8.0.0/.eslintrc.json +29 -0
  78. package/.spago/js-date/v8.0.0/.gitignore +14 -0
  79. package/.spago/js-date/v8.0.0/.tidyrc.json +10 -0
  80. package/.spago/js-uri/v3.0.0/.eslintrc.json +30 -0
  81. package/.spago/js-uri/v3.0.0/.gitignore +14 -0
  82. package/.spago/js-uri/v3.0.0/.tidyrc.json +10 -0
  83. package/.spago/lazy/v6.0.0/.eslintrc.json +26 -0
  84. package/.spago/lazy/v6.0.0/.gitignore +8 -0
  85. package/.spago/lcg/v4.0.0/.gitignore +8 -0
  86. package/.spago/lists/v7.0.0/.gitignore +7 -0
  87. package/.spago/maybe/v6.0.0/.gitignore +7 -0
  88. package/.spago/media-types/v6.0.0/.editorconfig +13 -0
  89. package/.spago/media-types/v6.0.0/.gitignore +9 -0
  90. package/.spago/media-types/v6.0.0/.tidyrc.json +10 -0
  91. package/.spago/newtype/v5.0.0/.gitignore +7 -0
  92. package/.spago/node-buffer/v8.0.0/.eslintrc.json +26 -0
  93. package/.spago/node-buffer/v8.0.0/.gitignore +8 -0
  94. package/.spago/node-fs/v9.1.0/.eslintrc.json +29 -0
  95. package/.spago/node-fs/v9.1.0/.gitignore +9 -0
  96. package/.spago/node-http/v8.0.0/.eslintrc.json +29 -0
  97. package/.spago/node-http/v8.0.0/.gitignore +8 -0
  98. package/.spago/node-net/v4.0.0/.eslintrc.json +29 -0
  99. package/.spago/node-net/v4.0.0/.gitignore +8 -0
  100. package/.spago/node-path/v5.0.0/.eslintrc.json +26 -0
  101. package/.spago/node-path/v5.0.0/.gitignore +8 -0
  102. package/.spago/node-process/v10.0.0/.eslintrc.json +29 -0
  103. package/.spago/node-process/v10.0.0/.gitignore +8 -0
  104. package/.spago/node-process/v11.0.0/.eslintrc.json +29 -0
  105. package/.spago/node-process/v11.0.0/.gitignore +8 -0
  106. package/.spago/node-process/v11.1.0/.eslintrc.json +29 -0
  107. package/.spago/node-process/v11.1.0/.gitignore +8 -0
  108. package/.spago/node-process/v11.2.0/.eslintrc.json +29 -0
  109. package/.spago/node-process/v11.2.0/.gitignore +8 -0
  110. package/.spago/node-streams/v7.0.0/.eslintrc.json +29 -0
  111. package/.spago/node-streams/v7.0.0/.gitignore +8 -0
  112. package/.spago/node-url/v6.0.0/.eslintrc.json +26 -0
  113. package/.spago/node-url/v6.0.0/.gitignore +8 -0
  114. package/.spago/nonempty/v7.0.0/.gitignore +7 -0
  115. package/.spago/now/v6.0.0/.editorconfig +13 -0
  116. package/.spago/now/v6.0.0/.eslintrc.json +29 -0
  117. package/.spago/now/v6.0.0/.gitignore +14 -0
  118. package/.spago/now/v6.0.0/.tidyrc.json +10 -0
  119. package/.spago/nullable/v6.0.0/.editorconfig +13 -0
  120. package/.spago/nullable/v6.0.0/.eslintrc.json +29 -0
  121. package/.spago/nullable/v6.0.0/.gitignore +14 -0
  122. package/.spago/nullable/v6.0.0/.tidyrc.json +10 -0
  123. package/.spago/options/v7.0.0/.editorconfig +13 -0
  124. package/.spago/options/v7.0.0/.gitignore +9 -0
  125. package/.spago/options/v7.0.0/.tidyrc.json +10 -0
  126. package/.spago/optparse/v5.0.0/.gitignore +8 -0
  127. package/.spago/optparse/v5.0.0/.npmrc +1 -0
  128. package/.spago/optparse/v6.0.0/.gitignore +8 -0
  129. package/.spago/optparse/v6.0.0/.npmrc +1 -0
  130. package/.spago/ordered-collections/v3.0.0/.gitignore +8 -0
  131. package/.spago/orders/v6.0.0/.gitignore +7 -0
  132. package/.spago/parallel/v6.0.0/.gitignore +7 -0
  133. package/.spago/parsing/v10.0.0/.editorconfig +13 -0
  134. package/.spago/parsing/v10.0.0/.gitignore +10 -0
  135. package/.spago/parsing/v10.0.0/.tidyoperators +231 -0
  136. package/.spago/parsing/v10.0.0/.tidyrc.json +10 -0
  137. package/.spago/partial/v4.0.0/.eslintrc.json +26 -0
  138. package/.spago/partial/v4.0.0/.gitignore +8 -0
  139. package/.spago/posix-types/v6.0.0/.gitignore +7 -0
  140. package/.spago/prelude/v6.0.0/.eslintrc.json +26 -0
  141. package/.spago/prelude/v6.0.0/.gitignore +8 -0
  142. package/.spago/profunctor/v6.0.0/.gitignore +7 -0
  143. package/.spago/psci-support/v6.0.0/.eslintrc.json +28 -0
  144. package/.spago/psci-support/v6.0.0/.gitignore +8 -0
  145. package/.spago/quickcheck/v8.0.1/.eslintrc.json +26 -0
  146. package/.spago/quickcheck/v8.0.1/.gitignore +8 -0
  147. package/.spago/random/v6.0.0/.eslintrc.json +26 -0
  148. package/.spago/random/v6.0.0/.gitignore +8 -0
  149. package/.spago/record/v4.0.0/.eslintrc.json +26 -0
  150. package/.spago/record/v4.0.0/.gitignore +8 -0
  151. package/.spago/refs/v6.0.0/.eslintrc.json +26 -0
  152. package/.spago/refs/v6.0.0/.gitignore +8 -0
  153. package/.spago/st/v6.0.0/.eslintrc.json +26 -0
  154. package/.spago/st/v6.0.0/.gitignore +8 -0
  155. package/.spago/strings/v6.0.0/.eslintrc.json +26 -0
  156. package/.spago/strings/v6.0.0/.gitignore +8 -0
  157. package/.spago/tailrec/v6.0.0/.gitignore +7 -0
  158. package/.spago/transformers/v6.0.0/.gitignore +7 -0
  159. package/.spago/tuples/v7.0.0/.gitignore +7 -0
  160. package/.spago/type-equality/v4.0.1/.gitignore +7 -0
  161. package/.spago/typelevel-prelude/v7.0.0/.gitignore +8 -0
  162. package/.spago/unfoldable/v6.0.0/.eslintrc.json +26 -0
  163. package/.spago/unfoldable/v6.0.0/.gitignore +8 -0
  164. package/.spago/unicode/v6.0.0/.editorconfig +13 -0
  165. package/.spago/unicode/v6.0.0/.gitattributes +2 -0
  166. package/.spago/unicode/v6.0.0/.gitignore +19 -0
  167. package/.spago/unicode/v6.0.0/.tidyrc.json +10 -0
  168. package/.spago/unsafe-coerce/v6.0.0/.eslintrc.json +26 -0
  169. package/.spago/unsafe-coerce/v6.0.0/.gitignore +8 -0
  170. package/.spago/web-dom/v6.0.0/.eslintrc.json +29 -0
  171. package/.spago/web-dom/v6.0.0/.gitignore +9 -0
  172. package/.spago/web-events/v4.0.0/.eslintrc.json +29 -0
  173. package/.spago/web-events/v4.0.0/.gitignore +8 -0
  174. package/.spago/web-file/v4.0.0/.eslintrc.json +29 -0
  175. package/.spago/web-file/v4.0.0/.gitignore +8 -0
  176. package/.spago/web-html/v4.0.0/.eslintrc.json +29 -0
  177. package/.spago/web-html/v4.0.0/.gitignore +8 -0
  178. package/.spago/web-storage/v5.0.0/.eslintrc.json +29 -0
  179. package/.spago/web-storage/v5.0.0/.gitignore +8 -0
  180. package/.spago/web-xhr/v5.0.0/.eslintrc.json +29 -0
  181. package/.spago/web-xhr/v5.0.0/.gitignore +8 -0
  182. package/LICENSE +1 -1
  183. package/README.md +13 -7
  184. package/index.js +28285 -0
  185. package/package.json +30 -30
  186. package/dist/article/app.js +0 -40580
  187. package/dist/article/css/styles.css +0 -191
  188. package/dist/article/css/view-styles.css +0 -141
  189. package/dist/article/fluid/dataset/renewables-restricted.fld +0 -139
  190. package/dist/article/fluid/example/arithmetic.fld +0 -1
  191. package/dist/article/fluid/example/array.fld +0 -2
  192. package/dist/article/fluid/example/compose.fld +0 -2
  193. package/dist/article/fluid/example/desugar/list-comp-1.fld +0 -1
  194. package/dist/article/fluid/example/desugar/list-comp-10.fld +0 -1
  195. package/dist/article/fluid/example/desugar/list-comp-2.fld +0 -1
  196. package/dist/article/fluid/example/desugar/list-comp-3.fld +0 -1
  197. package/dist/article/fluid/example/desugar/list-comp-4.fld +0 -1
  198. package/dist/article/fluid/example/desugar/list-comp-5.fld +0 -1
  199. package/dist/article/fluid/example/desugar/list-comp-6.fld +0 -1
  200. package/dist/article/fluid/example/desugar/list-comp-7.fld +0 -1
  201. package/dist/article/fluid/example/desugar/list-comp-8.fld +0 -1
  202. package/dist/article/fluid/example/desugar/list-comp-9.fld +0 -1
  203. package/dist/article/fluid/example/desugar/list-enum.fld +0 -1
  204. package/dist/article/fluid/example/dicts.fld +0 -11
  205. package/dist/article/fluid/example/div-mod-quot-rem.fld +0 -4
  206. package/dist/article/fluid/example/factorial.fld +0 -6
  207. package/dist/article/fluid/example/filter.fld +0 -1
  208. package/dist/article/fluid/example/first-class-constr.fld +0 -1
  209. package/dist/article/fluid/example/flatten.fld +0 -12
  210. package/dist/article/fluid/example/foldr-sumSquares.fld +0 -1
  211. package/dist/article/fluid/example/graphics/background.fld +0 -7
  212. package/dist/article/fluid/example/graphics/grouped-bar-chart.fld +0 -9
  213. package/dist/article/fluid/example/graphics/line-chart.fld +0 -13
  214. package/dist/article/fluid/example/graphics/small-barchart.fld +0 -5
  215. package/dist/article/fluid/example/graphics/stacked-bar-chart.fld +0 -3
  216. package/dist/article/fluid/example/include-input-into-output.fld +0 -1
  217. package/dist/article/fluid/example/length.fld +0 -1
  218. package/dist/article/fluid/example/lexicalScoping.fld +0 -3
  219. package/dist/article/fluid/example/lib/some-constants.fld +0 -1
  220. package/dist/article/fluid/example/linked-inputs/energyscatter.fld +0 -24
  221. package/dist/article/fluid/example/linked-inputs/mini-energyscatter.fld +0 -30
  222. package/dist/article/fluid/example/linked-inputs/mini-non-renewables.fld +0 -3
  223. package/dist/article/fluid/example/linked-inputs/mini-renewables.fld +0 -6
  224. package/dist/article/fluid/example/linked-inputs/non-renewables.fld +0 -67
  225. package/dist/article/fluid/example/linked-inputs/renewables.fld +0 -301
  226. package/dist/article/fluid/example/linked-outputs/bar-chart-line-chart.expect.fld +0 -0
  227. package/dist/article/fluid/example/linked-outputs/bar-chart-line-chart.fld +0 -26
  228. package/dist/article/fluid/example/linked-outputs/convolution-data.fld +0 -5
  229. package/dist/article/fluid/example/linked-outputs/convolution.fld +0 -12
  230. package/dist/article/fluid/example/linked-outputs/line-chart.fld +0 -13
  231. package/dist/article/fluid/example/linked-outputs/moving-average-data.fld +0 -9
  232. package/dist/article/fluid/example/linked-outputs/moving-average.fld +0 -15
  233. package/dist/article/fluid/example/linked-outputs/pairs-data.fld +0 -1
  234. package/dist/article/fluid/example/linked-outputs/pairs.fld +0 -3
  235. package/dist/article/fluid/example/linked-outputs/renewables.fld +0 -100
  236. package/dist/article/fluid/example/linked-outputs/stacked-bar-chart-scatter-plot.fld +0 -38
  237. package/dist/article/fluid/example/lookup.fld +0 -15
  238. package/dist/article/fluid/example/map.fld +0 -1
  239. package/dist/article/fluid/example/mergeSort.fld +0 -22
  240. package/dist/article/fluid/example/normalise.fld +0 -3
  241. package/dist/article/fluid/example/nub.fld +0 -1
  242. package/dist/article/fluid/example/pattern-match.fld +0 -12
  243. package/dist/article/fluid/example/range.fld +0 -4
  244. package/dist/article/fluid/example/record-lookup.fld +0 -3
  245. package/dist/article/fluid/example/records.fld +0 -11
  246. package/dist/article/fluid/example/reverse.fld +0 -1
  247. package/dist/article/fluid/example/scratchpad.fld +0 -6
  248. package/dist/article/fluid/example/slicing/add.expect.fld +0 -1
  249. package/dist/article/fluid/example/slicing/add.fld +0 -1
  250. package/dist/article/fluid/example/slicing/array/array.expect.fld +0 -2
  251. package/dist/article/fluid/example/slicing/array/array.fld +0 -4
  252. package/dist/article/fluid/example/slicing/array/dims.expect.fld +0 -3
  253. package/dist/article/fluid/example/slicing/array/dims.fld +0 -3
  254. package/dist/article/fluid/example/slicing/array/lookup.expect.fld +0 -3
  255. package/dist/article/fluid/example/slicing/array/lookup.fld +0 -5
  256. package/dist/article/fluid/example/slicing/convolution/edgeDetect.expect.fld +0 -1
  257. package/dist/article/fluid/example/slicing/convolution/edgeDetect.fld +0 -1
  258. package/dist/article/fluid/example/slicing/convolution/emboss-wrap.fld +0 -1
  259. package/dist/article/fluid/example/slicing/convolution/emboss.expect.fld +0 -1
  260. package/dist/article/fluid/example/slicing/convolution/emboss.fld +0 -1
  261. package/dist/article/fluid/example/slicing/convolution/filter/edge-detect.fld +0 -5
  262. package/dist/article/fluid/example/slicing/convolution/filter/emboss.fld +0 -5
  263. package/dist/article/fluid/example/slicing/convolution/filter/gaussian.fld +0 -5
  264. package/dist/article/fluid/example/slicing/convolution/gaussian.expect.fld +0 -1
  265. package/dist/article/fluid/example/slicing/convolution/gaussian.fld +0 -1
  266. package/dist/article/fluid/example/slicing/convolution/test-image.fld +0 -7
  267. package/dist/article/fluid/example/slicing/dict/create.expect.fld +0 -1
  268. package/dist/article/fluid/example/slicing/dict/create.fld +0 -1
  269. package/dist/article/fluid/example/slicing/dict/difference.expect.fld +0 -3
  270. package/dist/article/fluid/example/slicing/dict/difference.fld +0 -3
  271. package/dist/article/fluid/example/slicing/dict/disjointUnion.expect.fld +0 -1
  272. package/dist/article/fluid/example/slicing/dict/disjointUnion.fld +0 -1
  273. package/dist/article/fluid/example/slicing/dict/foldl.expect.fld +0 -1
  274. package/dist/article/fluid/example/slicing/dict/foldl.fld +0 -1
  275. package/dist/article/fluid/example/slicing/dict/fromRecord.expect.fld +0 -2
  276. package/dist/article/fluid/example/slicing/dict/fromRecord.fld +0 -1
  277. package/dist/article/fluid/example/slicing/dict/get.expect.fld +0 -3
  278. package/dist/article/fluid/example/slicing/dict/get.fld +0 -2
  279. package/dist/article/fluid/example/slicing/dict/intersectionWith.expect.fld +0 -2
  280. package/dist/article/fluid/example/slicing/dict/intersectionWith.fld +0 -4
  281. package/dist/article/fluid/example/slicing/dict/map.expect.fld +0 -6
  282. package/dist/article/fluid/example/slicing/dict/map.fld +0 -5
  283. package/dist/article/fluid/example/slicing/divide.expect.fld +0 -1
  284. package/dist/article/fluid/example/slicing/divide.fld +0 -1
  285. package/dist/article/fluid/example/slicing/dtw/average-series.expect.fld +0 -8
  286. package/dist/article/fluid/example/slicing/dtw/average-series.fld +0 -8
  287. package/dist/article/fluid/example/slicing/dtw/compute-dtw.expect.fld +0 -6
  288. package/dist/article/fluid/example/slicing/dtw/compute-dtw.fld +0 -6
  289. package/dist/article/fluid/example/slicing/filter.expect.fld +0 -4
  290. package/dist/article/fluid/example/slicing/filter.fld +0 -6
  291. package/dist/article/fluid/example/slicing/intersperse-1.expect.fld +0 -4
  292. package/dist/article/fluid/example/slicing/intersperse-2.expect.fld +0 -4
  293. package/dist/article/fluid/example/slicing/intersperse.fld +0 -5
  294. package/dist/article/fluid/example/slicing/length.expect.fld +0 -1
  295. package/dist/article/fluid/example/slicing/length.fld +0 -1
  296. package/dist/article/fluid/example/slicing/linked-outputs/bar-chart-line-chart.expect.fld +0 -0
  297. package/dist/article/fluid/example/slicing/linked-outputs/bar-chart-line-chart.fld +0 -26
  298. package/dist/article/fluid/example/slicing/linked-outputs/renewables.fld +0 -100
  299. package/dist/article/fluid/example/slicing/linked-outputs/stacked-bar-scatter-plot.expect.fld +0 -0
  300. package/dist/article/fluid/example/slicing/linked-outputs/stacked-bar-scatter-plot.fld +0 -38
  301. package/dist/article/fluid/example/slicing/list-comp-1.expect.fld +0 -6
  302. package/dist/article/fluid/example/slicing/list-comp-2.expect.fld +0 -6
  303. package/dist/article/fluid/example/slicing/list-comp.fld +0 -8
  304. package/dist/article/fluid/example/slicing/lookup.expect.fld +0 -6
  305. package/dist/article/fluid/example/slicing/lookup.fld +0 -14
  306. package/dist/article/fluid/example/slicing/map.expect.fld +0 -1
  307. package/dist/article/fluid/example/slicing/map.fld +0 -1
  308. package/dist/article/fluid/example/slicing/matrix-update.expect.fld +0 -5
  309. package/dist/article/fluid/example/slicing/matrix-update.fld +0 -10
  310. package/dist/article/fluid/example/slicing/multiply.expect.fld +0 -1
  311. package/dist/article/fluid/example/slicing/multiply.fld +0 -1
  312. package/dist/article/fluid/example/slicing/nth.expect.fld +0 -1
  313. package/dist/article/fluid/example/slicing/nth.fld +0 -1
  314. package/dist/article/fluid/example/slicing/output-not-source.expect.fld +0 -2
  315. package/dist/article/fluid/example/slicing/output-not-source.fld +0 -1
  316. package/dist/article/fluid/example/slicing/section-5-example-1.expect.fld +0 -10
  317. package/dist/article/fluid/example/slicing/section-5-example-2.expect.fld +0 -10
  318. package/dist/article/fluid/example/slicing/section-5-example-3.expect.fld +0 -10
  319. package/dist/article/fluid/example/slicing/section-5-example.fld +0 -14
  320. package/dist/article/fluid/example/slicing/zeros-1.expect.fld +0 -3
  321. package/dist/article/fluid/example/slicing/zeros-2.expect.fld +0 -3
  322. package/dist/article/fluid/example/slicing/zeros.fld +0 -4
  323. package/dist/article/fluid/example/slicing/zipWith-1.expect.fld +0 -4
  324. package/dist/article/fluid/example/slicing/zipWith.fld +0 -4
  325. package/dist/article/fluid/example/text.fld +0 -27
  326. package/dist/article/fluid/lib/convolution.fld +0 -16
  327. package/dist/article/fluid/lib/dtw.fld +0 -47
  328. package/dist/article/fluid/lib/fnum.fld +0 -22
  329. package/dist/article/fluid/lib/graphics.fld +0 -221
  330. package/dist/article/fluid/lib/moving-average.fld +0 -35
  331. package/dist/article/fluid/lib/nombre.fld +0 -14
  332. package/dist/article/fluid/lib/prelude.fld +0 -246
  333. package/dist/article/index.html +0 -44
  334. package/fluid.js +0 -46
@@ -1,15 +0,0 @@
1
- let lookup k Empty = None;
2
- lookup k (NonEmpty t1 (key, val) t2) =
3
- match compare k key as {
4
- LT -> lookup k t1;
5
- EQ -> Some val;
6
- GT -> lookup k t2
7
- }
8
- in
9
- lookup
10
- 6
11
- (NonEmpty
12
- (NonEmpty Empty (3, "simon") Empty)
13
- (4, "john")
14
- (NonEmpty (NonEmpty Empty (6, "sarah") Empty) (7, "claire") Empty)
15
- )
@@ -1 +0,0 @@
1
- map ((+) 1) [4, 6, 12, 14, 3, 2, -4]
@@ -1,22 +0,0 @@
1
- let split [] = ([], []);
2
- split (x : xs) =
3
- let (ys, zs) = split xs in (x : zs, ys);
4
-
5
- merge xs ys =
6
- match (xs, ys) as {
7
- ([], _) -> ys;
8
- (x : xs', []) -> xs;
9
- (x : xs', y : ys') ->
10
- if x < y
11
- then x : merge xs' ys
12
- else y : merge xs ys'
13
- };
14
-
15
- mergesort xs =
16
- if length xs < 2
17
- then xs
18
- else
19
- let (ys, zs) = split xs in
20
- merge (mergesort ys) (mergesort zs)
21
- in
22
- mergesort [3, 1, 2]
@@ -1,3 +0,0 @@
1
- let (x, y) = (6.0, 12.0);
2
- sum = x + y in
3
- (floor (x * 100.0 / sum), floor (y * 100 / sum))
@@ -1 +0,0 @@
1
- nub [1, 2, 3, 3, 4]
@@ -1,12 +0,0 @@
1
- -- Silly test of pattern-matching for list notation
2
- let
3
- zip3 [] [] = [];
4
- zip3 [x1] [y1] = (x1, y1) : zip3 [] [];
5
- zip3 [x1, x2] [y1, y2] =
6
- (x1, y1) : zip3 [x2] [y2];
7
- zip3 [x1, x2, x3] [y1, y2, y3] =
8
- (x1 , y1) : zip3 [x2, x3] [y2, y3];
9
- zip3 (x1 : x2 : x3 : x4 : xs) (y1 : y2 : y3 : y4 : ys) =
10
- (x1, y1) : (x2, y2) : (x3, y3) : (x4, y4) : zip3 xs ys
11
- in
12
- length (zip3 [3, 4, 5, 6] [5, 6, 7, 8])
@@ -1,4 +0,0 @@
1
- let range1 (m, n) = [m..n];
2
- range2 ((m1, n1), (m2, n2)) =
3
- [ (i1, i2) | i1 <- range1 (m1, m2), i2 <- range1 (n1, n2)]
4
- in range2 ((0, 0), (1, 1))
@@ -1,3 +0,0 @@
1
- let city = { name: "Germany" };
2
- country = { cities: [ "Germany" ] }
3
- in city.name `elem` country.cities
@@ -1,11 +0,0 @@
1
- let f {fst: x, snd: []} = x;
2
- f {fst: x, snd: (y: xs)} = y;
3
-
4
- g {} = 7
5
- in {
6
- a: f {snd: [], fst: 2},
7
- b: f {fst: 4, snd: [6, 7]},
8
- c: g {unused: 22},
9
- d: [ x | {fst: x, snd: []} <- [{fst: 5, third: "hello", snd: []}, {fst: 6, snd: [7, 8]}] ],
10
- e: {a: 4, h: {i: 6, j: 7}}.h.j
11
- }
@@ -1 +0,0 @@
1
- reverse [1, 2]
@@ -1,6 +0,0 @@
1
- let nth2 i j xs = nth (i - 1) (nth (j - 1) xs) in
2
- let xs = [[1, 4, 8],
3
- [3, 2, 17],
4
- [0, 14, 6]];
5
- ys = [| nth2 i j xs | (i, j) in (3, 3) |]
6
- in ys ! (3, 2)
@@ -1 +0,0 @@
1
- ⸨5⸩ + (⸨0⸩ + ⸨3⸩)
@@ -1 +0,0 @@
1
- 5 + (0 + 3)
@@ -1,2 +0,0 @@
1
- let xs = [[1, 4, 8], [3, _2_, 17], [0, 14, 6]]
2
- in [| nth2 i j xs | (i, j) in (3, 3) |]
@@ -1,4 +0,0 @@
1
- let xs = [[1, 4, 8],
2
- [3, 2, 17],
3
- [0, 14, 6]]
4
- in [| nth2 i j xs | (i, j) in (3, 3) |]
@@ -1,3 +0,0 @@
1
- let (x, y) = ⸨(⸨3⸩, ⸨3⸩)⸩;
2
- yss = ⸨[|0|(i, j) in (x, y)|]⸩ in
3
- dims yss
@@ -1,3 +0,0 @@
1
- let (x, y) = (3, 3);
2
- yss = [| 0 | (i, j) in (x, y) |]
3
- in dims yss
@@ -1,3 +0,0 @@
1
- let xs = [[1, 4, 8], [3, 2, 17], [0, ⸨14⸩, 6]];
2
- ys = [|nth2 i j xs|(i, j) in (3, 3)|] in
3
- ys ! ((3, 2))
@@ -1,5 +0,0 @@
1
- let xs = [[1, 4, 8],
2
- [3, 2, 17],
3
- [0, 14, 6]];
4
- ys = [| nth2 i j xs | (i, j) in (3, 3) |]
5
- in ys ! (3, 2)
@@ -1 +0,0 @@
1
- convolve input_image filter extend
@@ -1 +0,0 @@
1
- convolve input_image filter extend
@@ -1 +0,0 @@
1
- convolve input_image filter wrap
@@ -1 +0,0 @@
1
- convolve input_image filter zero
@@ -1 +0,0 @@
1
- convolve input_image filter zero
@@ -1,5 +0,0 @@
1
- let filter =
2
- let edgeDetect = [[0, 1, 0],
3
- [1, -4, 1],
4
- [0, 1, 0]] in
5
- [| nth2 i j edgeDetect | (i, j) in (3, 3) |];
@@ -1,5 +0,0 @@
1
- let filter =
2
- let emboss = [[-2, -1, 0],
3
- [-1, 1, 1],
4
- [ 0, 1, 2]] in
5
- [| nth2 i j emboss | (i, j) in (3, 3) |];
@@ -1,5 +0,0 @@
1
- let filter =
2
- let gaussian = [[1, 4, 1],
3
- [4, 16, 4],
4
- [1, 4, 1]] in
5
- [| nth2 i j gaussian | (i, j) in (3, 3) |];
@@ -1 +0,0 @@
1
- convolve input_image filter zero
@@ -1 +0,0 @@
1
- convolve input_image filter zero
@@ -1,7 +0,0 @@
1
- let input_image =
2
- let image = [[15, 13, 6, 9, 16],
3
- [12, 5, 15, 4, 13],
4
- [14, 9, 20, 8, 1],
5
- [ 4, 10, 3, 7, 19],
6
- [ 3, 11, 15, 2, 9]] in
7
- [| nth2 i j image | (i, j) in (5, 5) |];
@@ -1 +0,0 @@
1
- {|"a" := 5, ⸨"a"⸩ ++ ⸨"b"⸩ := 6|}
@@ -1 +0,0 @@
1
- {| "a" := 5, "a" ++ "b" := 6 |}
@@ -1,3 +0,0 @@
1
- let e = ⸨{|"a" := 5, "a" ++ "b" := 6|}⸩;
2
- f = ⸨{|"ab" := 12|}⸩ in
3
- dict_difference e f
@@ -1,3 +0,0 @@
1
- let e = {| "a" := 5, "a" ++ "b" := 6 |};
2
- f = {| "ab" := 12 |}
3
- in dict_difference e f
@@ -1 +0,0 @@
1
- {|⸨"a"⸩ := 5, "b" := 6|} `dict_disjointUnion` {|"c" := ⸨7⸩|}
@@ -1 +0,0 @@
1
- {| "a" := 5, "b" := 6 |} `dict_disjointUnion` {| "c" := 7 |}
@@ -1 +0,0 @@
1
- foldl (*) 1 (dict_foldl concat2 [] {|"a" := [5, 6], "b" := [⸨0⸩, 10], "c" := [3, 4]|})
@@ -1 +0,0 @@
1
- foldl (*) 1 (dict_foldl concat2 [] {| "a" := [5, 6], "b" := [0, 10], "c" := [3, 4] |})
@@ -1,2 +0,0 @@
1
- dict_fromRecord ⸨{a : 5,
2
- ab : 6}⸩
@@ -1 +0,0 @@
1
- dict_fromRecord { a: 5, ab: 6 }
@@ -1,3 +0,0 @@
1
- let d = {|"a" := 5, "a" ++ "b" := {fst : 6,
2
- snd : ⸨0⸩}|} in
3
- dict_get "a" d * (dict_get "ab" d).snd
@@ -1,2 +0,0 @@
1
- let d = {| "a" := 5, "a" ++ "b" := {fst: 6, snd: 0} |}
2
- in dict_get "a" d * (dict_get "ab" d).snd
@@ -1,2 +0,0 @@
1
- dict_intersectionWith (let x = ⸨2⸩ in
2
- (fun n m = (n + m) * x)) {|"a" := 5, "b" := ⸨6⸩, "c" := ⸨3⸩|} {|"b" := ⸨-6⸩, "c" := ⸨7⸩|}
@@ -1,4 +0,0 @@
1
- dict_intersectionWith
2
- (let x = 2 in (fun n m = (( n + m ) * x )) )
3
- {| "a" := 5, "b" := 6, "c" := 3 |}
4
- {| "b" := -6, "c" := 7 |}
@@ -1,6 +0,0 @@
1
- let incHead = let x = ⸨3⸩ in
2
- (fun xs = head xs + x);
3
- d = {|"a" := [⸨5⸩, 6], "b" := [⸨9⸩, 10], "c" := [3, 4]|};
4
- e = {|"c" := []|};
5
- d' = dict_map incHead (dict_difference d e) in
6
- dict_get "a" d' + dict_get "b" d'
@@ -1,5 +0,0 @@
1
- let incHead = let x = 3 in fun xs -> head xs + x;
2
- d = {| "a" := [5, 6], "b" := [9, 10], "c" := [3, 4] |};
3
- e = {| "c" := [] |};
4
- d' = dict_map incHead (dict_difference d e)
5
- in dict_get "a" d' + dict_get "b" d'
@@ -1 +0,0 @@
1
- ⸨362⸩ / ⸨9⸩
@@ -1 +0,0 @@
1
- 362 / 9
@@ -1,8 +0,0 @@
1
- let d x y = (x - y) * (x - y) in
2
- let avg x y = (x + y) / ⸨2⸩ in
3
- let avgSeq seq1 seq2 f = map (fun (i, j) = f (nth (i - 1) seq1) (nth (j - 1) seq2)) in
4
- let seq1 = [3, ⸨1⸩, 2, 2, 1];
5
- seq2 = [2, 0, ⸨0⸩, 3, 3, 1, 0];
6
- window = 2;
7
- (costs, matched) = computeDTW seq1 seq2 d window in
8
- avgSeq seq1 seq2 avg matched
@@ -1,8 +0,0 @@
1
- let d x y = (x - y) * (x - y);
2
- let avg x y = (x + y) / 2;
3
- let avgSeq seq1 seq2 f = map (fun (i, j) -> f (nth (i - 1) seq1) (nth (j - 1) seq2));
4
- let seq1 = [3,1,2,2,1];
5
- seq2 = [2,0,0,3,3,1,0];
6
- window = 2;
7
- (costs, matched) = computeDTW seq1 seq2 d window
8
- in avgSeq seq1 seq2 avg matched
@@ -1,6 +0,0 @@
1
- let d x y = (x - y) * (x - y) in
2
- let seq1 = ⸨[⸩ ⸨3⸩ ⸨,⸩ ⸨1⸩ ⸨,⸩ 2 ⸨,⸩ 2 ⸨,⸩ 1 ⸨]⸩;
3
- seq2 = ⸨[⸩ ⸨2⸩ ⸨,⸩ ⸨0⸩ ⸨,⸩ ⸨0⸩ ⸨,⸩ 3 ⸨,⸩ 3 ⸨,⸩ 1 ⸨,⸩ 0 ⸨]⸩;
4
- window = ⸨2⸩;
5
- (costs, matched) = computeDTW seq1 seq2 d window in
6
- matched
@@ -1,6 +0,0 @@
1
- let d x y = (x - y) * (x - y) in
2
- let seq1 = [3, 1, 2, 2, 1];
3
- seq2 = [2, 0, 0, 3, 3, 1, 0];
4
- window = 2;
5
- (costs, matched) = computeDTW seq1 seq2 d window in
6
- matched
@@ -1,4 +0,0 @@
1
- let filter p [] = [];
2
- filter p (x : xs) = let ys = filter p xs in
3
- if p x then ⸨(x : ys)⸩ else ys in
4
- filter ((<) ⸨5⸩) [⸨8⸩, 4, 7, 3]
@@ -1,6 +0,0 @@
1
- let filter p [] = [];
2
- filter p (x : xs) =
3
- let ys = filter p xs in
4
- if p x then x : ys else ys
5
- in
6
- filter ((<) 5) [8, 4, 7, 3]
@@ -1,4 +0,0 @@
1
- let intersperse [] _ = [];
2
- intersperse [x] _ = [x];
3
- intersperse (x : (y : ys)) sep = (x : ⸨(sep : intersperse ((y : ys)) sep)⸩) in
4
- intersperse ⸨[⸩ 1 ⸨,⸩ 2, 3] 0
@@ -1,4 +0,0 @@
1
- let intersperse [] _ = [];
2
- intersperse [x] _ = [x];
3
- intersperse (x : (y : ys)) sep = ⸨(x : (sep : intersperse (⸨(y : ys)⸩) sep))⸩ in
4
- intersperse ⸨[⸩ 1 ⸨,⸩ 2 ⸨,⸩ 3] 0
@@ -1,5 +0,0 @@
1
- let intersperse [] _ = [];
2
- intersperse [x] _ = [x];
3
- intersperse (x : y : ys) sep = x : sep : intersperse (y : ys) sep
4
- in
5
- intersperse [1, 2, 3] 0
@@ -1 +0,0 @@
1
- length ⸨[⸩ 1 ⸨,⸩ 2 ⸨,⸩ 3 ⸨,⸩ 4 ⸨,⸩ 5 ⸨]⸩
@@ -1 +0,0 @@
1
- length [1, 2, 3, 4, 5]
@@ -1,26 +0,0 @@
1
- MultiView {|
2
- "bar-chart" :=
3
- let totalFor c rows =
4
- sum [ row.output | row <- rows, row.country == c ];
5
- let data2015 = [ row | row <- renewables, row.year == 2015 ];
6
- countryData = [ { x: c, bars: [ { y: "output", z: totalFor c data2015 } ] }
7
- | c <- ["China", "USA", "Germany"] ]
8
- in BarChart {
9
- caption: "Total output by country",
10
- data: countryData
11
- },
12
- "line-chart" :=
13
- let series type country = [
14
- { x: row.year, y: row.output }
15
- | year <- [2013..2018], row <- renewables,
16
- row.year == year, row.energyType == type, row.country == country
17
- ] in LineChart {
18
- caption: "Output of USA relative to China",
19
- plots: [
20
- LinePlot { name: type, data: plot }
21
- | type <- ["Bio", "Hydro", "Solar", "Wind"],
22
- let plot = zipWith (fun p1 p2 -> { x: p1.x, y: p1.y / p2.y })
23
- (series type "USA") (series type "China")
24
- ]
25
- }
26
- |}
@@ -1,100 +0,0 @@
1
- -- The original dataset sometimes has '~0' instead of '0'.
2
- -- Including only 3 countries here. Also, have reduced the Hydro value for China 2015 from 296 to 96 (ouch)
3
- -- to make the charts fit nicely into grant proposal. Fix this once proposal submitted!
4
- [
5
- -- https://www.ren21.net/wp-content/uploads/2019/05/GSR2014_Full-Report_English.pdf
6
- { year: 2013, country: "China", energyType: "Bio", output: 6.2 },
7
- { year: 2013, country: "China", energyType: "Hydro", output: 260 },
8
- { year: 2013, country: "China", energyType: "Solar", output: 19.9 },
9
- { year: 2013, country: "China", energyType: "Wind", output: 91 },
10
-
11
- { year: 2013, country: "USA", energyType: "Bio", output: 15.8 },
12
- { year: 2013, country: "USA", energyType: "Hydro", output: 78 },
13
- { year: 2013, country: "USA", energyType: "Solar", output: 12.1 },
14
- { year: 2013, country: "USA", energyType: "Wind", output: 61 },
15
-
16
- { year: 2013, country: "Germany", energyType: "Bio", output: 8.1 },
17
- { year: 2013, country: "Germany", energyType: "Hydro", output: 5.6 },
18
- { year: 2013, country: "Germany", energyType: "Solar", output: 36 },
19
- { year: 2013, country: "Germany", energyType: "Wind", output: 34 },
20
-
21
- -- https://www.ren21.net/wp-content/uploads/2019/05/GSR2015_Full-Report_English.pdf
22
- { year: 2014, country: "China", energyType: "Bio", output: 10 },
23
- { year: 2014, country: "China", energyType: "Hydro", output: 280 },
24
- { year: 2014, country: "China", energyType: "Solar", output: 28 },
25
- { year: 2014, country: "China", energyType: "Wind", output: 115 },
26
-
27
- { year: 2014, country: "USA", energyType: "Bio", output: 16.1 },
28
- { year: 2014, country: "USA", energyType: "Hydro", output: 79 },
29
- { year: 2014, country: "USA", energyType: "Solar", output: 18 },
30
- { year: 2014, country: "USA", energyType: "Wind", output: 66 },
31
-
32
- { year: 2014, country: "Germany", energyType: "Bio", output: 8.8 },
33
- { year: 2014, country: "Germany", energyType: "Hydro", output: 5.6 },
34
- { year: 2014, country: "Germany", energyType: "Solar", output: 38 },
35
- { year: 2014, country: "Germany", energyType: "Wind", output: 39 },
36
-
37
- -- https://www.ren21.net/gsr-2016/00-Reference-Tables.php
38
- { year: 2015, country: "China", energyType: "Bio", output: 10.3 },
39
- { year: 2015, country: "China", energyType: "Hydro", output: 96 },
40
- { year: 2015, country: "China", energyType: "Solar", output: 44 },
41
- { year: 2015, country: "China", energyType: "Wind", output: 145 },
42
-
43
- { year: 2015, country: "USA", energyType: "Bio", output: 16.7 },
44
- { year: 2015, country: "USA", energyType: "Hydro", output: 80 },
45
- { year: 2015, country: "USA", energyType: "Solar", output: 26 },
46
- { year: 2015, country: "USA", energyType: "Wind", output: 74 },
47
-
48
- { year: 2015, country: "Germany", energyType: "Bio", output: 7.1 },
49
- { year: 2015, country: "Germany", energyType: "Hydro", output: 5.6 },
50
- { year: 2015, country: "Germany", energyType: "Solar", output: 40 },
51
- { year: 2015, country: "Germany", energyType: "Wind", output: 45 },
52
-
53
- -- https://www.ren21.net/gsr-2017/pages/tables/tables/#table-R2
54
- { year: 2016, country: "China", energyType: "Bio", output: 12 },
55
- { year: 2016, country: "China", energyType: "Hydro", output: 305 },
56
- { year: 2016, country: "China", energyType: "Solar", output: 77 },
57
- { year: 2016, country: "China", energyType: "Wind", output: 169 },
58
-
59
- { year: 2016, country: "USA", energyType: "Bio", output: 16.8 },
60
- { year: 2016, country: "USA", energyType: "Hydro", output: 80 },
61
- { year: 2016, country: "USA", energyType: "Solar", output: 41 },
62
- { year: 2016, country: "USA", energyType: "Wind", output: 82 },
63
-
64
- { year: 2016, country: "Germany", energyType: "Bio", output: 7.6 },
65
- { year: 2016, country: "Germany", energyType: "Hydro", output: 5.6 },
66
- { year: 2016, country: "Germany", energyType: "Solar", output: 41 },
67
- { year: 2016, country: "Germany", energyType: "Wind", output: 50 },
68
-
69
- -- https://www.ren21.net/gsr-2018/pages/tables/tables/#Table_R2
70
- { year: 2017, country: "China", energyType: "Bio", output: 14.9 },
71
- { year: 2017, country: "China", energyType: "Hydro", output: 313 },
72
- { year: 2017, country: "China", energyType: "Solar", output: 131 },
73
- { year: 2017, country: "China", energyType: "Wind", output: 188},
74
-
75
- { year: 2017, country: "USA", energyType: "Bio", output: 16.7 },
76
- { year: 2017, country: "USA", energyType: "Hydro", output: 80 },
77
- { year: 2017, country: "USA", energyType: "Solar", output: 51 },
78
- { year: 2017, country: "USA", energyType: "Wind", output: 89 },
79
-
80
- { year: 2017, country: "Germany", energyType: "Bio", output: 8 },
81
- { year: 2017, country: "Germany", energyType: "Hydro", output: 5.6 },
82
- { year: 2017, country: "Germany", energyType: "Solar", output: 42 },
83
- { year: 2017, country: "Germany", energyType: "Wind", output: 56 },
84
-
85
- -- https://www.ren21.net/gsr-2019/tables/table_02/table_02/
86
- { year: 2018, country: "China", energyType: "Bio", output: 17.8 },
87
- { year: 2018, country: "China", energyType: "Hydro", output: 322 },
88
- { year: 2018, country: "China", energyType: "Solar", output: 176 },
89
- { year: 2018, country: "China", energyType: "Wind", output: 210 },
90
-
91
- { year: 2018, country: "USA", energyType: "Bio", output: 16.2 },
92
- { year: 2018, country: "USA", energyType: "Hydro", output: 80 },
93
- { year: 2018, country: "USA", energyType: "Solar", output: 62 },
94
- { year: 2018, country: "USA", energyType: "Wind", output: 96 },
95
-
96
- { year: 2018, country: "Germany", energyType: "Bio", output: 8.4 },
97
- { year: 2018, country: "Germany", energyType: "Hydro", output: 5.6 },
98
- { year: 2018, country: "Germany", energyType: "Solar", output: 45 },
99
- { year: 2018, country: "Germany", energyType: "Wind", output: 59 }
100
- ]
@@ -1,38 +0,0 @@
1
- MultiView {|
2
- "stacked-bar-chart" :=
3
- let totalFor year country rows =
4
- let [ row ] = [ row | row <- rows, row.year == year, row.country == country ]
5
- in row.nuclearOut + row.gasOut + row.coalOut + row.petrolOut;
6
- let stack year = [ { y: country, z: totalFor year country nonRenewables }
7
- | country <- ["BRA", "EGY", "IND", "JPN"] ]
8
- in BarChart {
9
- caption: "Non-renewables by country",
10
- data: [ { x: numToStr year, bars: stack year }
11
- | year <- [2014..2018] ]
12
- },
13
- "scatter-plot" :=
14
- let isCountry name x = name == x.country;
15
- isYear year x = year == x.year;
16
-
17
- let plot year countries =
18
- let rens = filter (isYear year) renewables;
19
- nonRens = filter (isYear year) nonRenewables;
20
- let plotCountry country =
21
- let rens' = filter (isCountry country) rens;
22
- rensOut = sum (map (fun x -> x.output) rens');
23
- rensCap = sum (map (fun x -> x.capacity) rens');
24
- x = head (filter (isCountry country) nonRens);
25
- nonRensCap = x.nuclearCap + x.petrolCap + x.gasCap + x.coalCap
26
- in {
27
- x: rensCap / (rensCap + nonRensCap),
28
- y: (rensOut + x.nuclearOut) / (rensCap + x.nuclearCap)
29
- }
30
- in map plotCountry countries
31
-
32
- in ScatterPlot {
33
- caption: "Clean energy efficiency vs proportion of renewable energy capacity",
34
- data: plot 2018 [ "BRA", "CHN", "DEU", "FRA", "EGY", "IND", "JPN", "MEX", "NGA", "USA" ],
35
- xlabel: "Renewables/TotalEnergyCap",
36
- ylabel: "Clean Capacity Factor"
37
- }
38
- |}
@@ -1,6 +0,0 @@
1
- let data = [{year : 2013, country : "China", energyType : "Bio", output : 6.2}
2
- , {year : 2013, country : "China", energyType : ⸨"Hydro"⸩, output : 260}
3
- , {year : 2013, country : "China", energyType : "Solar", output : 19.9}
4
- , {year : 2013, country : "China", energyType : "Wind", output : 91}
5
- ] in
6
- ⸨[row.output|type <- ["Bio", ⸨"Hydro"⸩, "Solar", "Wind"], row <- data, row.energyType == type]⸩
@@ -1,6 +0,0 @@
1
- let data = [{year : 2013, country : "China", energyType : "Bio", output : 6.2}
2
- , {year : 2013, country : "China", energyType : "Hydro", output : 260}
3
- , {year : 2013, country : "China", energyType : ⸨"Solar"⸩, output : 19.9}
4
- , {year : 2013, country : "China", energyType : "Wind", output : 91}
5
- ] in
6
- ⸨[row.output|type <- ["Bio", "Hydro", ⸨"Solar"⸩, "Wind"], row <- data, row.energyType == type]⸩
@@ -1,8 +0,0 @@
1
- let data = [
2
- { year: 2013, country: "China", energyType: "Bio", output: 6.2 },
3
- { year: 2013, country: "China", energyType: "Hydro", output: 260 },
4
- { year: 2013, country: "China", energyType: "Solar", output: 19.9 },
5
- { year: 2013, country: "China", energyType: "Wind", output: 91 }
6
- ] in
7
- [ row.output | type <- ["Bio", "Hydro", "Solar", "Wind"],
8
- row <- data, row.energyType == type ]
@@ -1,6 +0,0 @@
1
- let lookup k (Empty) = None;
2
- lookup k (NonEmpty t1 (key, val) t2) = match compare k key as
3
- {(LT) -> lookup k t1;
4
- (EQ) -> ⸨Some val⸩;
5
- (GT) -> lookup k t2} in
6
- lookup ⸨6⸩ (NonEmpty (NonEmpty (Empty) ((3, "USA")) (Empty)) ((4, "China")) (NonEmpty (⸨NonEmpty (Empty) (⸨(⸨6⸩, "Germany")⸩) (Empty)⸩) ((7, "UK")) (Empty)))
@@ -1,14 +0,0 @@
1
- let lookup k Empty = None;
2
- lookup k (NonEmpty t1 (key, val) t2) =
3
- match compare k key as {
4
- LT -> lookup k t1;
5
- EQ -> Some val;
6
- GT -> lookup k t2
7
- }
8
- in
9
- lookup 6
10
- (NonEmpty
11
- (NonEmpty Empty (3, "USA") Empty)
12
- (4, "China")
13
- (NonEmpty (NonEmpty Empty (6, "Germany") Empty) (7, "UK") Empty)
14
- )
@@ -1 +0,0 @@
1
- map ((+) 2) ⸨[⸩ 3 ⸨,⸩ 4]
@@ -1 +0,0 @@
1
- map ((+) 2) [3, 4]
@@ -1,5 +0,0 @@
1
- let image' = [[15, 13, 6, 9, 16], [12, 5, 15, 4, 13], [14, 9, 20, 8, 1], [4, 10, 3, 7, 19], [3, 11, 15, 2, 9]];
2
- image = [|nth2 i j image'|(i, j) in (5, 5)|];
3
- index = (2, 2);
4
- pair = ⸨4000⸩ in
5
- matrixUpdate image index pair
@@ -1,10 +0,0 @@
1
- let image' = [[15, 13, 6, 9, 16],
2
- [12, 5, 15, 4, 13],
3
- [14, 9, 20, 8, 1],
4
- [ 4, 10, 3, 7, 19],
5
- [ 3, 11, 15, 2, 9]];
6
- image = [| nth2 i j image'
7
- | (i, j) in (5, 5) |];
8
- index = (2, 2);
9
- pair = 4000
10
- in matrixUpdate image index pair
@@ -1 +0,0 @@
1
- 5 * (⸨0⸩ * 3)
@@ -1 +0,0 @@
1
- 5 * (0 * 3)
@@ -1 +0,0 @@
1
- nth 1 [3, ⸨4⸩, 5]
@@ -1 +0,0 @@
1
- nth 1 [3, 4, 5]
@@ -1,2 +0,0 @@
1
- let x = ⸨3⸩ in
2
- (x, x < ⸨5⸩)