clojush.instructions.tag

closest-association

(closest-association tag state)

Returns the key-val pair for the closest match to the given tag in the given state.

handle-tag-instruction

(handle-tag-instruction i state)

Executes the tag instruction i in the state. Tag instructions take one of the following forms: tag__ create tage/value association, with the value taken from the stack of the given type and the number serving as the tag untag_ remove the association for the closest-matching tag return_tag__ pushes (item_from__stack tag__) onto the return stack. tagged_ push the value associated with the closest-matching tag onto the exec stack (or no-op if no associations). tagged_code_ push the value associated with the closest-matching tag onto the code stack (or no-op if no associations). tagged_when_ requires a boolean; if true pushes the value associated with the closest-matching tag onto the exec stack (or no-op if no boolean or no associations).

return-tag-instruction-erc

(return-tag-instruction-erc types limit)(return-tag-instruction-erc types)

Returns a function which, when called on no arguments, returns a function of Push state that pushes a literal followed by a tagging instruction of the same type.

tag-instruction-erc

(tag-instruction-erc types limit)(tag-instruction-erc types)

Returns a function which, when called on no arguments, returns a symbol of the form tag__ where type is one of the specified types and number is in the range from 0 to the specified limit (exclusive).

tag-instruction?

(tag-instruction? i)

tagged-code-instruction-erc

(tagged-code-instruction-erc limit)(tagged-code-instruction-erc)

Returns a function which, when called on no arguments, returns a symbol of the form tagged_code_ where number is in the range from 0 to the specified limit (exclusive).

tagged-instruction-erc

(tagged-instruction-erc limit)(tagged-instruction-erc)

Returns a function which, when called on no arguments, returns a symbol of the form tagged_ where number is in the range from 0 to the specified limit (exclusive).

tagged-when-instruction-erc

(tagged-when-instruction-erc limit)(tagged-when-instruction-erc)

Returns a function which, when called on no arguments, returns a symbol of the form tagged_when_ where number is in the range from 0 to the specified limit (exclusive).

untag-instruction-erc

(untag-instruction-erc limit)(untag-instruction-erc)

Returns a function which, when called on no arguments, returns a symbol of the form untag_ where number is in the range from 0 to the specified limit (exclusive).