Dating agency: Difference between revisions

m
→‎{{header|Raku}}: allow for a tie
(julia example)
m (→‎{{header|Raku}}: allow for a tie)
Line 329:
for @liked.reverse Z, (1..10) { %matches{.[0]} += .[1] };
for @likes.reverse Z, (1..10) { %matches{.[0]} += .[1] };
say 'Best match: ' ~ %matches.maxgrep( *.value == %matches.values.max)».key.sort.join(', ');
say '';
}</lang>
Line 335:
<pre> Ahab will like: Eunice, Ursula, Irene, Holly, Fran, Genevieve, Zoey, Donna, Cecilia, Alice
Is liked by: Nancy, Theresa, Victoria, Genevieve, Alice, Rhonda, Kathlene, Odelle, Eunice, Pamela
Best match(s): Eunice, Genevieve
 
Brutus will like: Beth, Nancy, Quinci, Odelle, Josephine, Kathlene, Theresa, Rhonda, Wren, Margaret
Is liked by: Yasmine, Margaret, Loralie, Holly, Wren, Fran, Quinci, Eunice, Alice, Victoria
Best match(s): Quinci
 
Popeye will like: Loralie, Theresa, Stephanie, Yasmine, Alice, Cecilia, Donna, Zoey, Nancy, Genevieve
Is liked by: Loralie, Margaret, Holly, Wren, Yasmine, Fran, Quinci, Eunice, Alice, Victoria
Best match(s): Loralie</pre>
 
=={{header|Wren}}==
2,392

edits