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

"See also" that guides users to related functions #4

Open
exoego opened this issue Jul 4, 2019 · 1 comment
Open

"See also" that guides users to related functions #4

exoego opened this issue Jul 4, 2019 · 1 comment

Comments

@exoego
Copy link
Contributor

exoego commented Jul 4, 2019

There are some comibinations of functions that are related to each other, e.g.

  • compose and andThen in Function
  • drop | dropRight | dropWhile | take | takeRight | takeWhile in Collection
  • head | headOption | last | lastOption in Collection
  • ...

I think adding a see-also table or something to each page would be helpful for readers, so that they can find related functions even if they don't know names of all functions.

Such goal could be realized by mentioning related function in page.
But I think it could be error-prone and tedious... especially when accounting translation into.
So it would be nicer if relations between functions are generated by Jekyl for all pages in all translations, in single source of truth, like see-also.yml or something like that.

see-also:
  group1: [compose,andThen]
  group2: [drop,dropRight,dropWhile,take,takeRight,takeWhile]
  group3: [head,headOption,last,lastOption]
  ...

I don't know Jekyll much... it may have such feature ?

@superruzafa
Copy link
Owner

Yes, I already though about that. Since these relationships are language-agnostic it should be placed somewhere outside the .md translated files.
Also, I think it should be a short list because almost every function could be related with the rest of them in one way or another.

The idea is to have something like this:

head:
    last is the right-to-left case
    tail is the opposite
    headOption is the safe way

In addition, it should be easy to work with that relationships for translators.

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