Sample.hs
isAscending :: Int -> Int -> Int -> Bool isAscending x y z = (x <= y) && (y <= z)
Prelude> :load Sample.hs [1 of 1] Compiling Main ( Sample.hs, interpreted ) Ok, modules loaded: Main. *Main> *Main> isAscending 10 20 30 True *Main> isAscending 10 30 20 False *Main> isAscending 30 10 20 False *Main>
No comments:
Post a Comment