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

Possibility Level?

Name: Anonymous 2009-01-04 11:48

Hey, I was thinking about some things I wanted to code for my friends using only C (no C++). Anyhow, I came across the idea for making an auto-spammer (for on line games). I don't want you to make me one, I just wanted to know, is it possible? Could I possibly make an auto-spammer using no C++ at all?

Name: Anonymous 2009-01-04 13:28

Factorials!


fact n = product [1..n]


Laziness!

fibs = 1 : 1 : zipWith (+) fibs (tail fibs)

List comprehension!


aSort :: (Ord a) => [a] -> [a]
qSort []     = []
qSort (x:xs) = qSort s ++ [x] ++ aSort l
                 where (s,l) = partition (<x) xs


MONADS!


loeb :: Functor a => a (a x -> x) -> a x
loeb x = fmap (\a -> a (loeb x)) x


Join Haskell now!

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