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

Add Function/compose #4

Merged
merged 3 commits into from Jul 5, 2018

Conversation

Projects
None yet
3 participants
@ocharles
Collaborator

ocharles commented Jun 12, 2018

Not as nice as languages with type inference, but probably worth having nonetheless.

Motivation: dhall-to-cabal now has mapSourceRepos which builds a Package -> Package function. I can imagine chaining a long sequence of these together. It also suggests an endo-monoid, but compose is the most general solution.

@f-f f-f requested a review from Gabriel439 Jun 13, 2018

@f-f

Nice, I like it 👍

Let's make this consistent with the rest of the Prelude functions, so I'd ask you to:

  • add a docstring and some examples in a multiline comment on top
  • use the let ... in syntax for defining the function

Example: List/concat

@ocharles

This comment has been minimized.

Collaborator

ocharles commented Jul 5, 2018

Ok, I think this is good to go now.

@f-f

f-f approved these changes Jul 5, 2018

@f-f

This comment has been minimized.

Member

f-f commented Jul 5, 2018

Thanks @ocharles!

You should have write access now, so you can merge yourself.

@ocharles

This comment has been minimized.

Collaborator

ocharles commented Jul 5, 2018

Nope, I don't have write access

@ocharles

This comment has been minimized.

Collaborator

ocharles commented Jul 5, 2018

Nvm, missed the invite

@ocharles ocharles merged commit 302881a into dhall-lang:master Jul 5, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment