let
rec
list_it func elem =
function
|
head::tail
->
func (list_it func elem tail) head
|
_
->
elem