Skip to main content
deleted 102 characters in body
Source Link
Unrelated String
  • 23.9k
  • 3
  • 37
  • 61

Brachylog, 55 4 bytes

ḅ.&≡ᵍ≡ᵍc? 

Try it online!Try it online!

-1 thanks to DLosc

Takes input as a list of digits ( currently can't handle numbers) through the input variable, and succeeds or fails as output.

 . ≡ᵍ The output variable is ḅ  a list of the runs of consecutive equal digits in the input,  &with identical elements grouped in order andof thefirst inputappearance c ≡ᵍ with its elements grouped notthe respectinggroups consecutivenessconcatenated   ? is also the output variableinput. 

Brachylog, 5 bytes

ḅ.&≡ᵍ 

Try it online!

Takes input as a list of digits ( currently can't handle numbers) through the input variable, and succeeds or fails as output.

 .  The output variable is ḅ  a list of the runs of consecutive equal digits in the input,  & and the input ≡ᵍ with its elements grouped not respecting consecutiveness   is also the output variable. 

Brachylog, 5 4 bytes

≡ᵍc? 

Try it online!

-1 thanks to DLosc

Takes input as a list of digits through the input variable, and succeeds or fails as output.

≡ᵍ The input with identical elements grouped in order of first appearance c with the groups concatenated ? is the input. 
Source Link
Unrelated String
  • 23.9k
  • 3
  • 37
  • 61

Brachylog, 5 bytes

ḅ.&≡ᵍ 

Try it online!

Takes input as a list of digits ( currently can't handle numbers) through the input variable, and succeeds or fails as output.

 . The output variable is ḅ a list of the runs of consecutive equal digits in the input, & and the input ≡ᵍ with its elements grouped not respecting consecutiveness is also the output variable.