Prelude> let mulTable num = [(num, x, num * x) | x <- [1..10]] Prelude> mulTable 10 [(10,1,10),(10,2,20),(10,3,30),(10,4,40),(10,5,50),(10,6,60),(10,7,70),(10,8,80),(10,9,90),(10,10,100)] Prelude> Prelude> mulTable 19 [(19,1,19),(19,2,38),(19,3,57),(19,4,76),(19,5,95),(19,6,114),(19,7,133),(19,8,152),(19,9,171),(19,10,190)]
This blog is primarily focus on Java fundamentals and the libraries built on top of Java programming language. Most of the post are example oriented, hope you have fun in reading my blog....:)
Monday 6 June 2016
Haskell: Generate multiplication table of a number
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment