typed hackfoldr...