Skip to main content
-6
Source Link
chunes
  • 27.8k
  • 3
  • 32
  • 55

Arturo, 2828 22 bytes

$=>[=squeeze<=sort squeeze&]$=>[=unique<=squeeze&] 

Try it!Try it!

$=>[ ; a function where input is assigned to & squeeze& ; squeeze the input; e.g. [1 1 2 1 1 1 3 3] -> [1 2 1 3] sort ; sort <= ; duplicate squeezeunique  ; squeezeremove duplicates = ; are they equal? ] ; end function 

Arturo, 28 bytes

$=>[=squeeze<=sort squeeze&] 

Try it!

$=>[ ; a function where input is assigned to & squeeze& ; squeeze the input; e.g. [1 1 2 1 1 1 3 3] -> [1 2 1 3] sort ; sort <= ; duplicate squeeze ; squeeze = ; are they equal? ] ; end function 

Arturo, 28 22 bytes

$=>[=unique<=squeeze&] 

Try it!

$=>[ ; a function where input is assigned to & squeeze& ; squeeze the input; e.g. [1 1 2 1 1 1 3 3] -> [1 2 1 3] <= ; duplicate unique  ; remove duplicates = ; are they equal? ] ; end function 
-4; deleted 10 characters in body
Source Link
chunes
  • 27.8k
  • 3
  • 32
  • 55

Arturo, 3228 bytes

$=>[[]=--values tally$=>[=squeeze<=sort squeeze&1]squeeze&] 

Try it!Try it!

$=>[ ; a function where input is assigned to & squeeze& ; squeeze the input; e.g. [1 1 2 1 1 1 3 3] -> [1 2 1 3] tallysort  ; occurrencessort values<= ; get the values (the; counts)duplicate -- ...squeeze 1 ; remove the onessqueeze []== ; is the; emptyare blockthey equal to this? ] ; end function 

Arturo, 32 bytes

$=>[[]=--values tally squeeze&1] 

Try it!

$=>[ ; a function where input is assigned to & squeeze& ; squeeze the input; e.g. [1 1 2 1 1 1 3 3] -> [1 2 1 3] tally ; occurrences values ; get the values (the counts) -- ... 1 ; remove the ones []= ; is the empty block equal to this? ] ; end function 

Arturo, 28 bytes

$=>[=squeeze<=sort squeeze&] 

Try it!

$=>[ ; a function where input is assigned to & squeeze& ; squeeze the input; e.g. [1 1 2 1 1 1 3 3] -> [1 2 1 3] sort  ; sort <= ; duplicate squeeze ; squeeze = ; are they equal? ] ; end function 
Source Link
chunes
  • 27.8k
  • 3
  • 32
  • 55

Arturo, 32 bytes

$=>[[]=--values tally squeeze&1] 

Try it!

$=>[ ; a function where input is assigned to & squeeze& ; squeeze the input; e.g. [1 1 2 1 1 1 3 3] -> [1 2 1 3] tally ; occurrences values ; get the values (the counts) -- ... 1 ; remove the ones []= ; is the empty block equal to this? ] ; end function