aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/lux/data/struct/vector.lux7
1 files changed, 7 insertions, 0 deletions
diff --git a/stdlib/source/lux/data/struct/vector.lux b/stdlib/source/lux/data/struct/vector.lux
index e1640a0f0..9a22efb93 100644
--- a/stdlib/source/lux/data/struct/vector.lux
+++ b/stdlib/source/lux/data/struct/vector.lux
@@ -442,3 +442,10 @@
(^open) Monoid<Vector>]
(fold (lambda [post pre] (append pre post)) unit)))
)
+
+(def: #export (reverse xs)
+ (All [a]
+ (-> (Vector a) (Vector a)))
+ (let [(^open) Fold<Vector>
+ (^open) Monoid<Vector>]
+ (fold add unit xs)))