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

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -