Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Skrypt na goto w Ruby (moze nie dzialac na nowszych implementacjach)
- require 'continuation' # Required in some implementations
- $tickets = {}
- def ticket(symbol)
- callcc {|c| $tickets[symbol] = c }
- end
- def goto(symbol)
- $tickets[symbol].call
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement