[Jprogramming] k programming challenge

Henry Rich henryhrich at gmail.com
Wed Jan 27 12:33:40 UTC 2016


That's clever.

Henry Rich

On 1/27/2016 12:15 AM, Raul Miller wrote:
> I guess I'd be inclined to do it like this:
>
> require'web/gethttp'
> const=: gethttp 'http://usconstitution.net/const.txt'
> words=: [: ;: ' '"_`(I.@:= toupper)`]}~@tolower
>
>     \:~ (<@#/.~,.~.)words const
> +---+-----+
> |727|the  |
> +---+-----+
> |495|of   |
> +---+-----+
> |306|shall|
> +---+-----+
> |264|and  |
> +---+-----+
> |202|to   |
> ...
>
> Though of course, it's possible to format that result differently.
>
> Thanks,
>



More information about the Programming mailing list