Skip to content

Instantly share code, notes, and snippets.

@motokiee
Created October 27, 2015 04:30
Show Gist options
  • Save motokiee/ca3d9b104038218a1ff8 to your computer and use it in GitHub Desktop.
Save motokiee/ca3d9b104038218a1ff8 to your computer and use it in GitHub Desktop.
昨日使ったモジュールで体積を表示する的なことをした #CodePiece
import qualified Geometry.Sphere as Sphere
import qualified Geometry.Cuboid as Cuboid
import qualified Geometry.Cube as Cube
printSphere :: Float -> String
printSphere value = show $ Sphere.volume value
printCuboid :: Float -> Float -> Float -> String
printCuboid a b c = show $ Cuboid.volume a b c
printCube :: Float -> String
printCube side = show $ Cube.volume side
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment