1
0
Fork 0
mirror of https://git.sr.ht/~goorzhel/turboprop synced 2024-12-14 11:37:37 +00:00

fixup! Reteach self flattenTree from scratch

This commit is contained in:
Antonio Gurgel 2024-07-27 12:00:31 -07:00
parent 8a2cb1f032
commit f1c6cd8ea4

View file

@ -78,7 +78,7 @@
# Inputs: # Inputs:
# - acc (attrs): The accumulator. # - acc (attrs): The accumulator.
# - path ([str]): The path in `tree` where `cursor` is, e.g.: ["a" "b"]. # - path ([str]): The path in `tree` where `cursor` is, e.g.: ["a" "b"].
# - cursor (any type): A value in `tree` under inspection. # - cursor (any): A value in `tree` under inspection.
recurse = acc: path: cursor: recurse = acc: path: cursor:
builtins.foldl' builtins.foldl'
(acc: key: op acc (path ++ [key]) cursor.${key}) (acc: key: op acc (path ++ [key]) cursor.${key})