Sha256: 42856df518fb52686411f4abff5e2e04fe8cf38f0f89687a8ffc2721b1c68687
Contents?: true
Size: 419 Bytes
Versions: 16
Compression:
Stored size: 419 Bytes
Contents
import Data.Vect insert : Ord elem => (x : elem) -> (xsSorted : Vect len elem) -> Vect (S len) elem insert x [] = [x] insert x (y :: xs) = case x < y of True => x :: y :: xs False => y :: insert x xs insSort : Ord elem => Vect n elem -> Vect n elem insSort [] = [] insSort (x :: xs) = let xsSorted = insSort xs in insert x xsSorted
Version data entries
16 entries across 16 versions & 2 rubygems