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,6 @@
row (@) push (val):
@[@.Count+1] =: val \ increments .Count
row (@) pop:
rv =: @[@.Count] \ void if .Count = 0
@[@.Count] =: () \ assigning void decrements .Count
:> rv

View file

@ -0,0 +1,9 @@
main(params):+
stack =: new row \ a row is a nice stack
?# v =: tuple 1,3,5,7,11,13 give values
row stack push v \ push some primes
print '*' _ stack[stack.Count] \ get top
?# i =: from 1 upto 7
? i %% 3 = 0
print '*' _ stack[stack.Count]
print stack::pop \ class function syntax used