-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathseries.red
88 lines (80 loc) · 1.71 KB
/
series.red
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
Red []
Series: context [
_alter: :alter
_append: :append
_back: :back
_change: :change
_clear: :clear
_collect: :collect
_compose: :compose
_copy: :copy
_empty?: :empty?
_exclude: :exclude
_extract: :extract
_fifth: :fifth
_find: :find
_first: :first
_fourth: :fourth
_head: :head
_head?: :head?
_index?: :index?
_insert: :insert
_last: :last
_length?: :length?
_move: :move
_next: :next
_path!: :path!
_path?: :path?
_pick: :pick
_poke: :poke
_put: :put
_rejoin: :rejoin
_remove: :remove
_replace: :replace
_reverse: :reverse
_second: :second
_select: :select
_skip: :skip
_sort: :sort
_swap: :swap
_tail: :tail
_tail?: :tail?
_take: :take
_third: :third
_union: :union
_unique: :unique
compact: func [series][
collect [foreach s series [if s [keep s]]]
]
compose-deep: func [series][
compose/deep series
]
each: func [series word body][
forall series [
set word series/1
do bind body word
]
none
]
flatten: func [series][
blk: []
foreach s series [append blk s]
]
map: func [series word body][
forall series [
set word series/1
series/1: do bind body word
]
series
]
map-compact: func [series word body][
forall series [
set word series/1
series/1: do bind body word
]
compact series
]
to-string: func [series [series!]][
form series
]
]