g = Function[m,
Module[{i, l},
i = 1;
l = {};
While[i ¡Ü Length[m],
Append[l, m[]];
i++
]
Print[l]
]
]
however, I get {} ... Any help?
Thanks
mathematica programming doubt...
Hi,
Can anyone tell me why this function in Mathematica doesn't work?
Its supposed to be given a list, and just copy it to another list, and print it:
Append doesn't modify lists. It takes a list and an element, then returns the list with the element appended.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement