Skip to main content
deleted 219 characters in body
Source Link

JavaScript (V8), 150150 95 bytes

-55 thanks to @dana

f=x=>{s="";xx=>[.split``.map.[...x].reduce(c=>{b=c(a,c)=>a+c.charCodeAt(0).toString(2);s+="0".repeatpadStart(7-b.length,0)+b},"");s=s.split``].map(c=>x!=(c,ix=c)=>i>0?c!=s[i-1]?1:0:1|0).join``;return s;}

Try it online!

Kind of embarrassingly long, but anyway. Would appreciate help with shortening some of the arrow functions - for some reason, currying didn't want to work.Try it online!

JavaScript (V8), 150 bytes

f=x=>{s="";x.split``.map(c=>{b=c.charCodeAt(0).toString(2);s+="0".repeat(7-b.length)+b});s=s.split``.map((c,i)=>i>0?c!=s[i-1]?1:0:1).join``;return s;}

Try it online!

Kind of embarrassingly long, but anyway. Would appreciate help with shortening some of the arrow functions - for some reason, currying didn't want to work.

JavaScript (V8), 150 95 bytes

-55 thanks to @dana

x=>[...[...x].reduce((a,c)=>a+c.charCodeAt(0).toString(2).padStart(7,0),"")].map(c=>x!=(x=c)|0)

Try it online!

Source Link

JavaScript (V8), 150 bytes

f=x=>{s="";x.split``.map(c=>{b=c.charCodeAt(0).toString(2);s+="0".repeat(7-b.length)+b});s=s.split``.map((c,i)=>i>0?c!=s[i-1]?1:0:1).join``;return s;}

Try it online!

Kind of embarrassingly long, but anyway. Would appreciate help with shortening some of the arrow functions - for some reason, currying didn't want to work.