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:
Anonymous2009-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