Created
November 12, 2017 19:51
-
-
Save ygrenzinger/90f60045c09bdaf5264f9b5885c86fe4 to your computer and use it in GitHub Desktop.
Reverse with Oz Cell
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare | |
fun {Reverse L} | |
local C in | |
C = {NewCell nil} | |
for E in L do | |
C := E | @C | |
end | |
@C | |
end | |
end | |
declare | |
{Browse {Reverse [1 2 3 4]}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment