17
votes
2answers
301 views

Pattern that matches colors

Suppose I'm writing a function that takes a color as a parameter; for example: drawShape[color_] := Graphics[{Style[Disk[], color]}]; But if the caller inputs an ...
4
votes
2answers
195 views

Formatting text through pattern matching

I am trying to format some text based on some patterns. ...