sorting - Let In Statement Error -
i have problem following haskell statement:
insertsort3 xs = let sort3 [] ys = ys sort3 (x:xs) ys = sort3 xs (insert x ys) in sort3 xs []
my compiler says: parse error on input ‘=’ (the error occurs in line three).
the problem indentation in second line of let
:
insertsort3 xs = let sort3 [] ys = ys -- next line should line previous sort3 sort3 (x:xs) ys = sort3 xs (insert x ys) in sort3 xs []
Comments
Post a Comment