aboutsummaryrefslogtreecommitdiff
path: root/test2.lux
diff options
context:
space:
mode:
Diffstat (limited to 'test2.lux')
-rw-r--r--test2.lux30
1 files changed, 10 insertions, 20 deletions
diff --git a/test2.lux b/test2.lux
index 8f076a839..15bcecdbc 100644
--- a/test2.lux
+++ b/test2.lux
@@ -335,7 +335,7 @@
))
(def (range from to)
- (if (= to from)
+ (if (= from to)
#Nil
(#Cons from (range (inc from) to))))
@@ -350,25 +350,14 @@
(def (normalize-ident ident)
(fold concat "" (map normalize-char (text->list ident))))
-#(
-
-
-
-
- (def (fresh-class-loader path)
- (let file (jvm/new java.io.File [String] [path])
- (let url (jvm/invokevirtual java.io.File "toURL" []
- file [])
- (let urls (array java.net.URL (list url))
- (jvm/new java.net.URLClassLoader [(Array java.net.URL)] [urls])))))
-
- (def (fresh-class-loader path)
- (let [file (jvm/new java.io.File [String] [path])
- url (jvm/invokevirtual java.io.File "toURL" []
- file [])
- urls (array java.net.URL (list url))]
- (jvm/new java.net.URLClassLoader [(Array java.net.URL)] [urls])))
- )#
+(def (fresh-class-loader path)
+ (let file (jvm/new java.io.File [String] [path])
+ (let url (jvm/invokevirtual java.io.File "toURL" []
+ file [])
+ (let urls (jvm/new-array java.net.URL 1)
+ (do (jvm/aastore urls 0 url)
+ (jvm/new java.net.URLClassLoader [(Array java.net.URL)] [urls]))))
+ ))
(def (cons tail head)
(#Cons head tail))
@@ -487,5 +476,6 @@
(println (normalize-char char))))
(println (show-list (range 0 10)))
(println (normalize-ident "text->list"))
+ (println (fresh-class-loader "./"))
)
))