-
-
Notifications
You must be signed in to change notification settings - Fork 111
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
Wording on Luigi's luscious lasagna #492
Comments
Hi there. This is a good point, we will have a think. The Elm syntax itself doesn't include constants, but people often call functions with zero parameters 'constants' (especially ones where the return value is just a single value, like in I think the second point is a bit easier, maybe "Define the remainingTimeInMinutes calculation (in the in part of the let expression) that takes two parameters [...]"? |
I didn't knew that constants were actually functions with zero parameters, I thought all functions took exactly one parameter. Regardless, the example shows
So it wouldn't be a constant either.
That would seem to imply that the calculation takes two parameters. Maybe just say that |
How about something like this?
|
That looks good. As minor details, It says "Define expectedMinutesInOven to check how many minutes the lasagna should be in the oven." but Throughout the problem it says "the number of layers you added", but, in fact, some layers may not have been added yet which is why you add the preparation time to the remaining time (if they were already added, they would not be remaining). Also, I noticed the dict's concept it says
It probably means "into a dict". Could you point to some reference where functions with zero parameters are explained? Thanks. |
Hi There, I'm not sure the const / function thing is explained anywhere. The fact that functions have no brackets mean that a constant and a zero parameter function are defined using the same syntax, and retrieved using the same syntax. This along with the fact that all functions are pure and all values are immutable means that there is no practical or logical difference between the two things. So it doesn't really matter what it is called I suppose. I'll make these changes, and updated the dict concept, unless you would like to? Cheers, Cedd |
Go ahead with the changes. |
I've made those changes, do you want to review the pull request above (#493)? |
Hello,
At Luigi's luscious lasagna's problem description it says (bolded by me)
The example shows that it should actually be a function, so I think saying to define it as a constant (a constant function?) is confusing. I have seen some community solutions and they seem to be split at defining it as a constant or a function.
Likewise, it says
But I don't think you can define the function in the
in
part of the let expression, but instead the function's body is a let expression whosein
part is the final calculation.The text was updated successfully, but these errors were encountered: