Do you need just to be able to have nil and cons, or do you need to store 
various values inside? In the second case, you can use variants indeed: they 
are similar to data types from Haskell. If you're writing an interpreter, this 
is what you need usually: represent all the possible values with different 
kinds, e.g. hkInt, hkFloat, hkFunction etc

Reply via email to