let
filter t ~f = rev (rev_filter t ~f)