Hi > I have changed the insertion algo to use foldl to make it tail-recursive but > still get a stack overflow as the "insert" remains lazy. Try foldl' and insertWith' - that should work. Thanks Neil