Pattern Matching
Let’s write a function to produce a greeting for someone based on their job. Here’s one naive approach using if
/else
:
Let’s write a function to produce a greeting for someone based on their job. Here’s one naive approach using if
/else
: