functional programming - Continuations in Clojure -


I read somewhere where the rich Hiki said:

"I think the continuity is well-organized May be theory, but not in practice "

I am not familiar with Closer.
1. Is there continuity in the closure?
2. If not, you do not need continuity? I have seen a very good example especially what is optional?
3. If so, is there any document?

When talking continuity, you have to distinguish between those two types:

  • Continuities of first-class - continuous support-support, which is deeply integrated into language (plan or ruby). Closer does not support first-class continuity.

  • Continuity-pass-style (CPS) - CPS is a style of coding and any language that supports anonymous functions will allow this style (also on the closer come into force).

Example:

  - standard double function: - int -> Intel double x = 2 * x - cps-function - we repeat the continuity of the double-cps :: int - & gt; (Int -> Ridge) - & gt; Res doubleCPS x cont = cont (2 * x)  
 ; Call print (double 2); Call CPS: Continue execution with specified anonymous function Double 2 (\ res -> Print Race)  

Read on Wikipedia.

I do not think continuity is necessary for a good language, but particularly in first-class continuity and functional languages, Haskell like CPS may be quite useful ().


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -