2022-08-29
Prep for II.2
-
Make this list with less work:
[26,25,24,23,22,21,20,19,18,17,16,15,14, 13,12,11,10,9,8,7,6,5,4,3,2,1]
-
Make this string with less work:
"abcdefghij"
-
How do you make a list that starts
[8,8,8,8,8
and then goes on forever. -
What is the signature of the function you used in the previous question?
-
What is the difference between
cycle
andrepeat
?Possible signature:
cycle :: [Int] -> [Int]
Example:
cycle [8,9,11] == ?
-
Write an example showing an equality between
cycle
applied to something andrepeat
applied to something.cycle __________ == repeat __________
-
How do you get the following? Would that change if there were fifty 2’s instead of five?
[2,2,2,2,2]
-
Make this list:
[(1,10),(2,20),(3,30),(4,40) ... up to ... (9,90)]
-
Make this list:
[(2,23), (2,24), (2,25), (3,23), (3,24), (3,25), keep going all the way to (13,23), (13,24), (13,25)]
-
Make this list:
n10 = [(2,23), (3,24), (4,25), ... go until ... (50,71)]
-
Find all of the ordered pairs
(x,y)
from the listn10
above that havey>x*x
.