(ls, f, res)
| 79 | |
| 80 | |
| 81 | def adjacents(ls, f, res): |
| 82 | if len(ls) == 0: |
| 83 | return res |
| 84 | |
| 85 | first = ls[0] |
| 86 | if len(ls) == 1: |
| 87 | next = None |
| 88 | else: |
| 89 | next = ls[1] |
| 90 | |
| 91 | res.append(f(first, next)) |
| 92 | return adjacents(ls[1:], f, res) |
| 93 | |
| 94 | |
| 95 | def to_version(tag): |