DavisVaughan · GitHub

@DavisVaughan mentioned this pull request

Jul 12, 2022

Merged

@DavisVaughan

@DavisVaughan DavisVaughan changed the title Draft case_match() and vec_case_match() Draft case_switch() and vec_case_switch()

Aug 10, 2022

@DavisVaughan DavisVaughan changed the title Draft case_switch() and vec_case_switch() Draft case_match() and vec_case_match()

Aug 11, 2022

@DavisVaughan

@DavisVaughan DavisVaughan changed the title Draft case_match() and vec_case_match() Implement case_match() and vec_case_match()

Aug 11, 2022

@DavisVaughan

hadley

@DavisVaughan

After thinking about this more, I think this more accurately captures the intention here, and is a more applicable name in other scenarios:
- `vec_case_match(needles, haystacks)` makes more sense
- `fct_case_match(new_lvl = haystack)` would make more sense since the LHS here is the resulting value, not the thing you switch on
- I seem to use "match" very frequently in the docs and the test descriptions, making me think that is the better name

@DavisVaughan

@DavisVaughan

@DavisVaughan

Closed

Read the original on github.com ↗