Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- S = {New Sequence init}
- for E in Xs do
- {S insertFirst(E)}
- end
- fun {Check}
- local A B C in
- {S isEmpty(A)}
- if A then true
- else
- {S first(B)}
- {S last(C)}
- if B == C then
- {S removeFirst}
- {S removeLast}
- {Check}
- else
- false
- end
- end
- end
- end
- in
- {Check}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement