Probably it was simplicity of coding, but that is just my guess.

There is a ticket open for Clojure suggesting reducing the number of calls
to the function.  You, and anyone else who would like to see this changed
in the future, are welcome to vote on this ticket.

http://dev.clojure.org/jira/browse/CLJ-99

If you do not already have a JIRA account, you can quickly create one here:
http://dev.clojure.org/jira/secure/Signup!default.jspa

Andy

On Mon, Feb 9, 2015 at 8:43 AM, Frank Schmidt <[email protected]>
wrote:

> Hi,
>
> the min-key function is implemented recursively. Therefore in
>
> (min-key #(.length ^String %) "a" "aa" "aaa")
>
> the .length function is evaluated 4 times instead of 3 times.
>
> What are the reasons for this nice but inefficient implementation?
>
> Best wishes,
> Frank Schmidt
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to [email protected]
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to