diff options
| author | aarne <unknown> | 2004-05-18 20:57:13 +0000 |
|---|---|---|
| committer | aarne <unknown> | 2004-05-18 20:57:13 +0000 |
| commit | 8963681a3b821e85185877dd61b7804661fc5c24 (patch) | |
| tree | fc2f4dee924cccd3d46c4983d80bc7b9a755ef41 /src/GF/Data | |
| parent | 086733a6fe03c5065002a8fb414af06c9cf67d51 (diff) | |
peel head i ; gt nometas ; gf2hs
Diffstat (limited to 'src/GF/Data')
| -rw-r--r-- | src/GF/Data/Zipper.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/GF/Data/Zipper.hs b/src/GF/Data/Zipper.hs index a696f1cae..e63743b06 100644 --- a/src/GF/Data/Zipper.hs +++ b/src/GF/Data/Zipper.hs @@ -180,3 +180,9 @@ changeRoot f loc = case loc of chPath pv = case pv of (Top,a) -> (Top, f a) (Node (left,pv,right),v) -> (Node (left, chPath pv,right),v) + +nthSubtree :: Int -> Tr a -> Err (Tr a) +nthSubtree n (Tr (a,ts)) = ts !? n + +arityTree :: Tr a -> Int +arityTree (Tr (_,ts)) = length ts
\ No newline at end of file |
