csci2041/repo-zhan4854/Lab_15/examples/three.src.txt

8 lines
126 B
Text
Raw Permalink Normal View History

2018-01-29 23:35:31 +00:00
function times2(x : int) =
x * 2;
function times2_array(arr : int[]) =
map(times2, arr);
times2_array([1, 2, 3, 4])