Re: [Haskell-cafe] haltavista - look for functions by example

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
It works:
brauner@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))
brauner@worf:/tmp$ runghc test.hs | haltavista Prelude (*)
I will include this functionality in the next version. Thank you for this nice idea.
Paul
participants (1)
-
Roel van Dijk