Skip to content

Commit c2be3d3

Browse files
committed
chore: reformat code
1 parent 567f60b commit c2be3d3

File tree

2 files changed

+16
-18
lines changed

2 files changed

+16
-18
lines changed

List.ark

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -500,8 +500,7 @@
500500
# (print (list:none [4 5 6] f)) # true
501501
# =end
502502
# @author https://github.com/SuperFola
503-
(let none (fun (_L _f)
504-
(not (any _L _f))))
503+
(let none (fun (_L _f) (not (any _L _f))))
505504

506505
# @brief Count the number of elements in a list that match a condition
507506
# @param _L the list to work on

String.ark

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,9 @@
116116
(let _len (len _str))
117117
(while (< _i _len) {
118118
(let _c (@ _str _i))
119-
(if (and (!= _c " ") (!= _c "\t") (!= _c "\n") (!= _c "\r"))
120-
{
121-
(set _all_spaces false)
122-
(set _i _len) })
119+
(if (and (!= _c " ") (!= _c "\t") (!= _c "\n") (!= _c "\r")) {
120+
(set _all_spaces false)
121+
(set _i _len) })
123122
(set _i (+ 1 _i)) })
124123
_all_spaces })))
125124

@@ -326,11 +325,11 @@
326325

327326
(while (< _index (len _list)) {
328327
(set _output (+
329-
_output
330-
(toString (@ _list _index))
331-
(if (!= _index (- (len _list) 1))
332-
_delim
333-
"")))
328+
_output
329+
(toString (@ _list _index))
330+
(if (!= _index (- (len _list) 1))
331+
_delim
332+
"")))
334333
(set _index (+ 1 _index)) })
335334
_output }))
336335

@@ -339,7 +338,10 @@
339338
(if (emptyOrWhitespace? _str)
340339
""
341340
{
342-
(mut _i (if (= 1 _dir) 0 (- (len _str) 1)))
341+
(mut _i
342+
(if (= 1 _dir)
343+
0
344+
(- (len _str) 1)))
343345
(mut _whitespaces (or (= (@ _str _i) " ") (= (@ _str _i) "\t") (= (@ _str _i) "\n") (= (@ _str _i) "\r")))
344346

345347
(while (and _whitespaces (< _i (len _str)) (>= _i 0)) {
@@ -359,8 +361,7 @@
359361
# (print (string:lstrip " a b c")) # "a b c"
360362
# =end
361363
# @author https://github.com/SuperFola
362-
(let lstrip (fun (_str)
363-
(__strip_in_dir _str 1)))
364+
(let lstrip (fun (_str) (__strip_in_dir _str 1)))
364365

365366
# @brief Removes whitespaces from the right side of a string
366367
# @details The original string isn't modified
@@ -369,8 +370,7 @@
369370
# (print (string:rstrip " a b c ")) # " a b c"
370371
# =end
371372
# @author https://github.com/SuperFola
372-
(let rstrip (fun (_str)
373-
(__strip_in_dir _str -1)))
373+
(let rstrip (fun (_str) (__strip_in_dir _str -1)))
374374

375375
# @brief Removes whitespaces from both sides of a string
376376
# @details The original string isn't modified
@@ -379,8 +379,7 @@
379379
# (print (string:strip " a b c ")) # "a b c"
380380
# =end
381381
# @author https://github.com/SuperFola
382-
(let strip (fun (_str)
383-
(rstrip (lstrip _str))))
382+
(let strip (fun (_str) (rstrip (lstrip _str))))
384383

385384
# @brief Strip the margin of a multiline string
386385
# @param _str multiline string, margin is (space)*(|)

0 commit comments

Comments
 (0)