First rough cut at generalising project()