Skip to main content
1 of 3
Jonathan Allan
  • 110.2k
  • 7
  • 65
  • 282

Jelly, 25 bytes

ṫi¥³ḣi
L2ṗŒ!瀵ạ2\S€ỊḄµÞṪ

A full program taking the bit-strings using 1 and 2* as lists. The arguments are from and to. The program prints a list of lists of the same.

* 0 and 1 may be used instead at the cost of a byte (add between L2ṗ and Œ!ç€... to decrement).

Try it online!

Jonathan Allan
  • 110.2k
  • 7
  • 65
  • 282