demo function findSequence(goal) { function find(start, history) { if (start == goal) return history; else if (start > goal) return null; else return find(start + 5, "(" + history + " + 5)") || find(start * 3, "(" + history + " * 3)"); } return find(1, "1"); } Examples: Selects all paragraphs and wraps a bold tag around each of its contents. Shell Example yum install -y nano iotop iftop strace;