Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

haskell assignment

Name: Anonymous 2007-02-15 8:45

I need to write a Haskell function that takes in k where k is an even number >2, and returns x and y such that k = x + y, and x and y are primes (Goldbach's conjecture).

I've really been struggling @ understanding Haskell, and I don't think I'll be able to solve it in... 12 hours.  Halp please....  Anyone...

;_;

Name: Anonymous 2007-02-15 18:54

Here's how not to do it:

primes = [1,2,3,5,7,11]

shit k | even k, k > 2 =
    head [ (x,y) | x <- primes, y <- primes, x + y == k ]

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List