Name: Anonymous 2009-01-02 16:50
Yes, this is my homework
Define a Scheme function (count-elm L), that takes a list and returns a list with each element and its number of occurrences. For example:
>(count-elm '(a b c a a b c a b c a c d))
((a 5) (b 3) (c 4) (d 1))
I could have done this in seconds in C or something - what the fuck
Define a Scheme function (count-elm L), that takes a list and returns a list with each element and its number of occurrences. For example:
>(count-elm '(a b c a a b c a b c a c d))
((a 5) (b 3) (c 4) (d 1))
I could have done this in seconds in C or something - what the fuck