Newbie asking for help: I have an array of numbers that needs to be transformed to an array of functions that return the original numbers, so instead of calling a[3], I need to call call a[3]()
E.g.:
[1,2,3] -> [
function () {return 1;},
function () {return 2;},
function () {return 3;}
]
How can I go about doing this?