Add library functions cascade(), ifelse(), plus tests.