Skip to content

#92 Adds a Relude.Extra.Tuple module#93

Merged
chshersh merged 28 commits intokowainik:masterfrom
cronokirby:92-Extra.Tuple
Oct 6, 2018
Merged

#92 Adds a Relude.Extra.Tuple module#93
chshersh merged 28 commits intokowainik:masterfrom
cronokirby:92-Extra.Tuple

Conversation

@cronokirby
Copy link
Copy Markdown
Collaborator

@cronokirby cronokirby commented Oct 5, 2018

Resolves #92

I've opted with mapToFst to denote the function where the result ends up in the first slot,
instead of mapSnd. The names of these are of course an easy fix, if that's what we decide to do.

I've preemptively inlined everything in the module, which should be fine given the size of every function.

I haven added any hlint rules, I think that should be a separate issue if this gets merged.

Checklist:

HLint

  • I've changed the exposed interface (add new reexports, remove reexports, rename reexported things, etc.).
    • I've updated hlint.dhall
      accordingly to my changes (add new rules for the new imports, remove old ones, when they are outdated, etc.).
    • I've generated the new .hlint.yaml file (see
      this instructions).

General

  • I've updated the CHANGELOG
    with the short description of my latest changes.
  • All new and existing tests pass.
  • I keep the code style used in the files I've changed (see style-guide
    for more details).
  • I've used the stylish-haskell file.
  • My change requires the documentation updates.
    • I've updated the documentation accordingly.
  • I've added the [ci skip] text to the docs-only related commit's name.

@chshersh chshersh requested review from chshersh and ghallak October 6, 2018 05:20
@chshersh chshersh requested a review from vrom911 October 6, 2018 05:20
@chshersh chshersh added Hacktoberfest https://hacktoberfest.digitalocean.com/ extra Relude.Extra labels Oct 6, 2018
Copy link
Copy Markdown
Contributor

@chshersh chshersh left a comment

Choose a reason for hiding this comment

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

Looks quite good! Thanks for the contribution!

>>> mapToFst (+1) 10
(11,10)
-}
mapToFst :: (a -> b) -> a -> (b, a)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hmm, mapToFst name is also kinda nice 🤔

@chshersh chshersh merged commit 959cfbe into kowainik:master Oct 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extra Relude.Extra Hacktoberfest https://hacktoberfest.digitalocean.com/

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Relude.Extra.Tuple module with useful utilities

2 participants