diff options
author | Eduardo Julian | 2021-02-15 09:59:58 -0400 |
---|---|---|
committer | Eduardo Julian | 2021-02-15 09:59:58 -0400 |
commit | ee7721f3a9c0b899ab282dda120b0854a5cc0bd4 (patch) | |
tree | 45eda49dbb5ed7c91f22b3efe5f03bc1b53333cb /stdlib/source/test/lux/data/text | |
parent | ee3240679a7c1c4d216b35e1d2db1544e5c16863 (diff) |
Almost done with Lua.
Diffstat (limited to 'stdlib/source/test/lux/data/text')
-rw-r--r-- | stdlib/source/test/lux/data/text/encoding.lux | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/stdlib/source/test/lux/data/text/encoding.lux b/stdlib/source/test/lux/data/text/encoding.lux index c5b985f50..c2b438232 100644 --- a/stdlib/source/test/lux/data/text/encoding.lux +++ b/stdlib/source/test/lux/data/text/encoding.lux @@ -12,7 +12,7 @@ ["." maybe] ["." text ("#\." equivalence)] [collection - ["." list ("#\." functor)] + ["." list ("#\." fold)] ["." set]]] [macro ["." template]] @@ -180,14 +180,17 @@ [((: (-> Any (List /.Encoding)) (function (_ _) (`` (list (~~ (template.splice <by_letter>)))))) - 123)] + [])] <encodings>)] (def: all_encodings (list.concat (list <named>))) (def: unique_encodings - (set.from_list text.hash (list\map /.name ..all_encodings))) + (list\fold (function (_ encoding set) + (set.add (/.name encoding) set)) + (set.new text.hash) + ..all_encodings)) (def: verdict (n.= (list.size ..all_encodings) |