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

Tweak pattern docs #187

Merged
merged 3 commits into from
Mar 11, 2024
Merged

Tweak pattern docs #187

merged 3 commits into from
Mar 11, 2024

Conversation

jariji
Copy link
Contributor

@jariji jariji commented Feb 29, 2024

I think this is a little better.

Closes #186

Copy link

codecov bot commented Feb 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 61.52%. Comparing base (9c9eb00) to head (80b083a).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #187   +/-   ##
=======================================
  Coverage   61.52%   61.52%           
=======================================
  Files          28       28           
  Lines        1627     1627           
=======================================
  Hits         1001     1001           
  Misses        626      626           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

MLStyle.jl allows you to put guards anywhere during matching.


Sometimes, in practice, you might want to introduce type variables into the scope, in this case use `where` clause. See [Advanced Type Patterns](#advanced-type-patterns) for more details.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't find these two paragrphs helpful so I removed them.


```julia-console
julia> @data Color begin
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is not necessary to introduce ADTs here. struct is more familiar and does the job.

@thautwarm thautwarm merged commit d0643ff into thautwarm:main Mar 11, 2024
17 checks passed
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.

Fix pattern matching docs section order
2 participants