Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Immutable data structures

Name: Anonymous 2018-12-03 18:54

How do you implement a POP operation on a STACK without returning multiple values?

Name: Anonymous 2018-12-03 21:40

>>2
Pop in an immutable stack would return the top element + the new state of the stack.

>>1
You would not, why would you do that?
That being said, try the state monad.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List