Jump to content

Sorting algorithms/Insertion sort: Difference between revisions

no edit summary
m (→‎{{header|VBScript}}: Fixed translation link...)
No edit summary
Line 2,847:
}
}</lang>
 
=={{header|Scala}}==
Copied from SASL manual, Appendix II, answer (2)(a)
<lang SASL>
DEF
sort () = ()
sort (a : x) = insert a (sort x)
insert a () = a,
insert a (b : x) = a < b -> a : b : x
b : insert a x
?</lang>
 
=={{header|Scala}}==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.