I'm trying to solve the following exercise (I'm learning Haskell):

> 
> Define x^n using a list comprehension.
> 
> 
> 

And I'm struggling to find a solution.

Using recursion or fold, the solution is not complicated (for instance, `foldr (*) 1 [x | c <- [1..n]]`). However, using only list comprehension it gets difficult (at least for me).

In order to solve the problem, I'm trying to create a list of x^n elements and then get the length. Generating a list of x\*n elements is easy, but I fail to generate a list of x^n elements.

```
ppower x n = length [1 | p <- [1..x], c <- [1..n]]

```

returns a list of x\*n elements giving a wrong result. Any ideas on this will be appreciated.