churf/sample-programs/bubble-sort.chrf

11 lines
227 B
Text

data List (a) where
Cons : a -> List (a) -> List (a)
Nil : List (a)
bubblesort : List (a) -> List (a)
bubblesort xs = case xs of
Nil => Nil
Cons x => case x of
Nil => Cons x Nil
Cons y =>