aaFromList in terms of foldr