Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ord typeclass #37

Open
goodmind opened this issue Apr 11, 2018 · 5 comments
Open

Ord typeclass #37

goodmind opened this issue Apr 11, 2018 · 5 comments

Comments

@goodmind
Copy link

How can you use this list with Ord ?

@paldepind
Copy link
Member

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
Copy link
Author

I have static-land Ord actually

@paldepind
Copy link
Member

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

@goodmind
Copy link
Author

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants