Skip to content

confusing challenge in 4.3 #63

@goosetherumfoodle

Description

@goosetherumfoodle

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions