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
| mod stateless_sequencer { | |
| pub trait Cold { | |
| fn turn_on(self) -> impl Warm; | |
| } | |
| pub trait Warm { | |
| fn suspend(self) -> impl Suspended; | |
| fn turn_off(self) -> impl Cold; | |
| } |
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
| package maybegzip | |
| import ( | |
| "compress/gzip" | |
| "io" | |
| "os" | |
| ) | |
| // Provides an io.Reader that might or might not refer to a gzipped file. If it | |
| // is a gzipped file, reading from the io.Reader transparently decompresses the |
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
| def set_up_test(count): | |
| l = [] | |
| d = {} | |
| s = set() | |
| for i in range(count): | |
| l.append(i) | |
| d[i] = True | |
| s.add(i) | |
| return l, d, s |