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

(´∀`) Prime numbers (,,゚Д゚)

Name: Anonymous 2007-04-15 11:11 ID:00E9fssW

|code]isPrime x = (filter (0 ==) (map (mod x) [2..x-1])) == [][/code]

Name: Anonymous 2007-05-15 15:33 ID:Heaven

>>40
Oh, I just realized it really isn't a function. I'd like to know the reason, too.

Name: Anonymous 2007-05-15 15:38 ID:fB6+u2Vv

>>40
I think it's because if-then-else looks nice than any real reason. Reasonable name for your function there could be ifte.

Name: Anonymous 2007-05-15 15:41 ID:Heaven

>>42
But is there a need for `then' and `else'? Lisp does just fine without them.

Name: Anonymous 2007-05-15 18:46 ID:Heaven

>>43
No, there is no need for it. It just looks nice.

Name: Anonymous 2009-01-14 14:11

Satori

Name: Anonymous 2011-02-02 23:09

Name: Anonymous 2011-02-04 13:36

Name: Sgt.Kabu竟늈kimanࠪ 2012-05-29 0:29

Bringing /prog/ back to its people
All work and no play makes Jack a dull boy

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