let rec find l result = match l with | [] -> result | head::tail -> if (String.length head) <= 3 then (find tail (result@[head])) else (find tail result);; let res = find ["12"; "abcd"; "www"; "456"] [];;