Hi Markus,
This works fine in IDL 9.2:
IDL> !version.release
9.2.0
IDL> str_arr=['a{}','b{}']
IDL> fixed=(list(str_arr,/ex)).map(lambda('s:[s.replace("{}","x"),s.replace("{}","y")]'))
IDL> fixed
[
["ax", "ay"],
["bx", "by"]
]
IDL> print, str_arr.map(lambda('s:[s.replace("{}","x"),s.replace("{}","y")]'))
ax ay
bx by
IDL> help, str_arr.map(lambda('s:[s.replace("{}","x"),s.replace("{}","y")]'))
<Expression> STRING = Array[2, 2]
I don't recall all the details, but I think we fixed something a couple versions ago.
Cheers,
Chris
IDL Dev Lead