Skip to content

Commit 467ae8d

Browse files
committed
CHANGE: using more lightweight dynamic function refinements instead of either where possible
1 parent 5fdac4c commit 467ae8d

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

src/mezz/mezz-save.reb

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ REBOL [
33
Title: "REBOL 3 Mezzanine: Save"
44
Rights: {
55
Copyright 2012 REBOL Technologies
6+
Copyright 2012-2023 Rebol Open Source Contributors
67
REBOL is a trademark of REBOL Technologies
78
}
89
License: {
@@ -95,7 +96,7 @@ save: function [
9596
]
9697

9798
; (Maybe /all should be the default? See CureCode.)
98-
data: either all [mold/all/only :value] [mold/only :value]
99+
data: mold/only/:all :value
99100
append data newline ; mold does not append a newline? Nope.
100101

101102
case/all [

src/mezz/mezz-series.reb

+3-7
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ reword: func [
289289
if wtype <> type? char [char: to wtype char]
290290
[a: any [to char b: char [escape | none]] to end fout]
291291
]
292-
either case [parse/case source rule] [parse source rule]
292+
parse/:case source rule
293293
; Return end of output with /into, head otherwise
294294
either into [output] [head output]
295295
]
@@ -378,9 +378,7 @@ alter: func [
378378
append series :value true
379379
]
380380
]
381-
to logic! unless remove (
382-
either case [find/case series :value] [find series :value]
383-
) [append series :value]
381+
to logic! unless remove (find/:case series :value) [append series :value]
384382
]
385383

386384
supplement: func [
@@ -392,9 +390,7 @@ supplement: func [
392390
][
393391
result: series ; to return series at same position if value is found
394392
any[
395-
either case [
396-
find/case series :value
397-
][ find series :value ]
393+
find/:case series :value
398394
append series :value
399395
]
400396
result

0 commit comments

Comments
 (0)