blob: 22bbad2d5098a18891632bbe66d62efa02731374 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
(;alias-lux)
(def (filter p xs)
(All [a] (-> (-> a Bool) (List a) (List a)))
(case xs
#;Nil
(list)
(#;Cons [x xs'])
(if (p x)
(list& x (filter p xs'))
(filter p xs'))))
(jvm-program _
(exec (println "Hello, world!")
(println ($ text:++ "2 + 2 = " (->text (int:+ 2 2))))
(println (->text (using Int:Ord
(< 5 10))))))
|