Up |
Set an element of a list from its index.
fun [[u0 r1] I u0] [u0 r1]
Return : [u0 r1] this list or nil if an error occurs.
fun fList (elt, index, list)=
_fooId index; // display the current index
if elt == 'z then
(
set list = set_nth_list list index 'e; // replace z to e
_fooS listtostr list; // display the new content (or use _fooSList directly)
nil // stop the loop (returning nil, see forList doc)
)
else
set list = set_nth_list list index elt;;
fun main ()=
_showconsole;
let "Hzllo World" -> string in
let strtolist string -> list in
_fooId forList mkfun3 @fList list list;
0;;