Stop using to/of conventions backwards

This commit is contained in:
2024-12-28 07:24:19 -06:00
committed by James Eversole
parent a9432777e5
commit 30c04a84d6
5 changed files with 33 additions and 33 deletions

View File

@ -74,10 +74,10 @@ parseVarWithoutAssignment = do
parseLambda :: Parser SaplingAST
parseLambda = between (satisfy (== LOpenParen)) (satisfy (== LCloseParen)) $ do
satisfy (== LBackslash)
param <- satisfy isIdentifier
rest <- many (satisfy isIdentifier)
param <- satisfy isIdentifier
rest <- many (satisfy isIdentifier)
satisfy (== LColon)
body <- parseLambdaExpression
body <- parseLambdaExpression
let nestedLambda = foldr (\v acc -> SLambda [v] acc) body (map getIdentifier rest)
return (SLambda [getIdentifier param] nestedLambda)