Sha256: 7d85ffe10e9b3941c3e81f38c34b9378405a17857f1d04c7cad0e18b03006bf4
Contents?: true
Size: 455 Bytes
Versions: 17
Compression:
Stored size: 455 Bytes
Contents
(define bubble-sort \* bubble again if you need to *\ X -> (bubble-again-perhaps (bubble X) X)) (define bubble [] -> [] [X] -> [X] [X Y | Z] -> [Y | (bubble [X | Z])] where (> Y X) [X Y | Z] -> [X | (bubble [Y | Z])]) (define bubble-again-perhaps \* no change as a result of bubbling - then the job is done *\ X X -> X \* else bubble again *\ X _ -> (bubble-sort X))
Version data entries
17 entries across 17 versions & 1 rubygems