RosettaCodeData/Task/Higher-order-functions/AutoHotkey/higher-order-functions.ahk
2023-07-01 13:44:08 -04:00

15 lines
206 B
AutoHotkey

f(x) {
return "This " . x
}
g(x) {
return "That " . x
}
show(fun) {
msgbox % %fun%("works")
}
show(Func("f")) ; either create a Func object
show("g") ; or just name the function
return