Haskell by Example: Multiple Return Values

original
vals :: () -> (Int, Int)
vals () = (3, 7)

main = do
    let (a, b) = vals ()
    print a
    print b

    let (_, c) = vals ()
    print c
$ runhaskell multiple-return-values.hs
3
7
7
back to index