Skip to content

Commit 0ecbcfc

Browse files
committed
update example to remove redundant calls to string/from-bytes
1 parent f3aa9e7 commit 0ecbcfc

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

examples/filter.janet

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
(filter |(> (length $) 3) ["hello" "goodbye" "hi"]) # -> @["hello" "goodbye"]
44

5-
(filter |(< 65 $) "foo01bar") # -> @[102 111 111 98 97 114]
5+
(filter |(< (chr "A") $) "foo01bar") # -> @[102 111 111 98 97 114]
66

7-
(string/join
8-
(map string/from-bytes
9-
(filter |(< "A" (string/from-bytes $)) "foo01bar"))) # -> "foobar"
7+
(string/from-bytes ;(filter |(< (chr "A") $) "foo01bar")) # -> "foobar"

0 commit comments

Comments
 (0)