diff options
author | Tom Smeding <tom@tomsmeding.com> | 2024-11-22 18:54:01 +0100 |
---|---|---|
committer | Tom Smeding <tom@tomsmeding.com> | 2024-11-22 18:54:01 +0100 |
commit | dd21ebafeeeb2abc222b3525e136d4ba6a769176 (patch) | |
tree | 0fa92b45ae5dee11f8e8bbf40d84ffec05aaa059 /src/Data/Array/Nested/Internal/Ranked.hs | |
parent | 03b7cea970d0840a913b6e64a9439fb115dea8d0 (diff) |
[mrs]{un,}zipsingletons
Diffstat (limited to 'src/Data/Array/Nested/Internal/Ranked.hs')
-rw-r--r-- | src/Data/Array/Nested/Internal/Ranked.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Data/Array/Nested/Internal/Ranked.hs b/src/Data/Array/Nested/Internal/Ranked.hs index 9e8a7b2..1966270 100644 --- a/src/Data/Array/Nested/Internal/Ranked.hs +++ b/src/Data/Array/Nested/Internal/Ranked.hs @@ -390,6 +390,12 @@ runNest rarr@(Ranked (M_Ranked (M_Nest _ arr))) | Refl <- lemReplicatePlusApp (rrank rarr) (Proxy @m) (Proxy @(Nothing @Nat)) = Ranked arr +rzip :: Ranked n a -> Ranked n b -> Ranked n (a, b) +rzip = coerce mzip + +runzip :: Ranked n (a, b) -> (Ranked n a, Ranked n b) +runzip = coerce munzip + rrerankP :: forall n1 n2 n a b. (Storable a, Storable b) => SNat n -> IShR n2 -> (Ranked n1 (Primitive a) -> Ranked n2 (Primitive b)) |