You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
597 B

-- Splat into global namespace
import Data.List
-- Splat specific items into global namespace
import Data.List (nub, sort)
-- Splat everything but specific items
import Data.List hiding (nub)
-- Import, but not in global namespace
import qualified Data.List
-- Import, but not in global namespace, but with alias
import qualified Data.List as L
-- In Geometry.hs
module Geometry (
sphereVolume,
cubeArea -- exported functions
) where
sphereVolume :: Float -> Float
sphereVolume radius = (4.0 / 3.0) * pi * (radius ^ 3)
cubeVolume :: Float -> Float
cubeVolume side = side * side * side