funkia/list

Ord typeclass

goodmind opened this issue · 5 comments

How can you use this list with Ord ?

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.

I have static-land Ord actually

I'm sorry, what do you mean? 😄 ❓

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

@goodmind I would think you could use sortWith, passing your own function that uses lte.