her.esy.fun/src/posts/0010-Haskell-Now/typed_float_basic.hs

5 lines
68 B
Haskell
Raw Normal View History

2019-12-23 09:56:47 +00:00
f :: Num a => a -> a -> a
f x y = x*x + y*y
main = print (f 3 2.4)