Not sure if this is as designed, but it seems like something that should be doable:
let ans = a.filter(): _ % 2 == 0
.map(): _ + 1
yields an "identifier shadowing" error on _, but the function bodies for both the filter closure and the map closure should both have their own isolated scopes right?
Given precedence of ., it is probably trying to parse this as 0.map(): _ + 1 which is probably not what you intended.
Try putting () around the whole filter ?
Not sure if this is as designed, but it seems like something that should be doable:
yields an "identifier shadowing" error on
_
, but the function bodies for both the filter closure and the map closure should both have their own isolated scopes right?