g | x | w | all
Bytes Lang Time Link
003BQN250416T185131ZDLosc
004Uiua231019T191545Zchunes
012Raku Perl 6 rakudo250416T145050Zxrs
021JavaScript nontrivial210421T022614Zrydwolf
140SAKO250416T042401ZAcrimori
045YASEPL240208T170552Zmadeforl
075TSQL240208T163433ZSam CD
014Labyrinth240207T061306ZBubbler
026sed231020T061254ZDillon D
006Ly220509T062022Zcnamejj
013Headass231020T021457Zthejonym
nan210421T014154Zlyxal
015Arturo230104T164244Zchunes
003K ngn/k221004T141849Zoeuf
015Juby221008T025644ZJordan
005K ngn/k220508T001513Zoeuf
028Nim221005T101308ZMichael
027dc221005T001835Zmanatwor
nanFig221004T013740Zsouth
024Desmos220507T184233ZAiden Ch
018AWK210505T001408ZPedro Ma
005TIBasic220508T204155ZYouserna
012Julia 1.0210421T132655ZMarcMush
093Batch220508T212828ZYouserna
016Python220508T201813Zloopy wa
006J220508T192004ZnaffetS
022Python 3220508T153046ZSapherey
025Mascarpone210628T010620ZSoup Gir
004Golfscript210526T103222ZEsoJihun
066Whitespace210527T065521ZKevin Cr
008Zsh o extendedglob210421T124513Zpxeger
015R210421T015709ZGiuseppe
369MMIX210505T013641ZNoLonger
019Pari/GP210505T004423ZJoe Slat
004K oK210430T144650Zmkst
057CSASM v2.4.0.2210426T041623Zabsolute
006x8616 machine code210425T100752Zuser1032
002Husk210425T063625ZDominic
005APL Dyalog Unicode210424T034121ZAndrew O
032C gcc210421T064921ZAZTECCO
017Ruby210422T010428ZSony San
040brainfuck210421T232803ZHand-E-F
013Perl 5 p210421T165236ZXcali
018Racket210421T142901ZMLavrent
014Scala210421T130934Zuser
018Excel210421T125053ZEngineer
007Retina 0.8.2210421T101409ZNeil
005Charcoal210421T101229ZNeil
003Japt210421T085647ZShaggy
014Ruby210421T074324ZG B
025Red210421T064958ZGalen Iv
016Haskell210421T063313Zovs
006Raku210421T053050ZSean
008Vim210421T052214Zkops
021JavaScript210421T051521Zl4m2
017PowerShell210421T021829Zwasif
010V vim210421T035347ZRazetime
003Pip210421T025216ZDLosc
027Branch210421T021847Zhyperneu
002Pyth210421T021524Zhakr14
002Jelly210421T021326Zcaird co
018JavaScript Node.js210421T020634Zhyperneu
018Python 3210421T015509Zwasif
002Arn 1.0 s210421T015421ZZippyMag
002Jelly210421T014429Zcaird co
007Proton210421T014518Zhyperneu

BQN, 3 bytes

⌈´⊐

Returns a truthy integer if the items are not all the same. Returns 0 (falsey) if the items are all the same. Try it at BQN online!

Explanation

The code actually returns the number of distinct items in the list, minus one:

  ⊐  Classify: associate each distinct item with a number starting at 0, and
     replace each item in the list with its associated number
⌈´   Get the maximum

Alternate 3-byters

+´⊐  Classify and get the sum
∨´⊐  Classify and get the logical OR
∧≡∨  Sort ascending is identical to sort descending
⍋≡⍒  Grade up is identical to grade down
⍋≡⊒  Grade up is identical to occurrence count

Uiua, 4 bytes

≍↻1.

Try it!

≍↻1.
   .  # duplicate
 ↻1   # rotate an array by one
≍     # do they match?

Raku (Perl 6) (rakudo), 12 bytes

{.unique==1}

Attempt This Online!

JavaScript (non-trivial), 22 21 bytes

Thanks to @l4m2 for -1

d=>!d.some(x=>x-d[0])

Try it online!

This one's different from the new Set approach because it returns an actual truthy/falsy value. Although it's not as short (by just 4B, surprisingly), it's what you'd probably use if you needed this in real life, so it's definitely worth having here.

