Skip to content

confusion regarding "you can use a list as a stack to get the first element" koan.  #169

Open
@Daniel-Jacob

Description

@Daniel-Jacob

I have a question regarding the following koan:

"You can use a list like a stack to get the first element"
(= :a (peek '(:a :b :c :d :e)))

I believe this should be a queue instead of a stack, since a stack is last in first out. Since '(:a :b :c :d :e) the last element is :e this should be returned. A queue is first in first out so we pop the first element put in which would be :a. Please correct me if i'm wrong.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions