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

Fix doc, example code for pipe lacks prefix #1692

Merged
merged 1 commit into from
Oct 20, 2023

Conversation

bgni
Copy link
Contributor

@bgni bgni commented Oct 19, 2023

The example code for "pipe" doesn't compile because the method "pipe" lacks prefix. Fixed by changing "pipe" to "std.function.pipe"

The example code for "pipe" doesn't compile because the method "pipe" lacks prefix. Fixed by changing "pipe" to "std.function.pipe"
Copy link
Member

@yannham yannham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we use this style in several places in the documentation of the the stdlib, assuming that the prefix is obvious from the context. That being said, I agree that having examples that can be run by copy pasting without having to do any additional guessing or patching is probably a better idea. Let's merge this, but ideally, we should probably make a pass on the whole stdlib to make it consistent

@yannham yannham added this pull request to the merge queue Oct 20, 2023
Merged via the queue into tweag:master with commit 933945d Oct 20, 2023
4 checks passed
@bgni
Copy link
Contributor Author

bgni commented Oct 20, 2023

I agree with all of that, for someone new to nickel (like me) it's very valuable to have at least one example for each method that is easy to understand and is complete, so you don't have to spend mental resources on figuring out how you can make it work without the prefix (maybe you can do that, I actually don't know).

The ideal in my opinion would be having one or more links to a playground with a executable example of using the method.

@bgni bgni deleted the bgni-fix-doc-pipe-missing-prefix branch October 20, 2023 17:33
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

Successfully merging this pull request may close these issues.

2 participants