untitled.gif welcome towards my cool internet house site:
re: dear prof tobot (zoom)
[ back |
refresh |
last 25 |
post new
]
welcome to my cool internet home sit
is prosecÇ–tedt to a jam
Hair Cares Product!!!!!
| re: dear prof tobot |
| [29740] by "max cooking" (ce-web1.wesleyan.edu)
on Wed 10 Dec 2003 00:50:02
[ reply ] [ up ]
|
thx tobot my problemo of the moment is:
can u say "and" in ML? like I want 2 do a twin prime tester and I want to say:
fun twinprime 0 = false
| twinprime 1 = false
| twinprime x =
if prime x = true AND prime (x+2) = true
then true
else false; |
|
|
|
| re: dear prof tobot |
| [29741] by "max cooking" (ce-web1.wesleyan.edu)
on Wed 10 Dec 2003 00:50:54
[ reply ] [ up ]
|
yea ur rite up 2 x oop!!!!!! but thats what i was trying 2 do
serious |
|
|
|
| re: dear prof tobot |
| [29745] by "max cooking" (ce-web1.wesleyan.edu)
on Wed 10 Dec 2003 01:27:40
[ reply ] [ up ]
|
yea nevermind my other annoyance questions sry!!!!!
i am the win again:
twinprime (test whether x is a lower twin prime)
fun twinprime 0 = false
| twinprime 1 = false
| twinprime x =
if (prime x) andalso (prime (x+2))
then true
else false
TWINPRIMELIST (a list of twin primes <= x)
fun twinprimelist 0 = []
| twinprimelist x =
if twinprime x
then x :: x+2 :: (twinprimelist (x-1))
else (twinprimelist (x-1));
now i will get my lazy counterpartners 2 make the "perfect number" (i.e. number whose factors added up = the number like 6 (1+2+3=6 and 1*2*3=6) list program!! |
|
|
|