Task

Using either native language concurrency syntax or freely available libraries, write a program to display the strings "Enjoy" "Rosetta" "Code", one string per line, in random order.

Concurrency syntax must use threads, tasks, co-routines, or whatever concurrency is called in your language.




:- module concurrent_computing.
:- interface.
 
:- import_module io.
:- pred main(io::di, io::uo) is cc_multi.
 
:- implementation.
:- import_module thread.
 
main(!IO) :-
   spawn(io.print_cc("Enjoy\n"), !IO),
   spawn(io.print_cc("Rosetta\n"), !IO),
   spawn(io.print_cc("Code\n"), !IO).