Skip to content

Commit

Permalink
slight optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
stevengj committed Jul 19, 2017
1 parent 052b0f2 commit 07a2014
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/julia-parser.scm
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,11 @@
op))

; like Set, but strip operator suffixes before testing membership
(define (SuffSet l) (let ((S (Set l))) (lambda (op) (S (maybe-strip-op-suffix op)))))
(define (SuffSet l)
(let ((S (Set l)))
(if (every no-suffix? l)
S ; suffixes not allowed for anything in l
(lambda (op) (S (maybe-strip-op-suffix op))))))

;; for each prec-x generate an is-prec-x? procedure
(for-each (lambda (name)
Expand Down

0 comments on commit 07a2014

Please sign in to comment.