I want to reverse an Integer in Haskell with recursion. I have a small issue.

Here is the code :

```
reverseInt :: Integer -> Integer
reverseInt n
| n>0 = (mod n 10)*10 + reverseInt(div n 10)
| otherwise = 0
```

Example 345

I use as input 345 and I want to output 543

In my program it will do....

```
reverseInt 345
345>0
mod 345 10 -> 5
reverseInt 34
34
34>0
mod 34 10 -> 4
reverseInt 3
3>0
mod 3 10 -> 3
reverseInt 0
0=0 (ends)
```

And at the end it returns the sum of them... 5+4+3 = 12.

So I want each time before it sums them, to multiple the sum * 10. So it will go...

```
5
5*10 + 4
54*10 + 3
543
```

## comments: