You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm ubnable to access an external array value by index within a map function.
Here I'm attempting to write a python style zip function that zip two lists together. But on compilation it's throwing an error. I'm not entirely sure why this is happening since accessing arrays using indices outside the map function seem to work.
export function zip(list1:Array<string>, list2:Array<string>):string[][]{
return list1.map<string[]>((i:string,d:i32):string[] => [i, list2[d]])
}