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:
parent
8a2cb1f032
commit
f1c6cd8ea4
1 changed files with 1 additions and 1 deletions
|
@ -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})
|
||||||
|
|
Loading…
Reference in a new issue