Now a behaviour.
Exported Functions | |
---|---|
behaviour_info/1 | |
decrement/1 | Decrements the value at the current position on the tape. |
decrement/2 | Decrements the value at the current position on the tape N times. |
examine/1 | Examines the state of the tape. |
increment/1 | Increments the value at the current position on the tape. |
increment/2 | Increments the value at the current position on the tape N times. |
left/1 | Moves the read/write head one position left on the tape. |
left/2 | Moves the read/write head N positions left on the tape. |
read/1 | Returns the value at the current position on the tape. |
right/1 | Moves the read/write head one position right on the tape. |
right/2 | Moves the read/write head N positions right on the tape. |
server/2 | |
start/3 | Starts and returns the pid of a new tape server. |
write/2 | Places the given value at the current position on the tape. |
behaviour_info(Arg1) -> term()
decrement(tape()) -> ok | {error, Reason}
Decrements the value at the current position on the tape.
decrement(tape(), N::integer()) -> ok | {error, Reason}
Decrements the value at the current position on the tape N times.
examine(TapePid::pid()) -> ok | {error, Reason}
Examines the state of the tape.
increment(tape()) -> ok | {error, Reason}
Increments the value at the current position on the tape.
increment(tape(), N::integer()) -> ok | {error, Reason}
Increments the value at the current position on the tape N times.
left(pid()) -> ok
Moves the read/write head one position left on the tape.
left(pid(), N::integer()) -> ok
Moves the read/write head N positions left on the tape.
read(pid()) -> integer()
Returns the value at the current position on the tape.
right(pid()) -> ok
Moves the read/write head one position right on the tape.
right(pid(), N::integer()) -> ok
Moves the read/write head N positions right on the tape.
server(Arg1, Arg2) -> term()
start(module(), Supervisor::pid(), [option()]) -> pid()
Starts and returns the pid of a new tape server.
For a description of the allowed options, see the documentation for
the pibfi
module.
write(tape(), integer()) -> {ok, integer()} | {error, Reason}
Places the given value at the current position on the tape.