Skip to content

Commit

Permalink
Use letops for signed_integer
Browse files Browse the repository at this point in the history
  • Loading branch information
drewolson committed Jan 7, 2024
1 parent 8c413f7 commit 9402d66
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/util/parser.ml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ let integer = digits >>| Int.of_string

let signed_integer =
let open Syntax in
let%map sign = 1 <$ char '+' <|> (-1 <$ char '-') <|> return 1
and n = integer in
let+ sign = 1 <$ char '+' <|> (-1 <$ char '-') <|> return 1
and+ n = integer in
sign * n
;;

Expand Down

0 comments on commit 9402d66

Please sign in to comment.