Skip to main content
added 79 characters in body
Source Link
Οurous
  • 8.1k
  • 1
  • 16
  • 38

Haskell, 4747 40 bytes

-7 thanks to OMᗺ

f b=letb|(u,v)=span<-span('/'/='<)b in"b="/1"++['0'|_<-u]==v1"++('0'<$u)==v

Try it online!Try it online!

A port of my Clean answer using Neil's method.

Haskell, 47 bytes

f b=let(u,v)=span('/'/=)b in"/1"++['0'|_<-u]==v

Try it online!

A port of my Clean answer using Neil's method.

Haskell, 47 40 bytes

-7 thanks to OMᗺ

f b|(u,v)<-span('/'<)b="/1"++('0'<$u)==v

Try it online!

A port of my Clean answer using Neil's method.

Source Link
Οurous
  • 8.1k
  • 1
  • 16
  • 38

Haskell, 47 bytes

f b=let(u,v)=span('/'/=)b in"/1"++['0'|_<-u]==v

Try it online!

A port of my Clean answer using Neil's method.