You could make it a byte shorter by removing the !, but then it returns false if all items are the same and true otherwise.

SAKO, 140 bytes

CALKOWITE:*N,I
BLOK(9):N
CZYTAJWIERSZ:N
I=-1
3)I=I+1
GDYN(I+1)=58:2,INACZEJ1
1)GDYN(I)=N(I+1):3,INACZEJ4
4)I=-1
2)DRUKUJ(0):I+1
STOP2
KONIEC

Input list as numbers without separators. Returns 0 for True and a positive number for False.

Takes input as a string thanks to consistent range [0, 9].
Then we just loop over the list comparing each element, and when the end is reached I is printed.

YASEPL, 45 bytes

=a=1'±comma=c®1=d¥0,1`1=e¥a,1}7,d,3!+}2,c`3!<

input list as numbers seperated by commas (like 5,16,24,26,29,12,1)

outputs the list's length if true, outputs the first occurrence of a different number if false

T-SQL 75 bytes

declare @x table (y int) insert @x values...

select top 1 1 from @x a where not exists (select*from @x b where b.y!=a.y)

will return 1 for true, nothing for false

Labyrinth, 14 bytes

:,:
" }
=*$
@!

Try it online!

Takes input from stdin without any separators. Prints a negative integer if the items are equal, a positive integer otherwise.

:,:    Precondition: top of stack is either 0 (first iteration)
" }                  or the previous char (the rest)
=*$    First iteration: [(implicit 0) | ]
       :,:  dup; getchar; dup  [ 0 0 c c | ]
       }    move data to right [ 0 0 c | c ]
       $*   xor; mul           [ 0 | c ]
       top is 0; go straight
       =    swap tops          [ c | 0 ]
       top is positive; turn right
       "    no-op

       Next iterations: [ c | ]
       :,:  [ c c c2 c2 | ]
       }    [ c c c2 | c2 ]
       $*   [ c*(c^c2) | c2 ]
       top is zero iff c == c2. if so, go straight
         =    [ c2 | ... ]
       otherwise, turn left to exit the loop
         !    print c*(c^c2)
         the value is negative if c2 < 0 (EOF), positive otherwise
         @    halt

Since the main conditional looks like

if some value is zero, keep running the loop
otherwise exit

there has to be a straight path somewhere in the loop, so a loop of size 8 is unavoidable.

sed, 26 bytes

$!{N;/^\(.*\)\n\1$/D;Q1};Q

Try it online! - Takes input as a newline separated list of numbers, exits with a non-zero exit code for "false" (i.e. not a uniform list).

Explanation
$!{                    }     if not last line, do these
   N;                          append next input line to pattern space
     /^\(.*\)\n\1$/            if pattern space is two identical lines
                   D;            delete first line, and GOTO beginning
                     Q1        quit with exit code 1 (no printing)
                        ;Q   quit with exit code 0 (no printing)

Ly, 6 bytes

a0I=u;

Try it online!

This one works by sorting the list of number and comparing the top and bottom of the stack.

a       - sort the stack, implicitly reads the numbers first
 0I     - copy the bottom entry to top of the stack
   =    - compare the top two entries
    u;  - print boolean result, exit to stop from auto printing the stack

jq, 14 bytes

unique[1]//"T"

Try it online!

This one generates a list of unique numbers, then attempts to print the second member of that list. The // operator catches the exception and substitutes T if there's only one number.

Headass, 13 bytes

U{N(+)P:R(U)}

Try It Online! - prints 1 for truthy and nothing for falsy

Explanation
U{N(+)P:R(U)} full program
U             ready first
 {N(+) :    } while inputs remain
        R(U)    if readied input != next input, terminate program
          U     (while running this conditional, ready next input)
      P       print 1

Trivial Built-in Answers

This is the post for all of the languages where this is a built-in

Vyxal, 1 byte

Try it Online!

Jelly, 1 byte

E

Try it online!

05AB1E (legacy), 1 byte

Ë

Try it online!

Wolfram Language (Mathematica), 5 bytes

Equal

Try it online!

SameQ also works.

Brachylog, 1 byte

=

Try it online!

Husk, 1 byte

E

Try it online!

Haskell + hgl, 2 bytes

