Created
November 9, 2017 15:10
-
-
Save kobi2187/6839b5867034519546f79a4d61c43d6f to your computer and use it in GitHub Desktop.
This file contains 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
# foundit.nim | |
# ...... | |
42 proc all_perms(list:seq[int]):seq[seq[int]] = | |
43 var ourlist = list | |
44 while next_perm(ourlist): | |
45 result.add(ourlist) | |
46 return result | |
47 | |
48 | |
49 var list = @[1,2,3] | |
50 var res = all_perms(list) | |
51 echo res | |
------------ | |
### Traceback (most recent call last) | |
foundit.nim(50) foundit | |
foundit.nim(45) all_perms | |
SIGSEGV: Illegal storage access. (Attempt to read from nil?) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment