You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
668 B
668 B
Chapter Exercises
Parenthesization
(2 + (2 * 3)) - 1
(^) 10 (1 + 1)
((2 ^ 2) * (4 ^ 5)) + 1
Equivalent expressions
- Equivalent.
- Equivalent.
- Different.
(-) 37 400
is equal to37 - 400
- Different. Integer division versus real division.
- Different. Multiplication has higher precedence.
More fun with functions
In the REPL:
let z = 7; x = y ^ 2; waxOn = x * 5; y = z + 8
waxOn
is a number equal to1125
. So it would be as if you replacewaxOn
by1125
.- /
- This will return
1125 * 3
or3375
- see src/chapter.hs
- see src/chapter.hs
- see src/chapter.hs
- waxOff is basically an for the triple function.