working on ReplaceAll, which is the first step og the generic compilation algorithm