aboutsummaryrefslogtreecommitdiff
path: root/source/program.lux
blob: 364c57d893d8d96a237de6a7cbd5cd030b083724 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
(;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 _
  (println "Hello, world!"))