]> gitweb.factorcode.org Git - factor.git/commitdiff
arrays.shaped: implement nth/like so each/map works
authorJohn Benediktsson <mrjbq7@gmail.com>
Mon, 15 May 2023 22:04:21 +0000 (15:04 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Mon, 15 May 2023 22:04:21 +0000 (15:04 -0700)
extra/arrays/shaped/shaped.factor

index 5b5780c7ad49610b1e029912fc4862961aa158fe..fec134ad96fd8f6ac56c9a75c3e3b566d1eebcc7 100644 (file)
@@ -92,6 +92,10 @@ TUPLE: col-array < shaped-array ;
 
 M: shaped-array length underlying>> length ; inline
 
+M: shaped-array nth-unsafe underlying>> nth-unsafe ;
+
+M: shaped-array like shape>> <shaped-array> ;
+
 M: shaped-array shape shape>> ;
 
 : make-shaped-array ( underlying shape class -- shaped-array )