diff options
Diffstat (limited to '')
-rw-r--r-- | source/program.lux | 60 |
1 files changed, 45 insertions, 15 deletions
diff --git a/source/program.lux b/source/program.lux index 22bbad2d5..086506725 100644 --- a/source/program.lux +++ b/source/program.lux @@ -1,18 +1,48 @@ -(;alias-lux) +## Copyright (c) Eduardo Julian. All rights reserved. +## The use and distribution terms for this software are covered by the +## Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php) +## which can be found in the file epl-v10.html at the root of this distribution. +## By using this software in any fashion, you are agreeing to be bound by +## the terms of this license. +## You must not remove this notice, or any other, from this software. -(def (filter p xs) - (All [a] (-> (-> a Bool) (List a) (List a))) - (case xs - #;Nil - (list) +(;import lux + (lux (codata (stream #as S)) + (control monoid + functor + monad + lazy + comonad) + (data bool + bounded + char + ## cont + dict + (either #as e) + eq + error + id + io + list + maybe + number + ord + (reader #as r) + show + state + (text #as t #open ("text:" Text/Monoid)) + writer) + (host jvm) + (meta lux + macro + syntax) + (math #as m) + )) - (#;Cons [x xs']) - (if (p x) - (list& x (filter p xs')) - (filter p xs')))) +(program args + (case args + (\ (list name)) + (println ($ text:++ "Hello, " name "!")) -(jvm-program _ - (exec (println "Hello, world!") - (println ($ text:++ "2 + 2 = " (->text (int:+ 2 2)))) - (println (->text (using Int:Ord - (< 5 10)))))) + _ + (println "Hello, world!"))) |