aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/library')
-rw-r--r--stdlib/source/library/lux/data/collection/list.lux2
-rw-r--r--stdlib/source/library/lux/world/file.lux6
-rw-r--r--stdlib/source/library/lux/world/shell.lux3
3 files changed, 9 insertions, 2 deletions
diff --git a/stdlib/source/library/lux/data/collection/list.lux b/stdlib/source/library/lux/data/collection/list.lux
index 77e5529b1..cddf68036 100644
--- a/stdlib/source/library/lux/data/collection/list.lux
+++ b/stdlib/source/library/lux/data/collection/list.lux
@@ -143,7 +143,7 @@
<else>)))]
[while {.#Item x (while predicate xs')} {.#End}]
- [until (until predicate xs') xs]
+ [until xs (until predicate xs')]
)
(def .public (split_at n xs)
diff --git a/stdlib/source/library/lux/world/file.lux b/stdlib/source/library/lux/world/file.lux
index 1e2bdd90d..11adc36a7 100644
--- a/stdlib/source/library/lux/world/file.lux
+++ b/stdlib/source/library/lux/world/file.lux
@@ -1337,3 +1337,9 @@
(if ?
(in (exception.except ..cannot_make_file [path]))
(at fs write path content))))
+
+(def .public (copy monad fs from to)
+ (All (_ !) (-> (Monad !) (System !) Path Path (! (Try Any))))
+ (do (try.with monad)
+ [data (at fs read from)]
+ (at fs write to data)))
diff --git a/stdlib/source/library/lux/world/shell.lux b/stdlib/source/library/lux/world/shell.lux
index bd7829907..4101cb3c9 100644
--- a/stdlib/source/library/lux/world/shell.lux
+++ b/stdlib/source/library/lux/world/shell.lux
@@ -82,7 +82,8 @@
(type .public (Shell !)
(Interface
- (is (-> [Environment Path Command (List Argument)] (! (Try (Process !))))
+ (is (-> [Environment Path Command (List Argument)]
+ (! (Try (Process !))))
execute)))
(def .public (async shell)