thanks...Code:sqrtInt' :: Int -> Int
sqrtInt' 0 = 0
sqrtInt' n
| n < 0
= error "sqrt': negative argument"
| (m + 1)^2 == n
= m + 1
| otherwise
= m
where m = sqrtInt' (n-1)
Printable View
thanks...Code:sqrtInt' :: Int -> Int
sqrtInt' 0 = 0
sqrtInt' n
| n < 0
= error "sqrt': negative argument"
| (m + 1)^2 == n
= m + 1
| otherwise
= m
where m = sqrtInt' (n-1)