-
-
Notifications
You must be signed in to change notification settings - Fork 110
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
Concept maybe #361
Concept maybe #361
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Matthieu, this looks good, and I would be happy to merge it.
One note is that I generally haven't been including function type signatures in the intial .elm file, and this one does have it. I'm not sure if we need to be consistent, but just flagging that we aren't.
Also, I take it that we are now planning an advanced Maybe concept? Where we can teach map and suchlike?
I wonder if it is worth teaching withDefault
in this exercise. It is useful in the very basic 'two-fer' practice exercise, and is something that a lot of beginners don't know
Cheers, Cedd
Ha good points, I haven't had the time to check all your PR's yet, but I think except from the basics where we want students to write themselves the type signature it's good to provide a type signature for those template initial elm files. It usually makes the task clearer and also reduces potential types issues for the functions we import in the tests files. But of course we should only provides types of the exposed functions, not helper functions. Regarding advanced concept exercises, I do thing we need few of them on most concepts like lists that I just reviewed and maybe. But you're probably right that |
I've added a introduce : Player -> String
introduce { name } =
Maybe.withDefault "Mighty Magician" name Don't hesitate to merge if you like it or let me know otherwise. |
No description provided.