Ord typeclass
goodmind opened this issue · 5 comments
goodmind commented
How can you use this list with Ord
?
paldepind commented
Hello @goodmind. I'm not sure if I understand your question.
If you have a list of values that implements Ord
you can sort the list of them with sort
.
But, List itself does not implement Ord
_yet. This is planned though. Do you need the Ord
instance? Because if you do I can make implementing it a higher priority.
goodmind commented
I have static-land Ord
actually
paldepind commented
I'm sorry, what do you mean? 😄 ❓
goodmind commented
I mean how do I sort
list of items with static-land Ord
? https://github.com/rpominov/static-land/blob/master/docs/spec.md#ord
gabejohnson commented
@goodmind I would think you could use sortWith
, passing your own function that uses lte
.