
19 May
2011
19 May
'11
11:52 a.m.
By the way, you don't need the "flip" function.
map (** 3) [0,1..10]
[ x ** 3 | x <- [0,1..10]]
The section (** 3) will figure out on which side to put the argument/operand.
See http://www.haskell.org/haskellwiki/Section_of_an_infix_operator
2011/5/19
OK, I see. Thanks a lot.
Cheers, =)
,Felipe Almeida Lessa
撰写: On Thu, May 19, 2011 at 11:05 AM, jianqiuchi@gmail.com> wrote:
I have a question about the cost of list comprehension and map function.
1. [x ** 3 | x 2. map (flip (**) 3) list
-- -- Regards, KC