Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

Put generator param last #1

Closed
singpolyma opened this issue Jan 1, 2013 · 3 comments
Closed

Put generator param last #1

singpolyma opened this issue Jan 1, 2013 · 3 comments

Comments

@singpolyma
Copy link

If the generator param goes last, then the functions can more easily be wrapped in a state monad when the user wants to do so.

The return tuple is already in the correct order for this.

@vincenthz
Copy link
Owner

for genRandomBytes or for every functions that take g as first parameter ?

@singpolyma
Copy link
Author

Anything that is:

... -> g -> ... -> (a, g)

should be:

... -> g -> (a, g)

unless there's a very good reason for it to be otherwise, because this makes it very easy to wrap in a state monad.

@vincenthz
Copy link
Owner

it's a good suggestion. sad it's coming after the release, but i've changed that now

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

No branches or pull requests

2 participants