add chainl1, chainl and ugly recursion macro