Last active
May 7, 2020 18:56
-
-
Save alexnask/d72b5f855a9d0cdf2de19234239c9733 to your computer and use it in GitHub Desktop.
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
pub fn ChildRecursive(comptime T: type) type { | |
var V = T; | |
while (std.meta.trait.is(.Array)(V) or std.meta.trait.is(.Pointer)(V)) : (V = std.meta.Child(V)) {} | |
return V; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment