let
before s pos = sub s 0 pos