Browse thread
Re: Map is not tail recursive
- Marc Rouaix
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Marc Rouaix <rouaix@m...> |
| Subject: | Re: Map is not tail recursive |
I should have added that you can then write a function like this to choose your map function for you. let general_map fn lst = let n = List.length lst in if n < 1000 then List.map fn lst else jump_map (truncate (sqrt (float n))) fn lst --- Marc -----== Sent via Deja News, The Discussion Network ==----- http://www.dejanews.com/ Easy access to 50,000+ discussion forums