Skip to main content
deleted 1 character in body
Source Link
Galen Ivanov
  • 21.2k
  • 3
  • 24
  • 61

Red, 160160 154 bytes

func[b][loop 2[t: collect[until[parse keep rejoin
collect[forall b[keep take b/1]][any[thru"+"change
copy p to"+"(replace/all p".""*")]| skip]empty]]empty? b/1]]b: t]]

Try it online!Try it online!

Red, 160 bytes

func[b][loop 2[t: collect[until[parse keep rejoin
collect[forall b[keep take b/1]][any[thru"+"change
copy p to"+"(replace/all p".""*")]| skip]empty? b/1]]b: t]]

Try it online!

Red, 160 154 bytes

func[b][loop 2[t: collect[until[parse keep rejoin
collect[forall b[keep take b/1]][any[thru"+"change
copy p to"+"(replace/all p".""*")]]empty? b/1]]b: t]]

Try it online!

Source Link
Galen Ivanov
  • 21.2k
  • 3
  • 24
  • 61

Red, 160 bytes

func[b][loop 2[t: collect[until[parse keep rejoin
collect[forall b[keep take b/1]][any[thru"+"change
copy p to"+"(replace/all p".""*")]| skip]empty? b/1]]b: t]]

Try it online!