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

confusing challenge in 4.3 #63

Open
goosetherumfoodle opened this issue May 21, 2017 · 1 comment
Open

confusing challenge in 4.3 #63

goosetherumfoodle opened this issue May 21, 2017 · 1 comment

Comments

@goosetherumfoodle
Copy link

This is the exercise in 4.3:

The generalized type signature for genTwo/link that you came up with in challenge #12 is one of the ones we want to put into our type class, and if you used the type variable ‘m’, you should be able to drop it in. All we need is a name. Let’s use the name bind.

Now that we have part of our type class your task is to create a single unified implementation for generalB2/yLink. Most of it should be the same, but you’ll find that there is one part that is different for the two. Make that part into the second function of the type class. Call this function return. Figure out what the type signature should be. We’ve seen this pattern before in Set 1 and Set 3.

I read that as saying that some function should be written which is a generalized version of generalB2/yLink. That seems to require a generalization of link/genTwo, which would be bind on two different monad instances. But writing those instances is a problem in a later challenge.

If we're not supposed to write those instances here, can the language be more specific about what it is we are supposed to do?

@mightybyte
Copy link
Owner

It's been awhile since I wrote it, but I think that the redundancy was intentional. Part of the premise is that these patterns don't sink in from doing them once. You need to do the same thing several times in different contexts before the pattern becomes clear.

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

No branches or pull requests

2 participants