Handbook
Glossary
find-shape ( seq shape -- shape' )
Vocabulary
tensors
.
private
Inputs
seq
an
object
shape
an
object
Outputs
shape'
an
object
Definition
USING:
arrays
kernel
sequences
;
IN:
tensors.private
::
find-shape
( seq shape -- shape' )
seq
empty?
[
{
0
}
]
[
shape seq
length
1array
append
:>
shape' seq
first
:>
1st 1st
sequence?
[
1st shape'
find-shape
]
[
shape'
]
if
]
if
;