Sequence recursion moved to lib