[Haskell-beginners] '/' instead use 'DIV'. why?
Alexander Chen
alexander at chenjia.nl
Fri Apr 17 07:19:50 UTC 2020
Hi,
Prelude> :t (/)
(/) :: Fractional a => a -> a -> a
Prelude> :t div
div :: Integral a => a -> a -> a
Prelude> 6 / length [23,34,45]
error
Prelude> 6 / 3
2.0
Could somebody explain to me why this is?
thanks,
Alexander Chen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20200417/e3ff4819/attachment.html>
More information about the Beginners
mailing list