Ad
  • Custom User Avatar

    This type of kata is a classic.

    • your function gets a program as argument, and an input "stream" (see below). the command chars are in the program string. The "a" ('dunno where you saw that one specifically) is coming from the input stream, I guess.
    • the interpreter has an inner memory inwhich the pointer is moving. That's up to you to build that memory and pointer thing. That's the data thing.
    • you have an input "stream" and an output "stream". . is reading one element in the input stream and , is writing something in the output stream. The input stream is provided as an argument, and the output "stream is what you're supposed to return.

    it's your job to figure out how you'll deesign the whole thing so that it can handle the requirements.

    Cheers

    @LearningFTW: please, if you close something, be sure to provide the correct information. Documentation about generic pointer will for sure help the user, here... (<<< ironic tone inside...)

  • Default User Avatar

    Not an issue. A question to which the answer is : https://en.wikipedia.org/wiki/Pointer_(computer_programming)

    In this case (most likely an array/list/something like that).

  • Custom User Avatar

    FWIW, this wording probably doesn't help. I wouldn't expect most folks at this level to be familiar with terminology around multisets. The sample data definitely doesn't help in that regard.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution