This website requires JavaScript.
Explore
Help
Sign In
mirror
/
RosettaCodeData
mirror of
https://github.com/acmeism/RosettaCodeData.git
Watch
1
Star
0
Fork
You've already forked RosettaCodeData
0
Code
Issues
Packages
Projects
Releases
Wiki
Activity
master
RosettaCodeData
/
Task
/
Identity-matrix
/
Clojure
/
identity-matrix-4.clj
5 lines
125 B
Clojure
Raw
Permalink
Blame
History
(
defn
identity-matrix
[
n
]
(
take
n
(
partition
n
(
dec
n
)
(
cycle
(
conj
(
repeat
(
dec
n
)
0
)
1
)
)
)
)
)
Reference in New Issue
View Git Blame
Copy Permalink