Title here
Summary here
Haskell has various value types including strings, integers, floats, booleans, etc. Here are a few basic examples.
To run the program, save it as values.hs
and use runhaskell
:
In this Haskell example:
main
function as the entry point of our program.++
instead of +
.putStrLn
for printing strings and print
for other types.&&
for AND, ||
for OR, and not
for negation.$
to avoid parentheses in some function calls.Haskell is a purely functional language, so the structure is a bit different from imperative languages, but the basic concepts of working with various value types remain similar.