Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,11 @@
# A function to create an m x n matrix
# filled with the input element
def matrix(m;n):
. as $init
| ( [ range(0; n + 1) ] | map($init)) as $row
| ( [ range(0; m + 1) ] | map($row))
;
# Task: create a matrix with dimensions specified by the user
# and set the [1,2] element:
(0 | matrix($m|tonumber; $n|tonumber)) | setpath([1,2]; 99)

View file

@ -0,0 +1 @@
[[0,0,0,0],[0,0,99,0],[0,0,0,0]]