add functional. add cycle, repeat, take_while. add test