lq

Try it online!

Factor, 3 bytes

std

Try it online!

Outputs 0.0 if they're the same, or something else if not. all-eq? and all-equal? are longer built-ins that output booleans. all-equal? uses = (ordinary equality) and all-eq? uses eq? (strict object reference equality), but they behave the same for integers.

Thunno, \$2 \log_{256}(96) \approx\$ 1.65 bytes

ze

Attempt This Online!

Thunno 2, 1 byte

Attempt This Online!

Arturo, 19 15 bytes

$->a->[]=a--a\0

Try it

$->a->      ; a function taking an argument a
    []=     ; is the empty block equal to...
    a--a\0  ; the input with the value of its first element removed everywhere?

K (ngn/k), 10 3 bytes

#?:

Try it online!

Down 7 bytes thanks to Steffan

Dead simple. 1 for true, and >1 for false.

Explanation:

#?:    Main function. Takes implicit input
  :    Right (apply what's on the left to the right)
 ?     Unique
#      Length

J-uby, 15 bytes

Same technique as Sony Santos.

:uniq|~:[]&1|:!

Attempt This Online!

Explanation

:uniq |     # Get unique elements
~:[] & 1 |  # Get element at index 1 (will be nil if there is only one unique)
:!          # Negate (number becomes false, nil becomes true)

K (ngn/k), 5 bytes

1=#?:

Try it online!

-2 bytes thanks to ngn

Returns 1 for true, 0 for false.

Checks if 1 is equal to the length of unique elements in x

Nim, 28 bytes

proc(x:any):any=x.min==x.max

Try it online!

import sugar
x=>x.min==x.max

Try it online!

dc, 27 characters

?[0p3Q]sq[d3R!=qz0<c]dscx1p

Sample run:

bash-5.1$ dc -e '?[0p3Q]sq[d3R!=qz0<c]dscx1p' <<< '1 1 1 1 1 1 1'
1

bash-5.1$ dc -e '?[0p3Q]sq[d3R!=qz0<c]dscx1p' <<< '6 9 6 9 6'
0

Try all test cases online!
(Note that choosing dc as interpreter and running the test separately fails both in TIO and ATO. ☹)

Fig, \$2\log_{256}(96)\approx\$ 1.646 bytes

LU

If you test input cases, the Fig site demands no spaces, ie. [x,y,z] not [x, y, z]. Outputs 1 if all equal, else >1.

Try it online!

LU
 U  : Uniquify with implicit input
L   : Length

Desmos, 24 bytes

f(l)=(l[2...]-l)^2.total

Returns 0 for truthy, and a positive number (not 0) for falsey.

Try It On Desmos!

Try It On Desmos! - Prettified

AWK, 18 bytes

1,$0=NF~gsub($1,e)

Attempt This Online!

Revisiting my former answer, I realized that if I wanted $0 to be printed every time, I can use range patterns. In fact, if begpat (the left part) is always true, then the range pattern is always true. So I substituted the appending ( )e technique to the range pattern 1,, saving one byte.

AWK, 19 bytes (former answer)

$0=(NF~gsub($1,e))e

Try it online!

In details:

       gsub($1,e)    Searches and substitutes every occurrence of the first number
                     of the input ($1) for a null variable (e). It returns the
                     number of substitutions made.

    NF~              Matches the Number of Fields (i.e., number of items) and the
                     number of substitutions.
                     We expect 1 or 0 as result, but there will be no output when
                     it parses as 0. (AWK skips falsey patterns, and 0 is falsey.)

   (             )e  Appending a null variable converts 1 to "1" and 0 to "0".
                     That's good, because strings are always true.

$0=                  Sets the original input to the resulting "1" or "0".
                     As the pattern is a string, it is printed.

TI-Basic, 5 bytes

min(Ans=min(Ans

Takes input in Ans. Outputs 0 for falsey, and 1 for truthy.

Julia 1.0, 12 bytes

length∘∪

Try it online!

Julia 1.8, 8 bytes

allequal

Attempt This Online! when ATO updates to 1.8

Julia 0.6, 3 bytes

var

Try it online!

Batch, 93 bytes

@set i=%1
:l
@if %i:~,1%==%i:~-1% (if %i% gtr 9 (set/ai=%i%/10&goto:l)else echo 1)else echo 0

Takes input from the command line as a string of numbers. Outputs 0 for falsey, and 1 for truthy.

Python, 16 bytes

def f(a):b,={*a}

Attempt This Online!

Signals by exit code.

Python NumPy, 16 bytes

lambda a:a.ptp()

Attempt This Online!

Takes a numpy array and returns 0 for True and 1 or more for False.

J, 6 bytes

1=#&~.

Attempt This Online!

Outputs 0 for falsey, and 1 for truth.

How?

1=#&~.
   &    Compose:
  #     The length of
    ~.  The nub (of the input)
1=      Is it equal to one?

Python 3, 22 bytes

lambda n:len(set(n))<2

Try it online!

Set function takes all the unique elements of the group only.

Mascarpone, 25 bytes

,['0.]v*1['1.]v*']<[:,>!]v*' <:' >,<:,>!

Try It Online!

This program accepts strings similar to this one:

"[2 8 1 6 4]"

and prints either '1' or '0' to stdout, with no newline.

Explanation

,['0.]v*1['1.]v*']<[:,>!]v*' <:' >,<:,>!
,['0.]v*1                                    First we take and ignore the first input
                                             character '[', and create an interpreter
                                             for which the default operation is to print
         ['1.]v*']<                          '0'. Next we bind the operation "print '1'"
                                             to the symbol ']' under this interpreter.   
                   [:,>!]v*                  Now we push an operation that takes a symbol
                                             from stdin, extracts the operation associated
                                             with that symbol from the interpreter on the
                                             stack, and executes it.                     
                           ' <               We now bind this operation to the space
                              :' >           character.  Immediately, we extract the
                                             operation back out of the interpreter, and
                                  ,<         bind it to the next symbol from stdin, which
                                             is the first number in the list.  Finally, we
                                    :,>!     manually execute the function once, to begin
                                             the cycle.  Now, the interpreter will continue
                                             to take input until it receives a symbol that
                                             is neither space nor the first number.  The
                                             program will print '1' if that symbol is ']',
                                             otherwise it will print '0'.

I wrote a solution in 36 characters, however the input/output format is inconvenient enough that I don't think it qualifies:

,[$.]v*1['1.]v*']<[:,$,>!]v*,<:,$,>!

It takes strings similar to this:

"[2 8 1 6 4 ]"

and prints '1' if the items are all equal, and '[' otherwise.

As Mascarpone is character-set-agnostic (provided the set contains the 17 symbols used by the initial interpreter) and only 26 unique characters are needed for this program to succeed (the 17 original instructions, the space character, and the characters 2-9), we require only 5 bits per character. By this logic, the solutions would be 25 bytes and 22.5 bytes in size, respectively.

Golfscript, 4 bytes

~.&,

For the input: a set of numbers should be placed in '[]' without commas.

For the output: 1 is a truthy value while integers greater than 1 are falsey.

Try it online!

Explanation:

I hope this does not count as a 'trivial solution'... :)

~    # Evals the input to generate a list. 
 .   # Duplicates the list. 
  &  # Does setwise AND. Doing AND on two same lists will have the effect of removing duplicate elements. 
   , # Returns the length of the remaining list. 

Whitespace, 66 bytes

[S S S N
_Push_0][S N
S _Duplicate_0][T   N
T   T   _Read_STDIN_as_integer][T   T   T   _Retrieve_input][N
S S N
_Label_LOOP][S N
S _Duplicate_first_input][S N
S _Duplicate][S N
S _Duplicate][T N
T   T   _Read_STDIN_as_integer][T   T   T   _Retrieve_input][S N
S _Duplicate][N
T   T   S N
_If_neg_Jump_to_Label_DONE][T   S S T   _Subtract][N
T   S N
_If_0_Jump_to_Label_LOOP][T N
S T _Print_as_integer][N
N
N
_Exit_program][N
S S S N
_Create_Label_DONE][T   N
S T _Print_as_integer]

Letters S (space), T (tab), and N (new-line) added as highlighting only.
[..._some_action] added as explanation only.

Takes the input-list new-line separated with -1 to indicate we're done with the inputs. Outputs -1 as truthy, and the first input as falsey (+4 bytes to output 0 instead if this is not allowed).

Try it online (with raw spaces, tabs and new-lines only).

Explanation in pseudo-code:

Integer firstInput = STDIN as integer
Start LOOP:
  Integer next = STDIN as integer
  If (next == -1):
    Print next as integer to STDOUT
    (Stop program with error: no exit defined)
  If (firstInput == next):
    Go to next iteration of LOOP
  Else:
    Print firstInput as integer to STDOUT
    Stop program

Zsh -o extendedglob, 8 bytes

>$@
<^$1

Try it online!

Outputs via exit code; 1 for all the same, 0 for not all the same

R, 17 15 bytes

sd(scan()+!1:2)

Try it online!

Outputs 0 for truthy and nonzero for falsey.

Using sd is a classic R golfing trick: the standard deviation is 0 if and only if all elements are equal. Unfortunately, sd returns NA for length one input (since it divides by n-1). A neat workaround found by pajonk uses R's recycling: !1:2 is coerced to a vector c(0,0) and is added to the input vector. A length-one input is recycled to be length 2 (so the sd is guaranteed to be 0), and for input of length more than 1, the zeros are recycled to the length of the longer vector, which won't change the standard deviation.

sd(rep(scan(),2))

Try it online!

MMIX, 36 bytes (9 instrs)

Takes array of bytes and length as two arguments, C conventions

00000000: 83020000 27010101 82ff0001 32ffff02  ³£¡¡'¢¢¢²”¡¢2””£
00000010: 52ff0002 f8000000 5b01fffb e3000001  R”¡£ẏ¡¡¡[¢”»ẉ¡¡¢
00000020: f8010000                             ẏ¢¡¡

Disassembly and explanation:

alleq   LDBU $2,$0,0        // x = *a
0H      SUBU $1,$1,1
        LDBU $255,$0,$1     // loop: t = a[--l]
        CMPU $255,$255,$2
        PBZ  $255,0F        // iflikely(t == x) goto skp
        POP  0,0            // return 0 (abuses how POP works)
0H      PBNZ $1,0B          // skp: iflikely(l) goto loop
        SETL $0,1
        POP  1,0            // return 1

Pari/GP, 19 bytes

v(s)=gcd(s)==lcm(s)

Try it online!

K (oK), 4 bytes

Solution:

1=#?

Try it online!

Explanation:

Is the count of the unique items equal to 1?

1=#? / the solution
   ? / unique
  #  / count
1=   / equal to 1?

CSASM v2.4.0.2, 57 bytes

Pops an ~arr:i32 from the stack, then pushes true (all elements are the same) or false (some elements are different).

func a:
dup
len
swap
newset
conv ~arr
len
comp.gt
push $f.o
ret
end

Explanation + Full Program:

.asm_name AllSame

func main:
    .local i : ~arr:i32,5
    .local j : ~arr:i32,5

    ; Initialize the arrays
    ; i = [ 1, 1, 1, 1, 1 ]
    push i
    push 1
    stelem 0

    push i
    push 1
    stelem 1

    push i
    push 1
    stelem 2

    push i
    push 1
    stelem 3

    push i
    push 1
    stelem 4

    ; j = [ 1, 2, 3, 4, 5 ]
    push [1..5]
    conv ~arr
    pop j

    clf.o

    ; Get the first result
    push i
    call a

    ; Print it
    push "Is 'i' all same? "
    swap
    add
    print.n

    clf.o

    ; Get the second result
    push j
    call a

    ; Print it
    push "Is 'j' all same? "
    swap
    add
    print.n

    ret
end

func a:
    dup
    ; [ array, array ]
    len
    ; [ array, length ]
    swap
    ; [ length, array ]
    newset
    ; [ length, set ]
    conv ~arr
    ; [ length, set elements ]
    len
    ; [ length, element count ]
    comp.gt
    ; If "length" is greater than "element count", then the set had duplicate
    ;   entries which were removed

    ; Push the comparison flag
    push $f.o
    ret
end
```

x86-16 machine code, 6 bytes

Hexdump:

0000:0000  89 F7 AC F3 AE C3                                ......

Explanation

                                   ; Routine A. [All The Same?]
                                   ; Expects CX = Length of input,
                                   ;         SI = Initial address of list.

0000:0000  89F7        MOV DI, SI  ; A1 [Load]. Set DI to SI.
0000:0002  AC          LODSB       ;            AL = [SI++].
0000:0003  F3AE        REPZ SCASB  ; A2 [Compare].
                                   ;       ZF = 1
                                   ;       Loop CX times:
                                   ;           If AX != [DI]:
                                   ;               ZF = 0
                                   ;               Proceed to A3
                                   ;           DI ++
0000:0105  C3          RET         ; A3 [End]. End of algorithm.
                                   ;           ZF = 0 if not all same.
                                   ;           ZF = 1 if all same. █

Husk, 2 bytes

And thanks to Razetime for some other 2-byters

(the 1-byte Husk built-in is E (same))

hg

Try it online!

Returns truthy (nonempty list) if all elements are not the same, falsy (empty list) if they're all the same. Collects groups of equal values and returns the head by discarding the last group.

(Other 2-byters with various truthy/falsy & falsy/truthy return values: ËI, Ë=, #≠, and some 3-byters: ΠẊ=, hk=, hġ=, hü=)

APL (Dyalog Unicode), 5 bytes

×/⊢=⊃
×/ ⍝ product reduce
  ⊢=⊃ ⍝ three train, each element equal to first element

Try it online!

C (gcc), 35 32 bytes

f(int*l){l=~l[1]&&*l-*++l+f(l);}

Try it online!

{l=      - return using eax trick
~l[1]&&  - return False if next item is end and skip next part ending recursion 
*l-*++l  - 0 if different 
+f(l);}  - plus check next item 

Ruby, 17 bytes

f=->a{!a.uniq[1]}

Explanation: a.uniq is an array with unique elements of a. If all elements are the same, its second element [1] will be nil, and !nil is true.

Older answer was more readable:

f=->a{a.uniq.size==1}

brainfuck, 40 bytes

Works for all characters, not just 0 to 9! (except NUL)

Returns zero for true and non-zero for false.

,[>,]<[->+<]<[[->+>-<<]>>[<[-]>>>]<<<]>.

Try it online!

Perl 5 -p, 13 bytes

$_=/^(.)\1*$/

Try it online!

Since the input is all single digit numbers, this wants the input without spaces.

Racket, 37 18 bytes

(λ(x)(apply = x))

Try it online!

-19 thanks to Wezl

This takes advantages of the fact that = in Racket can take any number of arguments. Note that the tio seems to run an old version that requires at least 2 arguments to = and so fails on the singleton list, but this works on my local Racket 8 installation.

Scala, 14 bytes

_.toSet.size<2

Try it online!

Excel, 18 bytes

=MAX(A:A)=MIN(A:A)

Input is in column A. The formula can be input anywhere not in column A.

Retina 0.8.2, 7 bytes

D`.
^.$

Try it online! Link includes test cases. Takes input as a string of digits. Explanation:

D`.

Remove duplicate digits.

^.$

Check that only one digit is left.

Charcoal, 5 bytes

⁼⌊θ⌈θ

Try it online! Link is to verbose version of code. Takes input as a string of digits by default but you can feed it an array if you insist. Outputs a Charcoal boolean, i.e. - for equal, nothing if not. Explanation: Simply compares the minimum and maximum input element.

Japt, 3 bytes

Returns 1 for true >1 for false.

â l

Try it (includes all test cases)

Ruby, 14 bytes

->a{!(a|a)[1]}

Try it online!

Red, 25 bytes

func[s][single? unique s]

Doesn't work in TIO - apparently single? has been added in the subsequent versions.

enter image description here

Using parse, 54 bytes

func[s][parse s[set t skip(r: reduce['quote t])any r]]

Try it online!

Much longer, but a bit more interesting.

Explanation:

Red's parse works not only on strings, but on all types of series (block! paren! string! file! url! path! lit-path! set-path! get-path! vector! hash! binary! tag! email! image!).

f: func[s][
    parse s [                   ; parse the input
        set t skip              ; sets `t` to the first item 
                                ; a literal integer can't be used as a parse rule 
        (r: reduce['quote t])   ; that's why set `r` to `t`'s quoted value 
        any r                   ; zero or more `r`  
    ]
]

Haskell, 16 bytes

-12 bytes thanks to Delfad0r.

f(a:x)=all(==a)x

Try it online!

Another 16 byter:

f(a:x)=x==(a<$x)

Try it online!

Raku, 7 6 bytes

2>*.Set

+*.Set

Try it online!

*.Set converts the input list into a set. That set's size is then compared with 2 returned.

-1 byte thanks to Razetime

Vim, 8 bytes

:g/<C-r><C-w>/d

Try it online!

This uses the assumption that list elements are one character. Ctrl+RCtrl+W inserts the word under the cursor, so this solution applies the delete command to any line which contains the first element of the list. This results in an empty file if they're all the same, or some non-empty lines if they aren't.

If we weren't allowed to assume that items are in the range [0,9] then we could give false positives on numbers which are supersets of each other. We could fix this by using a regex instead for one more byte:

Vim, 9 bytes

:%s/<C-r><C-w>\n

Try it online!

Vim doesn't have a concept of truthy/falsey values but if one were to believe that a buffer containing only newlines was falsey, then we could drop the \n from this regex to get a 7 byte solution.

JavaScript, 21 bytes

d=>/^(.)\1*$/.test(d)

Try it online!

PowerShell, 17 bytes

($args|gu).length

Try it online!

Outputs 1 for truthy and anything else for falsy.

V (vim), 10 bytes

:sor u
Gd{

Try it online!

Input as a list of lines. Outputs a falsy value (Empty output) for all items equal, and outputs a number otherwise.

Gets the unique lines, goes to the last line and deletes till the beginning.

Pip, 3 bytes

$=g

Full program; takes the items from command-line arguments. Try it online!

Alternately, a function solution that takes a list as its argument (also 3 bytes):

$=_

Try it online!

Explanation

Not quite a builtin.

Pip, like Python, has chaining comparison operators: 1<5>=3 means 1<5 & 5>=3, and 1=1=1=2 means 1=1 & 1=1 & 1=2. Unlike Python, Pip also has the meta-operator $, which folds a list on a binary operator. For example, $+ folds a list on addition, returning the sum; and $= folds a list on =. Because = chains, this returns the result we want: 1 if all elements are equal and 0 otherwise. The program $=g applies this compound operator to the full arglist g.

Branch, 27 bytes

1O,[^\,N![o#)]n^=/;^\o^*On]

Try it on the online Branch interpreter!

There's got to be a much shorter way to do this...

Pyth, 2 bytes

l{

Test suite

Outputs 1 if all elements are equal, and some integer* greater than 1 otherwise.
* Number of unique elements.

Jelly, 2 bytes

IẸ

Try it online!

Outputs reversed (0 if all are equal, 1 if not)

How it works

IẸ - Main link. Takes a list L on the left
I  - Increments of L
 Ẹ - Are any non-zero?

JavaScript (Node.js), 18 bytes

a=>new Set(a).size

Try it online!

Couldn't find the name of the Set builtint. Thanks dingledooper :P (outputs using the 1,>1 method that pretty much everyone is using now)

Previously...

JavaScript (Node.js), 39 bytes

a=>a.map(x=>a[0]==x).reduce((x,y)=>x&y)

Try it online!

Python 3, 18 bytes

lambda x:len({*x})

Try it online!

-5 bytes thanks to @hyper-neutrino

I'm lucky.....

Arn 1.0 -s, 2 bytes

:@

Outputs 1 if all the same, >1 if they aren't all the same. Try it online (works in older version)

:@ groups identical values, -s takes size. This could be written as (:@)# as well, which would be 4 bytes («×+0)

Jelly, 2 bytes

QL

Try it online!

Husk, 2 bytes

Lu

Try it online!

05AB1E, 2 bytes

Ùg

Try it online!

APL(Dyalog Unicode), 2 bytes SBCS

≢∪

Try it on APLgolf!

Thanks to Bubbler for pointing this out!


Outputs 1 for truthy, \$>1\$ for falsey. These all use the same method: counting the number of unique elements.

If the same approach is also this trivial/short in your language, feel free to edit it in if you don't want to post an answer

Proton, 7 bytes

set+len

Try it online!

Outputs 1 for truthy and anything else for falsy.