summary refs log tree commit diff stats
Commit message (Expand)AuthorAgeFilesLines
...
* use `file` for reliably identifying text fileshut2010-03-142-1/+15
* apps: added seperate entry for GIMPhut2010-03-141-1/+5
* general updates, allow column levels of >1hut2010-03-145-12/+32
* Changed the local config file name from "rangerrc.py" to "options.py"hut2010-03-141-2/+2
* make install: chmod after copyinghut2010-03-141-0/+2
* incremented verison number v1.0.4hut2010-03-124-6/+6
* README: typohut2010-03-121-2/+2
* standardized formatting of headings in doc/hut2010-03-122-13/+31
* added doc/uml.txthut2010-03-121-0/+5
* updated pydochut2010-03-1217-161/+33
* fixed shutli_generatorized.move()hut2010-03-121-5/+1
* apps: added eye of gnomehut2010-03-121-1/+6
* fixed `ranger <file>`hut2010-03-121-1/+1
* ranger.main: don't create ~/.ranger if --clean is specifiedhut2010-03-121-10/+10
* more documentationhut2010-03-122-6/+29
* make install: catch an exceptionhut2010-03-121-0/+4
* Renamed env.pwd to env.cwd ("Current Working Directory")hut2010-03-129-77/+77
* commands.delete: ask for confirmation (in some cases)hut2010-03-121-1/+24
* command_parser: fixed chunk()hut2010-03-121-1/+1
* mime.types: added audio/musepackhut2010-03-122-888/+896
* moved ranger.container.environment to ranger.core.environmenthut2010-03-122-1/+1
* actions: correct preview after deletinghut2010-03-122-0/+5
* environment: changed misleading method namehut2010-03-121-2/+2
* README: slightly changed introductionhut2010-03-121-3/+3
* fsobject: fixed crash on files which exist but can't be statedhut2010-03-121-1/+1
* README: changed introductionhut2010-03-121-8/+10
* make push: removed "hut" repohut2010-03-121-1/+0
* slightly modified keybinding syntaxhut2010-03-123-196/+173
* HACKING: updatedhut2010-03-121-7/+8
* updated pydochut2010-03-1271-3946/+820
* mime.types: included div, divx and ogm extensionshut2010-03-122-935/+946
* moved ranger.actions and ranger.commandshut2010-03-125-3/+3
* removed copyright from one-line, docstring-only __init__.py fileshut2010-03-123-30/+1
* ranger.__init__: set a default value for arghut2010-03-123-5/+5
* defaults.options: fixed mistakehut2010-03-121-1/+1
* misc changes, make installhut2010-03-126-12/+53
* ranger.data.generate: added compatibility to python 2.6hut2010-03-121-1/+3
* ranger.actions: fixed error messageshut2010-03-121-1/+1
* ranger.help.starting: reverted bad changeshut2010-03-121-2/+2
* ranger.commands: added e=edit alias to make :e unambiguous.hut2010-03-121-0/+2
* ranger.commands: fixed aliaseshut2010-03-121-1/+1
* defaults.options: more extensive documentationhut2010-03-121-18/+35
* ranger.colorschemes: look for custom colorschemes!hut2010-03-121-0/+4
* added two new colorschemes using 88 colorshut2010-03-124-8/+159
* working on the configuration system / main methodhut2010-03-1218-133/+202
* openstruct: faster implementation, removed ReferencedOpenStructhut2010-03-122-21/+5
* moved ranger.ext.debug into ranger.__init__hut2010-03-123-38/+16
* README: updatedhut2010-03-121-16/+19
* misc changeshut2010-03-126-31/+13
* ranger.colorschemes.__init__: little optimizationhut2010-03-121-4/+6
eral.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
# Example program showing 'return-continuation-until-mark' return other values
# alongside continuations.
#
# Print out a given list of numbers.
#
# To run:
#   $ git clone https://github.com/akkartik/mu
#   $ cd mu
#   $ ./mu continuation4.mu
#
# Expected output:
#   1
#   2
#   3

def main [
  local-scope
  l:&:list:num <- copy null
  l <- push 3, l
  l <- push 2, l
  l <- push 1, l
  k:continuation, x:num, done?:bool <- call-with-continuation-mark 100/mark, create-yielder, l
  {
    break-if done?
    $print x 10/newline
    k, x:num, done?:bool <- call k
    loop
  }
]

def create-yielder l:&:list:num -> n:num, done?:bool [
  local-scope
  load-inputs
  {
    done? <- equal l, null
    break-if done?
    n <- first l
    l <- rest l
    return-continuation-until-mark 100/mark, n, done?
    loop
  }
  # A function that returns continuations shouldn't get the opportunity to
  # return. Calling functions should stop calling its continuation after this
  # point.
  return-continuation-until-mark 100/mark, -1, done?
  assert false, [called too many times, ran out of continuations to return]
]