Skip to content

Instantly share code, notes, and snippets.

@treed
Created August 7, 2009 02:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save treed/163680 to your computer and use it in GitHub Desktop.
Save treed/163680 to your computer and use it in GitHub Desktop.
.sub 'reverse' :method
.local pmc res
.local int i
res = new 'CardinalString'
.local pmc iterator, item
iterator = iter self
each_loop:
unless iterator goto each_loop_done
item = shift iterator
res = concat item, res
goto each_loop
each_loop_done:
.return(res)
.end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment