on master help sign in
Function args were in the reverse order!
commit25474f83100434c67044b46129bd6c637e234413 authorEvan Czaplicki <info@elm-lang.org> dateMon 29 Jul 2013, 23:44 (13 years ago) parenta98a7be
1 file changed+1−1
compiler/Generate/JavaScript.hs+1−1
compiler/Generate/JavaScript.hs+1−1
@@ -201,7 +201,7 @@ instance ToJS (Expr t v) where
201201 fastFunc body
202202 | length args < 2 || length args > 9 = foldr jsFunc body args
203203 | otherwise = "F" ++ show (length args) ++ parens (jsFunc (commaSep args) body)
204− (args, body) = foldr depattern ([], innerBody) (zip patterns [1..])
204+ (args, body) = first reverse $ foldr depattern ([], innerBody) (zip patterns [1..])
205205
206206 depattern (pattern,n) (args, body) =
207207 case pattern of