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
import random | |
class CodeMaker(object): | |
def make_code(self): | |
""" | |
code maker invents a secret code | |
""" | |
raise NotImplemented() |
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
## Empty list -- just use the empty environment for this. | |
nil <- function() { | |
emptyenv() | |
} | |
## Test if a list is the empty list: | |
is_empty <- function(lis) { | |
identical(lis, nil()) | |
} |