# New Ticket Created by Zoffix Znet
# Please include the string: [perl #131488]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/Ticket/Display.html?id=131488 >
Normally, if you sink a .map, it gets eagerly evaluated:
<Zoffix__> m: <a b c>.map: &say
<camelia> rakudo-moar ef9872: OUTPUT: «abc»
<Zoffix__> m: for ^1 { <a b c>.map: &say; $ = 42 }
<camelia> rakudo-moar ef9872: OUTPUT: «abc»
However, this doesn't happen when the map is the last value of
a sunk Promise:
<Zoffix__> m: start { <a b c>.map: &say }; sleep 2;
<camelia> rakudo-moar ef9872: ( no output )
Workarounds:
<Zoffix__> m: start { @ = <a b c>.map: &say }; sleep 2;
<camelia> rakudo-moar ef9872: OUTPUT: «abc»
<Zoffix__> m: start { <a b c>.map: &say; 42 }; sleep 2;
<camelia> rakudo-moar ef9872: OUTPUT: «abc»
<Zoffix__> m: await start { <a b c>.map: &say; 42 }
<camelia> rakudo-moar ef9872: OUTPUT: «abc»
<Zoffix__> m: @ = start { <a b c>.map: &say; 42 }; sleep 2
<camelia> rakudo-moar ef9872: OUTPUT: «abc»