Skip to content

[#196] Rename and deprecate mapToFst/Snd#289

Merged
vrom911 merged 1 commit intomasterfrom
chshersh/196-Rename-and-deprecate-mapToFst/Snd
May 13, 2020
Merged

[#196] Rename and deprecate mapToFst/Snd#289
vrom911 merged 1 commit intomasterfrom
chshersh/196-Rename-and-deprecate-mapToFst/Snd

Conversation

@chshersh
Copy link
Copy Markdown
Contributor

Resolves #196

@chshersh chshersh added new Bring something new into library (add function or type or interface) hlint extra Relude.Extra labels May 13, 2020
@chshersh chshersh requested a review from vrom911 as a code owner May 13, 2020 22:14
@chshersh chshersh self-assigned this May 13, 2020
Copy link
Copy Markdown
Contributor

@hint-man hint-man bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no place for me here... I will choose the truth I like.

Copy link
Copy Markdown
Member

@vrom911 vrom911 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very cool!
fmapToFst is going to be used a lot by me 🔨

+ Replace `mapToFst` with `toFst`
+ Replace `mapToSnd` with `toSnd`
+ You can now use `fmapToFst` and `fmapToSnd` instead of
`[f]map (mapToFst f)` and `[f]map (mapToSnd f)`
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔝

where
dict :: M.Map k a
dict = M.fromList $ map (mapToFst f) (universe @a)
dict = M.fromList $ fmapToFst f (universe @a)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool! We needed these functions 😺

@vrom911 vrom911 merged commit 3a6bb4b into master May 13, 2020
@vrom911 vrom911 deleted the chshersh/196-Rename-and-deprecate-mapToFst/Snd branch May 13, 2020 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extra Relude.Extra hlint new Bring something new into library (add function or type or interface)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rename and deprecate mapToFst/Snd

2 participants