mirror of
				https://github.com/theoludwig/programming-challenges.git
				synced 2025-09-11 23:11:21 +02:00 
			
		
		
		
	
		
			
				
	
	
		
			30 lines
		
	
	
		
			407 B
		
	
	
	
		
			Markdown
		
	
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
		
			407 B
		
	
	
	
		
			Markdown
		
	
	
	
	
	
# consecutive-numbers
 | 
						|
 | 
						|
Created by [@Divlo](https://github.com/Divlo) on 28 June 2021.
 | 
						|
 | 
						|
## Instructions
 | 
						|
 | 
						|
Write a function which takes a list of integers, and which returns the (possibly empty) list of pairs of successive consecutive integers that there may be in the list.
 | 
						|
 | 
						|
### Input
 | 
						|
 | 
						|
```txt
 | 
						|
7
 | 
						|
1
 | 
						|
2
 | 
						|
5
 | 
						|
3
 | 
						|
4
 | 
						|
```
 | 
						|
 | 
						|
### Output
 | 
						|
 | 
						|
```txt
 | 
						|
1, 2
 | 
						|
3, 4
 | 
						|
```
 | 
						|
 | 
						|
## Examples
 | 
						|
 | 
						|
See the `test` folder for examples of input/output.
 |