haskell - Where does the name "section" come from for a partially applied infix operator? -


in haskell, use term "section" indicate partially applied function used in infix position. instance, function foo :: -> b -> c , values x :: a , y :: b, have 2 sections

s1 = (x `foo`) :: b -> c == \b -> foo x b 

and

s2 = (`foo` y) :: -> c == \a -> foo y 

in category theory, however, section g of f defined right inverse of f (so f . g == id).

i don't see obvious connection between 2 definitions. instance, s1 not inverse of foo, @ least not in hask. suppose s1 doesn't have have inverse in hask.

is category-theoretical definition source of haskell definition, , if so, how?

as has been pointed out in comments, haskell got sections miranda (and orwell). david turner says got idea richard bird , david wile.

i have chatted richard bird. says doesn't remember name came from, thinks david wile coined it. unfortunately, david wile died last year, never know. but, richard did admit 1 convinced david turner , phil wadler add sections in languages.

here's page wile's thesis first know mention of "section". http://imgur.com/a/cqdlu


Comments

Popular posts from this blog

sql server - Cannot query correctly (MSSQL - PHP - JSON) -

php - trouble displaying mysqli database results in correct order -

C++ Linked List -