aboutsummaryrefslogtreecommitdiff
path: root/test2.lux
diff options
context:
space:
mode:
authorEduardo Julian2015-01-16 19:42:24 -0400
committerEduardo Julian2015-01-16 19:42:24 -0400
commit555d0181fa1d76f02d1b86843123eda494c0fbec (patch)
treeea73f2bafc0d890d9585a8a5d40a669f84ae1b79 /test2.lux
parent55e14407cc52f69e8c569c20af597676de5d80dd (diff)
[Bugs]
- In let forms, the local had the wrong data-structure as a type. [Enhancements] - Can now instance objects. - Java-interop now handles array inputs. - System now has object array creation, storing and retrieving.
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 "./"))
)
))