update sol3.hs

add another solution of exercise 3