News for hackers. Stuff that matters.
Re:The Soft Side of Software by wz1000 on Friday May 12, 2017 @04:12PM (#14327474)
Cont stands for Continuation. A continuation basically represents a 'suspended' computation with an intermediate result of type 'a' and final result of type 'r'

    type Cont r a = (a -> r) -> r
Cont is a type constructor that takes two type arguments, r and a. This means that Cont r a can always be substituted by (a -> r) -> r. For example, Cont String Int is equivalent to (Int -> String) -> String

(a -> r) is the type of a function from a to r. For example, Int -> Bool is the type of a function from Int to Bool. (a -> r) -> r is the type of a function that takes a function from (a -> r) as its argument and returns an r. So Cont String Int takes a function from Int to String as its argument and finally returns a String.

http://www.haskellforall.com/2012/12/the-continuation-monad.... https://begriffs.com/posts/2015-06-03-haskell-continuations....

Re:The Soft Side of Software by PopsiclePete on Friday May 12, 2017 @05:28PM (#14328093)
My eyes glazed over as they usually do when trying to grok Haskell, but is that somehow related to partial computation and partial functions?
Re:The Soft Side of Software by theoh on Friday May 12, 2017 @08:03PM (#14328874)
Not really to do with partial evaluation or the unrelated idea of a partial function.

A key motivating (non-Haskell) example behind continuations is the idea of replacing "return" with a function call. This is continuation passing style, and obviously when you call a subroutine in CPS, you need to give it a function to call when it completes: a "continuation" which is contrived to be equivalent to what would happen when that particular subroutine "returned" in normal direct style

Re:The Soft Side of Software by piinbinary on Friday May 12, 2017 @07:00PM (#14328602)
read the right hand side as roughly:

    func(func(a): b): b