Summary

Teach compiler that fold and map with clean procedure is itself clean

Metadata

Description

It looks like CHICKEN currently doesn't understand that `fold` and `map` are `#:clean` if the argument procedure is `#:clean`. This prevents it from recognising that something like `(fold + 0 (iota 10000))` is foldable.

We could hardcode these procedures, but I'd prefer not to, so this might require some kind of new annotation in `types.db`.

This idea was inspired by http://pramode.in/2016/08/25/rust-add-billion-numbers/ - if Rust can do it, so can we!