Question: functional programming in haskell 1. (a) What does the following function do? If you know the name of the prelude function it is equivalent to,
functional programming in haskell
1. (a) What does the following function do? If you know the name of the prelude function it is equivalent to, say what it is.
> unknown1 f as = [f a | a <- as]
(b) What does the following function do? If you know the name of the prelude function it is equivalent to, say what it is.
> unknown2 p as = [ a | a <- as, p a]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
