mirror of
https://github.com/roc-lang/roc.git
synced 2025-12-23 08:48:03 +00:00
672 B
672 B
META
description=Unary minus operation on lambda parameter
type=expr
SOURCE
(|x| -x)(5)
EXPECTED
NIL
PROBLEMS
NIL
TOKENS
OpenRound,OpBar,LowerIdent,OpBar,OpUnaryMinus,LowerIdent,CloseRound,NoSpaceOpenRound,Int,CloseRound,
EndOfFile,
PARSE
(e-apply
(e-tuple
(e-lambda
(args
(p-ident (raw "x")))
(unary "-"
(e-ident (raw "x")))))
(e-int (raw "5")))
FORMATTED
NO CHANGE
CANONICALIZE
(e-call
(e-lambda
(args
(p-assign (ident "x")))
(e-unary-minus
(e-lookup-local
(p-assign (ident "x")))))
(e-num (value "5")))
TYPES
(expr (type "_a"))