Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!

Idiom #366 Test for set equality

Set b to true if the sets s and t have the same elements, false otherwise.

import "maps"
b := maps.Equal(s, t)

s and t must be implemented using the same type of map.

New implementation...
< >
programming-idioms.org