Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
15
Task/Identity-matrix/Scheme/identity-matrix-1.ss
Normal file
15
Task/Identity-matrix/Scheme/identity-matrix-1.ss
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
(define (identity n)
|
||||
(letrec
|
||||
((uvec
|
||||
(lambda (m i acc)
|
||||
(if (= i n)
|
||||
acc
|
||||
(uvec m (+ i 1)
|
||||
(cons (if (= i m) 1 0) acc)))))
|
||||
(idgen
|
||||
(lambda (i acc)
|
||||
(if (= i n)
|
||||
acc
|
||||
(idgen (+ i 1)
|
||||
(cons (uvec i 0 '()) acc))))))
|
||||
(idgen 0 '())))
|
||||
1
Task/Identity-matrix/Scheme/identity-matrix-2.ss
Normal file
1
Task/Identity-matrix/Scheme/identity-matrix-2.ss
Normal file
|
|
@ -0,0 +1 @@
|
|||
(display (identity 4))
|
||||
Loading…
Add table
Add a link
Reference in a new issue