Qurak

OptionsPattern

ใช้งานได้

Pattern object that matches any sequence of options in function definitions

OptionsPattern[]
OptionsPattern[f]
OptionsPattern[{opt1 -> val1, opt2 -> val2, …}]
f[7, {a -> x, b -> y}] /. f[_, OptionsPattern[{}]] :> OptionValue[a] → f[7, {a -> x, b -> y}]

หัวข้อ

ที่เกี่ยวข้อง

ฟังก์ชันทั้งหมด 6300 รายการ · ใช้สิ่งนี้จากไคลเอนต์ MCP