Created
July 13, 2024 17:27
-
-
Save youxkei/d0d35639c8c491b81e3fb65ba78f29e1 to your computer and use it in GitHub Desktop.
This file contains 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 "list" | |
#floors: { | |
for i in list.Range(0, 1000, 1) { | |
"floor\(i)": { | |
for j in list.Range(i, i+100, 1) { | |
"\(j)": string | |
} | |
} | |
} | |
} | |
#floors: [name=_]: _tag: "floors_\(name)" | |
#Floor: { | |
_tag: or([for f in #floors { f._tag }]) | |
for f in #floors { | |
if f._tag == _tag { | |
for k, v in f { | |
(k): v | |
} | |
} | |
} | |
} | |
result: #Floor & #floors.floor5 & { "10": 1 } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment