From 3a4e21789153534af162110db26329ae984ce5d7 Mon Sep 17 00:00:00 2001 From: Celestino Amoroso Date: Wed, 13 May 2026 08:01:18 +0200 Subject: [PATCH] kern/fraction-type.go: changed some syntax --- kern/fraction-type.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kern/fraction-type.go b/kern/fraction-type.go index fab5e2e..e44adcb 100644 --- a/kern/fraction-type.go +++ b/kern/fraction-type.go @@ -44,10 +44,11 @@ func MakeGeneratingFraction(s string) (f *FractionType, err error) { if len(s) == 0 { goto exit } - if s[0] == '-' { + switch s[0] { + case '-': sign = int64(-1) s = s[1:] - } else if s[0] == '+' { + case '+': s = s[1:] } // if strings.HasSuffix(s, "()") {