Implement the following functions using higher-order functions (and other predefined functions) of Haskell without using recursion.
Implement a function
eql :: [Int] -> [Int] -> Bool that tells wether two
lists of integers are equal.
Implement a function prod :: [Int] -> Int that
returns the product of a list of integers.
Implement a function prodOfEvens :: [Int] -> Int
that returns the product of all even numbers of a list of
integers.
Implement a function powersOf2 :: [Int] that
generates the list of all the powers of 2.
Implement a function
scalarProduct :: [Float] -> [Float] -> Float that
returns the dot product of two lists of float numbers with the same
size.
Each function scores 20 points.
Author: Unknown
Translator: Jordi Petit
Generation: 2026-02-03T17:10:54.750Z
© Jutge.org, 2006–2026.
https://jutge.org