@@ -27,11 +27,7 @@ attempt: func [
27
27
value [block! ]
28
28
/safer "Capture all possible errors and exceptions"
29
29
] [
30
- either safer [
31
- unless error? set /any 'value try /all :value [get /any 'value]
32
- ][
33
- unless error? set /any 'value try :value [get /any 'value]
34
- ]
30
+ unless error? set /any 'value (apply 'try/: all [:value safer]) [get /any 'value]
35
31
]
36
32
37
33
comment : func [ "Consume but don't evaluate the next value" 'value] []
@@ -334,15 +330,7 @@ context [
334
330
return: [logic! block! ]
335
331
][
336
332
clear p-indent
337
- either case [
338
- parse/case/trace input rules :on-parse-event
339
- ][
340
- either part [
341
- parse/part/trace input rules limit :on-parse-event
342
- ][
343
- parse/trace input rules :on-parse-event
344
- ]
345
- ]
333
+ parse/:case/: part/trace input rules limit :on-parse-event
346
334
]
347
335
]
348
336
@@ -363,11 +351,7 @@ scan: func [
363
351
/fast "Fast scanning, returns best guessed type"
364
352
return: [datatype! none! ] "Recognized or guessed type, or NONE on empty input"
365
353
] [
366
- either fast [
367
- either next [transcode/next/prescan buffer][transcode/prescan buffer]
368
- ][
369
- either next [transcode/next/scan buffer][transcode/scan buffer]
370
- ]
354
+ apply 'transcode/:next/:scan/: prescan [buffer :next not fast fast]
371
355
]
372
356
373
357
load : function [
@@ -767,7 +751,7 @@ collect: function [
767
751
/into "Insert into a buffer instead (returns position after insert)"
768
752
collected [series! ] "The buffer series (modified)"
769
753
] [
770
- keep : func [ v /only ] [either only [ append /only collected v][ append collected v] v]
754
+ keep : func [ v /only ] [append/: only collected v v]
771
755
772
756
unless collected [collected: make block! 16 ]
773
757
parse body rule: [ ;-- selective binding (needs BIND/ONLY support)
@@ -937,9 +921,9 @@ read-thru: function [
937
921
] [
938
922
path: path-thru url
939
923
either all [not update exists? path] [
940
- data: either binary [ read /binary path][ read path]
924
+ data: read/: binary path
941
925
][
942
- data: either binary [ read /binary url][ read url]
926
+ data: read/: binary url
943
927
attempt [write /binary path data]
944
928
]
945
929
data
@@ -955,7 +939,7 @@ load-thru: function [
955
939
path: path-thru url
956
940
if all [not update exists? path][url: path]
957
941
file: either as [load/as url type][load url]
958
- if url? url [attempt [either as [ save /as path file type][ save path file] ]]
942
+ if url? url [attempt [save/: as path file type]]
959
943
file
960
944
]
961
945
@@ -964,7 +948,7 @@ do-thru: function [
964
948
url [url! ] "Remote file address"
965
949
/update "Force a cache update"
966
950
] [
967
- do either update [ load-thru/update url][load-thru url]
951
+ do load-thru/: update url
968
952
]
969
953
970
954
cos : func [
0 commit comments