Data update
This commit is contained in:
parent
81fd053722
commit
52a6ef48dd
10248 changed files with 63654 additions and 6775 deletions
|
|
@ -0,0 +1,6 @@
|
|||
(let (xs '(a b c))
|
||||
(until (empty? (rest xs))
|
||||
(print (pop xs) ", "))
|
||||
(println (pop xs)))
|
||||
|
||||
a, b, c
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
(let (xs (sequence 1 10)
|
||||
x)
|
||||
(while (set 'x (pop xs))
|
||||
(print x)
|
||||
(when xs (print ", "))))
|
||||
|
|
@ -0,0 +1 @@
|
|||
(println (join (map string (sequence 1 10)) ", "))
|
||||
10
Task/Loops-N-plus-one-half/NewLISP/loops-n-plus-one-half-5.l
Normal file
10
Task/Loops-N-plus-one-half/NewLISP/loops-n-plus-one-half-5.l
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
(define (for-each-tail _func _list)
|
||||
(until (empty? _list)
|
||||
(_func _list)
|
||||
(pop _list)))
|
||||
|
||||
(for-each-tail
|
||||
(fn (xs)
|
||||
(print (xs 0))
|
||||
(if (rest xs) (print ", ")))
|
||||
(sequence 1 10))
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
MODULE LoopsNPlusOneHalf1;
|
||||
IMPORT Out;
|
||||
|
||||
VAR i :INTEGER;
|
||||
|
||||
BEGIN
|
||||
FOR i := 1 TO 10 DO
|
||||
Out.Int( i, 0 );
|
||||
IF i < 10 THEN Out.String( ", " ) END
|
||||
END
|
||||
END LoopsNPlusOneHalf1.
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
MODULE LoopsNPlusOneHalf;
|
||||
IMPORT Out;
|
||||
|
||||
VAR i :INTEGER;
|
||||
|
||||
BEGIN
|
||||
i := 0;
|
||||
WHILE i < 9 DO
|
||||
INC( i );
|
||||
Out.Int( i, 0 );
|
||||
Out.String( ", " )
|
||||
ELSIF i < 10 DO
|
||||
INC( i );
|
||||
Out.Int( i, 0 )
|
||||
END
|
||||
END LoopsNPlusOneHalf.
|
||||
11
Task/Loops-N-plus-one-half/SETL/loops-n-plus-one-half.setl
Normal file
11
Task/Loops-N-plus-one-half/SETL/loops-n-plus-one-half.setl
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
program n_plus_one_half;
|
||||
loop init
|
||||
i := 1;
|
||||
doing
|
||||
nprint(i);
|
||||
while i < 10 do
|
||||
i +:= 1;
|
||||
nprint(", ");
|
||||
end loop;
|
||||
print;
|
||||
end program;
|
||||
Loading…
Add table
Add a link
Reference in a new issue