Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

FWIW, I solved this in J as follows

F =: >@{.@(\: #@>)@(#~ (2 >: +/@e.&'aeoiu')@>)

which I think maybe composes a little better

This doesn't include the splitting. I would imagine I would be feeding this function from a boxed list from a word list, like: F 'b' fread 'dict.txt'

Also `;:` is unreliable on hyphenated words, etc. Better to use `cut`.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: