Multiplication tables: Difference between revisions

m
→‎{{header|Haskell}}: (Slight rearrangement)
m (→‎{{header|Sidef}}: updated code)
m (→‎{{header|Haskell}}: (Slight rearrangement))
Line 2,326:
multTable :: Int -> [[String]]
multTable n =
let xs = [1 .. n]
(\x ->
in xs >>=
show x <> ":" :
((\yx ->
[ show x if<> y":" < x:
(xs then mempty>>=
else show (x * \y)) <$->
[1 ..if n]))y <$> x
then mempty
[1 .. n]
else show (x * y)
])
]
 
tableString :: [[String]] -> String
9,659

edits