Logo

Programming-Idioms

# 255 Print a set
Print the values of the set x to the standard output.
The order of the elements is irrelevant and is not required to remain the same next time.
Implementation
Haskell

Implementation edit is for fixing errors and enhancing with metadata. Please do not replace the code below with a different implementation.

Instead of changing the code of the snippet, consider creating another Haskell implementation.

Be concise.

Be useful.

All contributions dictatorially edited by webmasters to match personal tastes.

Please do not paste any copyright violating material.

Please try to avoid dependencies to third-party libraries and frameworks.

Other implementations
puts x
print(x)
System.out.println(x);
for el in x do writeln(el);
console.log(x);
use std::collections::HashSet;
println!("{:?}", x);
using System;
foreach (var el in x)
{
    Console.WriteLine(el);
}
using System;
Console.WriteLine(string.Join(Environment.NewLine, x));
print "$_\n" for @x;
echo $x;
print(x);
import "fmt"
for _, v := range x {
	fmt.Println(v)
}