Мне нужен набор уникальных записей. Но Elm Core Set
ограничивает набор участников comparable
:
import Set exposing (Set)
mySet = Set.empty
Set.insert {name="Foo"} mySet
-- TYPE MISMATCH ----------------------------------------------------------- elm
The 1st argument to `insert` is not what I expect:
6| Set.insert {name="Foo"} mySet
^^^^^^^^^^^^
This argument is a record of type:
{ name : String }
But `insert` needs the 1st argument to be:
comparable
Hint: Only ints, floats, chars, strings, lists, and tuples are comparable.
Как вы делаете набор записей в Elm?