maximumBy (on compare length) . filter ((< 3) . length . filter (`elem` "aeiou")) $ words phrase
`sort(split(p)[count.(r"[aeiou]", split(p)) .< 3]; by=r -> length(r))[end]`
which also returns "grasp".
But this one appeals to me more, because it doesn’t split twice:
`sort(filter(w -> count(r"[aeiou]", w) < 3, split(p)); by=r -> length(r))[end]`
maxBy(on cmp (#)).(((<3).(#).(el"aeiou"|=))|=)$words phrase
`sort(split(p)[count.(r"[aeiou]", split(p)) .< 3]; by=r -> length(r))[end]`
which also returns "grasp".
But this one appeals to me more, because it doesn’t split twice:
`sort(filter(w -> count(r"[aeiou]", w) < 3, split(p)); by=r -> length(r))[end]`