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

data/option: add map #12

Closed
wants to merge 3 commits into from
Closed

data/option: add map #12

wants to merge 3 commits into from

Conversation

semorrison
Copy link
Collaborator

No description provided.

@gebner
Copy link
Member

gebner commented Sep 2, 2017

Note that option already has a monad instance, so you can write f <$> x to map a function f over an option x.

@semorrison
Copy link
Collaborator Author

semorrison commented Sep 2, 2017 via email

@digama0
Copy link
Member

digama0 commented Sep 2, 2017

@gebner Actually, I thought I already added this (under the name option_map) in init/data/option/basic.lean. It is not the same as <$> because that notation only works on the same universe. Then again Scott's definition here also only works on the same universe, so I don't see any reason to accept this PR as stated.

@semorrison
Copy link
Collaborator Author

I allowed option.map to change universes.

@digama0
Copy link
Member

digama0 commented Sep 4, 2017

Now it is the same as option_map, so I still don't see the point. I will PR lean repo to change option_map to option.map, and if that fails I will make an alias here.

@digama0 digama0 closed this Sep 4, 2017
@semorrison semorrison deleted the option.map branch September 16, 2017 22:52
gebner added a commit to gebner/mathlib that referenced this pull request Apr 3, 2020
…rover-community#12)

I'm confident we'll be able to breach the four-hour barrier before we move to Lean 4.  Bigger, better, blazingly slow!
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

Successfully merging this pull request may close these issues.

None yet

3 participants