Handbook
Glossary
sum-dims ( seq -- dim )
Factor handbook
»
UI framework
»
Building user interfaces
»
Gadget hierarchy and layouts
»
Implementing layout gadgets
Prev:
max-dims ( seq -- dim )
Vocabulary
ui
.
gadgets
Inputs
seq
a sequence of pairs of integers
Outputs
dim
a pair of integers
Word description
Sums a sequence of dimensions.
See also
pref-dims
,
max-dims
Definition
USING:
arrays
kernel
math
sequences
;
IN:
ui.gadgets
:
sum-dims
( seq -- dim )
[
0 0
]
dip
[
first2
swapd
[
+
]
2bi@
]
each
2array
;