RosettaCodeData/Task/Higher-order-functions/AutoHotkey/higher-order-functions.ahk
2016-12-05 22:15:40 +01: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