2021-10-06
-
The function
shuffle2 :: [Int] -> [Int] -> [Int]
takes in two lists of numbers and interleaves them, taking two from the first list, then one from the second list. When one list runs out the rest of the other list is output.shuffle2 [10,20,30,40] [100,200,300] == [10,20,100,30,40,200,300]
-
(
either24 :: [Int] -> Bool
) Given an array of ints, return true if the array contains a 2 next to a 2 or a 4 next to a 4, but not both.