splitDirections :: String -> (String, String)
splitDirections dirs =
    splitDirections' dirs 0 ([], [])
    where splitDirections' [] _index ret = ret
          splitDirections' (d:ds) index (s1, s2) =
              case mod index 2 of
                  0 -> splitDirections' ds (index+1) (s1++[d], s2)
                  1 -> splitDirections' ds (index+1) (s1, s2++[d])
splitDirections :: String -> (String, String)
splitDirections dirs =
    splitDirections' dirs 0 ([], [])
    where splitDirections' [] _index ret = ret
          splitDirections' (d:ds) index (s1, s2) =
              case mod index 2 of
                  0 -> splitDirections' ds (index+1) (s1++[d], s2)
                  1 -> splitDirections' ds (index+1) (s1, s2++[d])
splitDirections dirs =
    splitDirections' dirs 0 ([], [])
    where splitDirections' [] _index ret = ret
          splitDirections' (d:ds) index (s1, s2) =
              case mod index 2 of
                  0 -> splitDirections' ds (index+1) (s1++[d], s2)
                  1 -> splitDirections' ds (index+1) (s1, s2++[d])