-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
strain: Add parameters to exercise placeholder #642 #698
Conversation
f7ab5d0
to
bec8005
Compare
@@ -1,6 +1,6 @@ | |||
def keep(): | |||
def keep(sequence, predicate): |
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.
I like your variant, it's a good one.
But I think not everyone knows a concept of predicate
. Maybe it's better to change it to lambda_expression
?
The other option is to add hint for the exercise explaining a concept of predicate
(preferable)
What are your thoughts on this?
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.
Well, It seems from the problem statement that a predicate is requried. I don't really think it's necessary for the predicate to be a lambda function, it just has to be any function that takes the item from the list and returns a boolean.
I agree that a hint would be better, I found this little snippet from wikipedia:
a predicate P(x) will be true or false, depending on whether x belongs to a set.
https://en.wikipedia.org/wiki/Predicate_(mathematical_logic)
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.
Ahh, perhaps just add the predicate definition in the README.md?
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.
I am not sure actually, since there is an ability to generate these doc files from special templates. It helps staying in sync with https://github.com/exercism/problem-specifications/ and stuff like that.
Looks like this track uses old approach and I'll have to do a bit of research on what is the best way to add hints to exercises and come back to you. Is it Ok?
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.
ya, when I get some more time I can take a look too.
@jnaulty sorry for the late reply. Following our previous conversation, will it be possible to put hints in We use |
@jnaulty I've merged your PR, thanks for your help! I'll revisit our process of generating READMEs soon (hopefully) and move your definition you |
thanks @m-a-ge |
Fixes #642