Where did the name <*>
first begin to appear in literature or code, and did it come with any explanation for the choice of symbol?
In Haskell, an applicative is a parametrized type that we think of as being a container for data of that type plus two methods pure and <*> . Consider a parametrized type f a . The pure method for an applicative of type f has type. pure :: a -> f a. and can be thought of as bringing values into the applicative.
Functor in Haskell is a kind of functional representation of different Types which can be mapped over. It is a high level concept of implementing polymorphism. According to Haskell developers, all the Types such as List, Map, Tree, etc. are the instance of the Haskell Functor.
Essentially, a >> b can be read like "do a then do b , and return the result of b ". It's similar to the more common bind operator >>= .
Another simple example of a functor is the Maybe type. This object can contain a value of a particular type as Just , or it is Nothing (like a null value).
It's an ASCIIification of the notation used in the original idioms paper: "Idioms: applicative programming with effects". That notation, was in turn, inspired by an already ASCIIified version from Sweirstra's and Duponcheel's paper on error-correcting parser combinators: "Deterministic, Error-Correcting Combinator Parsers". That came from "Functional Parsers" by Jeroen Fokker. This paper does not indicate where it came from which may mean it originated it. I would not be surprised if it was used for parsing before then.
The original idioms paper already uses ⊛
for application; <*>
was picked as an ASCII-art approximation of that, since (*)
isn't available (it is the syntax of the prefix form of the infix operator *
).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With