Created
June 11, 2017 05:48
-
-
Save malisper/8d955a0a2bba94027b9ffc5e8457f854 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
def base_query(): | |
return [1] | |
def recursive_query(ints): | |
return [n+1 for n in ints if n+1 <= 100] | |
def recursive_cte() | |
results = [] | |
working_table = base_query() | |
while len(working_table) != 0: | |
results += working_table | |
working_table = recursive_query(working_table) | |
return results | |
recursive_cte() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment