generic-function

Trying to learn: Object Reorientation, and generic functions in LISP!

Hi, im reading Practical common Lisp as a result of another question. I just read chapter 16 and 17 where you can find how LISP manages objects. But after a couple of years of thinking how Java manages objects, i cant really seem to understand how you would implement bigger architectures in LISP using the CLOS. So i ask you guys for s...

Create a delegate of a generic function

I'm writing some unit tests and I have a lot of functions of the form public void SomeTestHelperMethod<TKey, TValue>(TKey key, TValue value) which I'm calling repeatedly with various arguments like this SomeTestHelperMethod<int, int>(0, 1); SomeTestHelperMethod<int, object>(1, new Nullable<double>(16.5)); SomeTestHelperMethod<int, st...

problem writing a simple STL generic function

I'm self-learning how to create generic functions using iterators. As the Hello World step, I wrote a function to take the mean in the given range and returns the value: // It is the iterator to access the data, T is the type of the data. template <class It, class T> T mean( It begin, It end ) { if ( begin == end ) { throw...