Impressive! I didn't think you could implement it so quickly. Now someone needs to add this functionality to Leksah or hack something up for Emacs.
Regards, Roel On Sun, Sep 19, 2010 at 8:27 PM, Paul Brauner <[email protected]> wrote: > It works: > > brau...@worf:/tmp$ cat test.hs > import Test.QuickCheck > import Test.QuickCheck.Arbitrary > import Control.Monad(forM_) > > intMul :: Integer -> Integer -> Integer > intMul x n | n < 0 = -(intMul x $ abs n) > | n == 0 = 0 > | n > 0 = x + intMul x (n - 1) > > main = do xs <- sample' arbitrary > ys <- sample' arbitrary > zip xs ys `forM_` \(x,y) -> > putStrLn (show x ++ " " ++ show y ++ " " ++ (show $ intMul x y)) > > > brau...@worf:/tmp$ runghc test.hs | haltavista > Prelude (*) > > I will include this functionality in the next version. Thank you for > this nice idea. > > Paul _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
