1 import "JavaBuiltin" as Java
6 (+) :: Double -> Double -> Double
8 (*) :: Double -> Double -> Double
11 importJava "java.lang.Math" where
12 sqrt :: Double -> Double
13 sin :: Double -> Double
14 cos :: Double -> Double
18 length x y = sqrt (square x + square y)
20 pythagoras a = length (cos a) (sin a)