Count occurrence of element in a list in Scheme?
In Racket, you could do But more seriously, doing this with lists in Scheme is much easier that what you mention. A list is either empty, or a pair holding the first item and the rest. Follow that definition in code and you’ll get it to “write itself out”. Here’s a hint for a start, … Read more