English 中文(简体)
了解多限继续延长期限的意向书
原标题:Understanding the API of multi-prompt delimited continuations
  • 时间:2012-05-13 00:35:23
  •  标签:
  • ocaml
最佳回答

Why not ( a, b) subcont -> a -> b?

我认为,这与<代码>push_prompt<>/code>一样,更容易理解。 <代码>push_prompt p (fun () -> e) is intuitively a form of try e with p: 即时<代码>p作为手铐放在左栏上,<代码>e在本手下运行。 如果你使用<代码>push_prompt p e,则严格的措辞将首先评价以下论点:<代码>p和e;<代码>e在迅速确定之前可操作和“有例外”。

<代码>push_subcont sk (fun () -> e)可能遇到同样的问题:直观而言,是“检索<<>sk,因例外情况而中断”。 重要的是,<条码>e在计算范围内而不是在计算之外运行,例如,如果它希望提出与通过<条码>/条码>安装的操作员相应的例外情况。

Why not simply ( a, b) subcont = a -> b?

如果只有一种办法可以重新启动次续期:可以按照适用时重新提出具体论点的职能形式将其“提前恢复”。

但情况并非如此:有<条码>push_subcont和<条码>push_delim_subcont,在该条末尾作了描述,它们具有不同的属性。 “召募者”应当选择哪些重新启动技术。 它们都需要获得次大陆的内部数据,因此无法在次大陆功能代表处运作。

问题回答

暂无回答




相关问题
ocamlc, module compilation

I wrote an app in ocaml. It consist of several modules: Util (util.ml) Work1 (work1.ml) -- open Util Work2 (work2.ml) -- open Util, too Main (main.ml) -- open all of them. When i compile its, using ...

How can I simplify this ocaml pattern-matching code?

I m writing a simple little ocaml program that reads an algebraic statement in from a file, parses it into an AST using ocamllex/ocamlyacc, reduces it, and then prints it. The part where I m reducing ...

How can I create a type with multiple parameters in OCaml?

I m trying to create a type that has multiple type parameters. I know how to make a type with one parameter: type a foo = a * int But I need to have two parameters, so that I can parameterize the ...

Hashtable indexed on several fields

I m currently programming an OCaml module defining a type corresponding to a CPU register. The interface of this module is the following : (* * Defines a type which represents a R3000 register. *) ...

Extending an existing type in OCaml

I ve been doing some OCaml programming lately to learn the language and to get more acquainted with functional programming. Recently, I ve started to think that I d like to be able to extend an ...

Ocaml Syntax Error

What s wrong with this code? I can t figure it out: let parent (rules : grammar) (symbol1 : string) (symbol2 : string) : (SymbolSet.t) = try SymbolSet.singleton (getParent [symbol1; symbol2] ...

热门标签