Apologies for posting a solution. Since the OP had some code, I thought I'd show him the essence .. throwing in (require racket) as the key to any instructor who'd grade (and care that a student had cheated).
-- Matthias On Jun 3, 2015, at 8:07 PM, Prabhakar Ragde wrote: > This is a homework question of mine (though I don't think the OP is doing > homework for a course for credit; I'd be curious to know where he found it). > I usually state the restrictions on 'reverse' and 'remove', but not > 'member?'. The restriction on 'reverse' is so that students don't write one > of the functions by reversing, calling the other, reversing again. Also > sometimes when students violate structural recursion, they get a reversed > result, and I don't want them applying 'reverse' as a quick fix. The > restriction on 'remove' is on the built-in function of that name, because it > only removes one element, and using it leads students away from structural > recursion. Recently I have taken to hinting that they should write something > like remove*. --PR > > -- > You received this message because you are subscribed to the Google Groups > "Racket Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to racket-users+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.