Kod: Zaznacz cały
let rec pomoc lista nty el= match lista with
|[]-> 0
|head::tail -> if (nty=el) then head else pomoc tail nty el+1;;
let nty lista nty= pomoc lista nty 1;;
let lista =[3;2;1];;
let n=2;
nty lista n;;