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
| struct TopSortResult { | |
| bool ok; | |
| // If `ok`, contains the topologically sorted node indices. | |
| // Otherwise, contains indices of a detected cycle. | |
| std::vector<std::size_t> nodes; | |
| }; | |
| // Topologically sorts dependencies. | |
| TopSortResult topsort(const std::vector<std::vector<int>> &edges) { |
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
| (define simple-func | |
| (lambda () | |
| (display "Script called, now I can change this") (newline))) | |
| (define quick-test | |
| (lambda () | |
| (display "Adding another function, can modify without recompilation") | |
| (newline) | |
| (adding-without-recompilation))) |