From: Michal M. <mal...@pl...> - 2003-05-22 18:04:54
|
On Thu, May 22, 2003 at 06:57:01PM +0200, Remi Vanicat wrote: > well, in the original code, one have : > > let kmp p = > let next = init_next p > and m = String.length p in > function s -> > > So Partial application of the first argument already compute the next > table. and so you can call the computed function on several different > string. With the minor performance hit of additional closure allocation. -- : Michal Moskal :: http://www.kernel.pl/~malekith : GCS {C,UL}++++$ a? !tv : PLD Linux ::::::::: Wroclaw University, CS Dept : {E-,w}-- {b++,e}>+++ h |