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

Add example exercise answers to wiki? #213

Open
skokenes opened this issue Mar 6, 2019 · 4 comments
Open

Add example exercise answers to wiki? #213

skokenes opened this issue Mar 6, 2019 · 4 comments

Comments

@skokenes
Copy link

skokenes commented Mar 6, 2019

Hi, I'm working through the exercises at https://calmm-js.github.io/partial.lenses/exercises.html and am finding them really helpful. However, as I get towards the end I am finding that I'm not sure about what I'm doing exactly, even if I can get the correct answer. For example, I struggled for a while with figuring out the isomorphism example. I ended up with an answer like this that passed the test:

const a = L.conjugate(L.json(),L.pick({bar: ["foo", L.array(L.complement)]}));
const b = L.conjugate(L.json(), L.pick({foo: ["bar", L.array(L.complement)]}));
const iso = L.iso(L.get(a), L.get(b));

My issue now is that I have no clue of the "quality" of the answer. Have you thought at all about putting example solutions to these exercises in the wiki? It would be a nice resource for beginners like myself to learn from.

@polytypic
Copy link
Member

I struggled for a while with figuring out the isomorphism example.

Yes, it is probably one of the trickiest exercises on the page. There is a simpler answer...

Have you thought at all about putting example solutions to these exercises in the wiki?

That is a good idea. Could you create the page in the wiki with with your sample answers? I'll review the page and provide additional sample answers.

@skokenes
Copy link
Author

skokenes commented Mar 7, 2019

Ok here are my novice solutions to the problems https://github.com/calmm-js/partial.lenses/wiki/Exercise-Answers

Looking forward to seeing the alternatives

@polytypic
Copy link
Member

Thanks! I edited some of the answers and made a couple of additions. There really should be more exercises... Suggestions for exercises are welcome!

@skokenes
Copy link
Author

skokenes commented Mar 7, 2019

I don't understand lenses well enough yet to come up with the exercises but if someone can produce rough ideas for them, I'm happy to clean them up with sample code, tests, prompts and hints. Just really need someone to give me the seed idea, like "Use a lens to do x,y,z"

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