diff options
Diffstat (limited to 'source/program.lux')
-rw-r--r-- | source/program.lux | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/program.lux b/source/program.lux new file mode 100644 index 000000000..6ec9db79e --- /dev/null +++ b/source/program.lux @@ -0,0 +1,12 @@ +(;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')))) |