Data update

This commit is contained in:
Ingy döt Net 2025-08-11 18:05:26 -07:00
parent 4d5544505c
commit 4924dd0264
3073 changed files with 55820 additions and 4408 deletions

View file

@ -0,0 +1,2 @@
> even. #. 𝔸8926012345
Vec 6 [8, 2, 6, 0, 2, 4]

View file

@ -0,0 +1,2 @@
> [(x˙)'even.⩪x] 𝔸8926012345
Vec 6 [8, 2, 6, 0, 2, 4]

View file

@ -0,0 +1,13 @@
--Create the original array (table #nos) with numbers from 1 to 10
create table nos (v int);
insert into nos from range(1,11);
--Select the subset that are even into the new array (table #evens)
create table evens as (from nos where v % 2 = 0);
-- Show #evens
from evens;
# There is no need to drop the tables just for sake of repeating, because
# DuckDB supports "CREATE OR REPLACE", but the basic DROP TABLE syntax
# is the same.

View file

@ -0,0 +1,7 @@
create temporary table nos (v int);
insert into nos values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
create temporary table evens (v int);
insert into evens select v from nos where v%2=0;
select * from evens order by v;
drop table nos;
drop table evens;

View file

@ -0,0 +1 @@
create temporary table evens select * from nos where v%2=0;

View file

@ -0,0 +1 @@
create temporary table evens as from nos where v%2=0;

View file

@ -0,0 +1 @@
DELETE FROM nos WHERE v%2=1;

View file

@ -0,0 +1,2 @@
select list_filter(lst, v -> v % 2 = 0) as evens, lst
from (select range(1,11) as lst);

View file

@ -0,0 +1,3 @@
create or replace function evens(lst) as (
list_filter(lst, v -> v % 2 = 0)
);

View file

@ -9,5 +9,5 @@ public program()
var evens := array.filterBy::(n => n.mod(2) == 0).toArray();
evens.forEach(printingLn)
evens.forEach(PrintingLn)
}

View file

@ -9,5 +9,5 @@ public program()
array
.filterBy::(int n => n.mod(2) == 0)
.forEach::(int i){ console.printLine(i) }
.forEach::(int i){ Console.printLine(i) }
}

View file

@ -0,0 +1,5 @@
local a = range(10)
b = a:filter(|x|->x%2==0)
b:mapped(|i|->io.write(i,'\t'))
print()