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

Documentation on Range.linearFrom parameters #41

Open
chris-martin opened this issue Apr 11, 2017 · 1 comment
Open

Documentation on Range.linearFrom parameters #41

chris-martin opened this issue Apr 11, 2017 · 1 comment

Comments

@chris-martin
Copy link
Contributor

chris-martin commented Apr 11, 2017

linearFrom :: Integral a => a -> a -> a -> Range a

It isn't entirely clear to me what the first parameter does. Is it something like this?

linearFrom :: Integral a 
  => a -- ^ Value to shrink toward (the value produced when the size parameter is 0)
  -> a -- ^ Lower bound (the bottom of the range when the size parameter is 99)
  -> a -- ^ Upper bound (the top of the range when the size parameter is 99)
  -> Range a
data Range a =
  Range !a -- ^ Value to shrink toward (the value produced when the size parameter is zero)
        (Size -> (a, a))
@jacobstanley
Copy link
Member

Yeah that's right, it's the value to shrink towards

fisx added a commit to fisx/haskell-hedgehog that referenced this issue Feb 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants