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 @@
> map( sqrt, [ 1.1, 3.2, 5.7 ] );
[1.048808848, 1.788854382, 2.387467277]
> map( x -> x + 1, { 1, 3, 5 } );
{2, 4, 6}
> sqrt~( [ 1.1, 3.2, 5.7 ] );
[1.048808848, 1.788854382, 2.387467277]
> (x -> x + 1)~( { 1, 3, 5 } );
{2, 4, 6}

View file

@ -0,0 +1,14 @@
> a := Array( [ 1.1, 3.2, 5.7 ] );
a := [1.1, 3.2, 5.7]
> sqrt~( a );
[1.048808848, 1.788854382, 2.387467277]
> a;
[1.1, 3.2, 5.7]
> map( sqrt, a );
[1.048808848, 1.788854382, 2.387467277]
> a;
[1.1, 3.2, 5.7]

View file

@ -0,0 +1,5 @@
> map[inplace]( sqrt, a );
[1.048808848, 1.788854382, 2.387467277]
> a;
[1.048808848, 1.788854382, 2.387467277]

View file

@ -0,0 +1,2 @@
> map( `+`, [ 1, 2, 3 ], 3 );
[4, 5, 6]

View file

@ -0,0 +1,5 @@
> map2( `-`, 5, [ 1, 2, 3 ] );
[4, 3, 2]
> map[2]( `/`, 5, [ 1, 2, 3 ] );
[5, 5/2, 5/3]