Skip to content

Instantly share code, notes, and snippets.

@ygrenzinger
Created November 12, 2017 19:51
Show Gist options
  • Save ygrenzinger/90f60045c09bdaf5264f9b5885c86fe4 to your computer and use it in GitHub Desktop.
Save ygrenzinger/90f60045c09bdaf5264f9b5885c86fe4 to your computer and use it in GitHub Desktop.
Reverse with Oz Cell
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