(There's a nice Haskell implementation available.)
In reply to Re: Gap-filling lists by gaal in thread Gap-filling lists by jkeenan1