On 14 Jun 2010, at 12:37, Steve Purcell wrote:
> On 14 Jun 2010, at 01:14, Todd wrote:
>
>> I'm attempting to write a simple histogram function:
>>
>>
>> (defn create-histogram [f]
>> (let
>> [words (read-lines f)
>>histo {}]
>> (doall
>> (map
>> (fn [w] (assoc histo w (+1 (ge
On 14 Jun 2010, at 01:14, Todd wrote:
> I'm attempting to write a simple histogram function:
>
>
> (defn create-histogram [f]
> (let
>[words (read-lines f)
> histo {}]
>(doall
> (map
>(fn [w] (assoc histo w (+1 (get histo w 0
>words))
>histo))
>
> (crea
I'm attempting to write a simple histogram function:
(defn create-histogram [f]
(let
[words (read-lines f)
histo {}]
(doall
(map
(fn [w] (assoc histo w (+1 (get histo w 0
words))
histo))
(create-histogram "./testwords")
The input, 'f', is expected