I write a code to sort index of tuple list I try to use map with bubblesort()
to avoid using loops
bubblesort::(Ord t) => [t]->[t]
bubblesort[x,y,z,xs]=
if x<y then x : map bubblesort [y,z,xs]
else y : map bubblesort [x,z,xs]
but it give me an error that :
ERROR line 20 - Type error in list *** Expression : [y,xs] *** Term : xs *** Type : [a] *** Does not match : a *** Because : unification would give infinite type
*note please give me instruction only
--The complier is online compiler