Stable marriage problem: Difference between revisions

Content added Content deleted
(→‎{{header|Perl 6}}: Removed null content in wrong position in file.)
m (→‎{{header|Haskell}}: Swapped last lang tag pair to pre to stop highlighting of random 'and'.)
Line 299: Line 299:
else putStrLn "Marriages are stable"</lang>
else putStrLn "Marriages are stable"</lang>
Task:
Task:
<lang haskell>*Main> task mp fp
<pre>*Main> task mp fp
abi with abe
abi with abe
cath with bob
cath with bob
Line 333: Line 333:


Marriages are unstable, e.g.:
Marriages are unstable, e.g.:
bea and fred like each other better than their current partners abi and jon</lang>
bea and fred like each other better than their current partners abi and jon</pre>


=={{header|J}}==
=={{header|J}}==