--- /dev/null
+# From https://mlochbaum.github.io/BQN/doc/control.html
+While ← {𝕩•_while_𝕨@}´
+
+Prep←{
+ start⇐'S'=𝕩
+ end⇐'E'=𝕩
+ map⇐'~'-˜𝕩+(start×'a'-'S')+(end×'z'-'E')
+ start∨↩'a'=𝕩
+}
+
+Main←{𝕊⟨start,end,map⟩:
+ can_go_n←1≥(»map)-map
+ can_go_s←1≥(«map)-map
+ can_go_w←1≥(»˘map)-map
+ can_go_e←1≥(«˘map)-map
+ Flow←{
+ 𝕩∨(«𝕩∧can_go_n)∨(»𝕩∧can_go_s)∨(«˘𝕩∧can_go_w)∨(»˘𝕩∧can_go_e)
+ }
+ now←start
+ count←0
+ While {𝕤,¬∨´⥊(now∧end)}‿{𝕤
+ now↩Flow now
+ count+↩1
+ }
+ count
+}
+
+•Show Main Prep >•file.Lines ⊑•args