Consider getting a stream of data and that we store it through consing, this has the drawback that the list will grow indefinitely. What you want is to make sure that any data that you need for computation a pointer to the start and end of the data would mean that by modding the mark procedure will tell the special cons cell that a part has a start reference or an end referense. Then in a custom sweep procedure you would be able to tell if these markings increments/decrements counters when you can discard data for gc. You would not need any magic at all but custom mark procedures and a custom sweep procedure. I find this tool pretty interesting. Maybe a little project that implements this would be cool to have WDYT? Cheers!