Created
          May 12, 2017 14:34 
        
      - 
      
- 
        Save fgoinai/49393d6a66b9b66f1e40c36c830b2864 to your computer and use it in GitHub Desktop. 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | private fun swap(list: MutableList<T>) : (Int, Int) -> Unit { | |
| return fun(pos1: Int, pos2: Int): Unit { | |
| return { | |
| tmp = list[pos1] | |
| list[pos1] = list[pos2] | |
| list[pos2] = tmp | |
| }() | |
| } | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment