A function cannot use “set” and have it take effect outside itself, but we can get close to the required contract like this.
#let CoolFunction(it) = {
// This function will fail with list items other than 1 and 2..
let symbols = ("1": $subset.eq$, "2": $supset.eq$)
set enum(numbering: x => symbols.at(str(x)) + ":")
it
}
#show: CoolFunction
+ Proof of 1
+ Proof of 2
// alternative calling mode which only affects one numbered list
#CoolFunction[
+ Proof of 1
+ Proof of 2
]
Note that the function must get access to the list itself to be able to change it. With a show rule, or passed as an explicit parameter.
If you want to do this with list
instead of enum
I think it’s possible but more complicated, you’ll have to reimplement a little bit of list layout and item placement to change the marker per item, which just seems unnecessary.