I'd like some help to understand the statements in Wednesday's lesson, which I'll copy here and hope you can identify back to the lesson workbook.
(* When no explicit RoundingRadius is given, scale it with the \
FrameMargin: *)
frameText[text_String, options : OptionsPattern[]] /;
FreeQ[{options}, RoundingRadius] := Framed[
Text[text],
RoundingRadius -> OptionValue[FrameMargins]/2,
Sequence @@
DeleteCases[{options}, Alternatives[RoundingRadius -> _]]
];
I don't understand how to inquire on the value of text and options when the function call is parsed ie. frameText[text_String, options : OptionsPattern[]] . Perhaps first question is whether once can inquire what would be assigned to text and to options?
In any case the programmer placed option is a List ie {options} inside function calls to FreeQ and DeleteCases. They also knew it was sufficient to ask test {options} with RoundingRadius instead of "RoundingRadius" in FreeQ. which isn't entirely obvious from the Help Documentation of FreeQ.
I'm also not entirely sure how to interpret Alternatives[RoundingRadius -> _ used inside the call to DeleteCases. The documentation of Alternatives describes usage with more than one alternative to choose from so Alternative[arg] is vague. Lastly my understanding of the syntax RoundingRadius->_ would require that RoundingRadius->val was assigned which FreeQ would have screen out as False so would this whole statement not be redundant and so never called upon?
Thanks.