-
Notifications
You must be signed in to change notification settings - Fork 30
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
Hedgehog bind functions are backwards #265
Comments
I agree with @adam-becker. The signature of the bind function named let bind (f: 'a -> M<'b>) (ma: M<'a>) : M<'b> = In contrast, the signature of the bind operator denoted by let (>>=) (ma: M<'a>) (f: 'a -> M<'b>) : M<'b> = These are "the flip" of each other: i.e. a >>= b and a |> bind b The arguments to |
Agreed, |
Another idea (@adam-becker) is to add this operator. |
@TysonMN I added the operator, though suggestions like this fit better on the PR :) |
Axiomatically, the
bind
function in F# has a different parameter order than theBind
method in a computation expression. This is well established, and Hedgehog does it wrong.Other modules in F# are consistent on this.
It's done this way to allow simple chaining, which is how I noticed this.
The text was updated successfully, but these errors were encountered: