Created
February 25, 2025 11:26
-
-
Save miyconst/07000f4f818fc0a4e4f24b05d1512a08 to your computer and use it in GitHub Desktop.
DeepSeek R1 AI Test code piece
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
// For YouTube video: | |
// https://youtu.be/UnPZHwVCQdo | |
public IEnumerable<T> Flatten(T parent) | |
where T : IParent | |
{ | |
yield return parent; | |
foreach (T child in parent.Children) | |
{ | |
foreach (T grand in Flatten(child)) | |
yield return grand; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment