From 465e6478abb315e7686cb8e3ddfc1affd46d7d74 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Mon, 9 May 2016 21:36:45 -0700 Subject: [PATCH] inverse: minor cleanup. --- basis/inverse/inverse.factor | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/basis/inverse/inverse.factor b/basis/inverse/inverse.factor index 887fd58c7e..c9f5ada3da 100644 --- a/basis/inverse/inverse.factor +++ b/basis/inverse/inverse.factor @@ -35,13 +35,10 @@ M: fail summary drop "Matching failed" ; ERROR: bad-math-inverse ; : next ( revquot -- revquot* first ) - [ bad-math-inverse ] - [ unclip-slice ] if-empty ; + [ bad-math-inverse ] [ unclip-slice ] if-empty ; : constant-word? ( word -- ? ) - stack-effect - [ out>> length 1 = ] - [ in>> empty? ] bi and ; + stack-effect [ out>> length 1 = ] [ in>> empty? ] bi and ; : assure-constant ( constant -- quot ) dup word? [ bad-math-inverse ] when 1quotation ; @@ -158,6 +155,7 @@ ERROR: missing-literal ; dup [ word? ] [ symbol? not ] bi and [ missing-literal ] when ; + \ + [ - ] [ - ] define-math-inverse \ - [ + ] [ - ] define-math-inverse \ * [ / ] [ / ] define-math-inverse @@ -175,6 +173,7 @@ DEFER: __ : both ( object object -- object ) dupd assert= ; + \ both [ dup ] define-inverse { @@ -277,6 +276,7 @@ DEFER: __ MACRO: matches? ( quot -- quot' ) [matches?] ; ERROR: no-match ; + M: no-match summary drop "Fall through in switch" ; : recover-chain ( seq -- quot )