Kronecker product: Difference between revisions

m
→‎{{header|Haskell}}: (slightly reshaped for clarity)
(Added Kotlin)
m (→‎{{header|Haskell}}: (slightly reshaped for clarity))
Line 33:
:: Num a
=> [[a]] -> [[a]] -> [[a]]
kprod xs ys = concat $ (fmap concat . transpose) <$> ks
where
let f = fmap . fmap . (*)
in concat $ks (fmap= concat . transpose) <$> (fmap (`f` ys) <$> xs)
let f = fmap . fmap . (*)
 
main :: IO ()
9,659

edits