Anonymous user
Sorting algorithms/Insertion sort: Difference between revisions
→{{header|Racket}}
(Add Nimrod) |
|||
Line 1,594:
This implementation makes use of the pattern matching facilities in the Racket distribution.
<lang racket>
#lang racket
(define (sort
(define (insert x y)
(match* (
[(
[(
[else (
▲ [(cons x xs) (insert x (sort pred xs))]))</lang>
=={{header|Rascal}}==
|