Handbook
Glossary
minimal-path-sum-to ( x y matrix -- n )
Vocabulary
project-euler
.
081
.
private
Inputs
x
an
object
y
an
object
matrix
an
object
Outputs
n
an
object
Definition
USING:
kernel
math
math.order
;
IN:
project-euler.081.private
::
minimal-path-sum-to
( x y matrix -- n )
x y
+
zero?
[
0
]
[
x
zero?
[
0 y 1
-
matrix
get-matrix
]
[
y
zero?
[
x 1
-
0 matrix
get-matrix
]
[
x 1
-
y matrix
get-matrix
x y 1
-
matrix
get-matrix
min
]
if
]
if
]
if
;