fosstodon.org is one of the many independent Mastodon servers you can use to participate in the fediverse.
Fosstodon is an invite only Mastodon instance that is open to those who are interested in technology; particularly free & open source software. If you wish to join, contact us for an invite.

Administered by:

Server stats:

10K
active users

Programming Challenge:
Write a function (in your favorite language) that, given an array of booleans, will return true only if the booleans are all true or all false.

So:
[true, true, true] is true
[false, false, false] is true
[true, true, false] is false

Bonus points for efficiency or cleverness, though all answers are appreciated.