G
Size: a a a
G
T1
p
AZ
G
p
G
T1
T1
G
DB
insSort : (Ord elem) => Vect n elem -> Vect n elem
insSort [] = []
insSort (x :: xs) =
let sortedXs = insSort xs
position = findPosition x sortedXs
in insertAt position x sortedXs
where
findPosition x xs = let maybeIndex = findIndex (\elm => x < elm) xs in
fromMaybe last (weaken <$> maybeIndex)
Где
тут нет вывода типов?T1
AZ
AZ
NL
T1
p
p
VS
G