| re: dear anybody who nos ML |
| [29816] by "max cooking" (ce-web1.wesleyan.edu)
on Fri 12 Dec 2003 16:10:57
[ reply ] [ up ]
|
oop i meeant:
fun isfactor [] x = []
| isfactor (h::t) x =
if x mod h = 0
then h :: (isfactor [t] x)
else isfactor [t] x;
|
|
|
|
| re: dear anybody who nos ML |
| [29817] by "max cooking" (ce-web1.wesleyan.edu)
on Fri 12 Dec 2003 16:34:57
[ reply ] [ up ]
|
fun factfilter [] x = []
| factfilter (h::t) x =
if x mod h = 0
then h :: (filter t x)
else filter t x;
fun getfactor x =
factfilter (numlist x) x;
getfactor gives u a list of factors of x ok i did thx guys |
|
|
|
| OKAY ONLY READ THIS REPLY |
| [29819] by "max cooking" (ce-web1.wesleyan.edu)
on Fri 12 Dec 2003 16:44:08
[ reply ] [ up ]
|
i want 2 make a function for the sum of the numbers in a list but all I can come up with is the totaly illegal:
fun addlist [] = 0
| addlist (h::t) = h+t;
heee so illegal |
|
|
|
| re: dear anybody who nos ML |
| [29849] by "proxy is really old" (user164.net1082.oh.sprint-hsd.net)
on Sat 13 Dec 2003 11:52:16
[ reply ] [ up ]
|
|
u kids and ur new fangled cybermath!!!!! get off my lawn!!!!! |
|
|
|