Starting Out Flashcards
File name extension for Haskell
.hs
What compiler package to download
Haskell Platform / GHCI
Specify Not Equal to operator
/=
Get Help in GHCI environment
:?
To switch different prompt
:set prompt
To restore default prompt
:unset prompt
Rule for conditional statements
else part is necessary
unusual function name spec
quote is a valid character in function name
function name constraint
Name cannot begin with Upper case letters
Describe how function succ works
succ takes any input which has a defined successor and returns that successor
How to pass parameters to a function
function name and parameters are separated by space
Describe min function
Takes two parameters which can be ordered and returns the lesser item
How max function works
Takes two parameters which can be ordered and returns the larger item
Give an example of a function definition with Syntax
doubleMe x = x + x
Give an example function with control stmt if
doubleLT100 x = (if x < 100 then x*2 else x) + 1