Q:

Creating a Haskell function using foldl to turn a list of ints to a single int

I have to define a function, prob2, that takes a list of Ints and returns an Int using foldl:
HW3*> prob2 [2,3,4,5]

2345

I lack experience using folds.  What I have is this:
prob2 :: [Integer] -> Integer

prob2 (x:xs) = foldl (\x->10*x+xs) 0

A:

The problem is that you are still thinking in terms of recursion. You seem to think of the problem as applying the function to the head of the element and the tail.
But foldl takes a binary operator and applies it to elements of the list in a cumulative fashion. It requires a binary operator for items of the same type. 
You need a lambda expression with 2 parameters, like this:
foldl (\x y -> 10*x+y) 0  [2,3,4,5]

This will yield your integer 2345.

