Handbook
Glossary
(euler150) ( m -- n )
Vocabulary
project-euler
.
150
.
private
Inputs
m
an
object
Outputs
n
an
object
Definition
USING:
kernel
math
sequences
sequences.private
;
IN:
project-euler.150.private
::
(euler150)
( m -- n )
sums-triangle
:>
table m
<iota>
[|
x |
x 1
+
<iota>
[|
y |
m x
-
<iota>
[|
z |
x z
+
table
nth-unsafe
[
y z
+
1
+
swap
nth-unsafe
]
[
y
swap
nth-unsafe
]
bi
-
]
partial-sum-minimum
]
map-minimum
]
map-minimum
;
inline