Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
12
Task/Identity-matrix/Red/identity-matrix.red
Normal file
12
Task/Identity-matrix/Red/identity-matrix.red
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
Red[]
|
||||
|
||||
identity-matrix: function [size][
|
||||
matrix: copy []
|
||||
repeat i size [
|
||||
append/only matrix append/dup copy [] 0 size
|
||||
matrix/:i/:i: 1
|
||||
]
|
||||
matrix
|
||||
]
|
||||
|
||||
probe identity-matrix 5
|
||||
Loading…
Add table
Add a link
Reference in a new issue