Updated range function to return a Wyscript list instead of a native array.