/usr/lib/s9fes/help/pushb is in scheme9 2010.11.13-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | S9 LIB (dec! <variable>) ==> unspecific
(inc! <variable>) ==> unspecific
(pop! <variable>) ==> object
(push! object <variable>) ==> unspecific
(set-vars! <variable> ... list) ==> unspecific
(swap! <variable1> <variable2>) ==> unspecific
PUSH! conses OBJECT to the list bound to <variable>,
and updates the value of <variable> to the new list.
POP! removes the first element of the list bound to
<variable> and updates <variable> to the rest of that
list. It returns the element removed from the list.
INC! and DEC! increment and decrement the value of
the given variable, respectively.
SET-VARS! sets the given <variable>s to the values in
LIST. It may be used to set variables to multiple values
that are returned from a procedure in a list.
SWAP! swap the values bound to <variable1> and and
<variable2>.
(let ((stack (list 0 2 3 4)))
(let ((x (pop! stack)))
(push! 1 stack)
(list x stack))) ==> (0 (1 2 3 4))
(let ((x 1))
(dec! x)
x) ==> 0
(let ((a 0) (b 0) (c 0))
(set-vars! a b c '(foo bar baz))
(list a b c)) ==> (foo bar baz)
(let ((a 0)
(b 1))
(swap! a b)
(list a b)) ==> (1 0)
|