Data update

This commit is contained in:
Ingy döt Net 2026-04-30 12:34:36 -04:00
parent 4bb20c9b71
commit cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions

View file

@ -0,0 +1,7 @@
set s to {1, 2, 2, 3, 4, 4, 5}
repeat with i from 1 to 7
set curr to item i of s
if i > 1 and curr = prev then log i
set prev to curr
end repeat

View file

@ -0,0 +1,21 @@
HAI 1.3
I HAS A s ITZ A BUKKIT
s HAS A SRS 0 ITZ 1
s HAS A SRS 1 ITZ 2
s HAS A SRS 2 ITZ 2
s HAS A SRS 3 ITZ 3
s HAS A SRS 4 ITZ 4
s HAS A SRS 5 ITZ 4
s HAS A SRS 6 ITZ 5
IM IN YR LOOP UPPIN YR i TIL BOTH SAEM i AN 7
I HAS A prev
I HAS A curr ITZ s'Z SRS i
BOTH OF DIFFRINT i AN SMALLR OF i AN 0 AN BOTH SAEM prev AN curr, O RLY?
YA RLY, VISIBLE i
OIC
prev R curr
IM OUTTA YR LOOP
KTHXBYE

View file

@ -0,0 +1,7 @@
s: [1, 2, 2, 3, 4, 4, 5]$
for i from 1 thru 7 do(
curr: s[i],
if i>1 and curr=prev then print(i),
prev: curr
);

View file

@ -0,0 +1,19 @@
local s = {1, 2, 2, 3, 4, 4, 5}
-- There is no output as 'prev' is created anew each time
-- around the loop and set implicitly to nil.
for i = 1, #s do
local curr = s[i]
local prev
if i > 1 and curr == prev then print(i) end
prev = curr
end
-- Now 'prev' is created only once and reassigned
-- each time around the loop producing the desired output.
local prev
for i = 1, #s do
local curr = s[i]
if i > 1 and curr == prev then print(i) end
prev = curr
end

View file

@ -0,0 +1,7 @@
s <- c(1, 2, 2, 3, 4, 4, 5)
for(i in 1:7){
curr <- s[i]
if(i>1 && curr==prev) print(i)
prev <- curr
}

View file

@ -0,0 +1,10 @@
s = [1, 2, 2, 3, 4, 4, 5]
for i in 0..6
curr = s[i]
prev = prev
if i>0 and curr==prev then
puts i
end
prev = curr
end

View file

@ -0,0 +1,10 @@
s = [1, 2, 2, 3, 4, 4, 5]
for i in 0..6
curr = s[i]
$prev
if i>0 and curr==$prev then
puts i
end
$prev = curr
end